Text label recognition method, device, electronic device and storage medium

By generating feature vectors through entity recognition models and text interaction records, text geographic area tags are automatically identified, which solves the problem of low efficiency of manual configuration in existing technologies and realizes efficient and accurate text tag recognition.

CN114416998BActive Publication Date: 2025-09-16SHENZHEN PING AN SMART HEALTHCARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210082518.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2025-09-16
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

Existing text label recognition technology requires manual configuration of geographic area labels, which leads to low efficiency and high labor costs, and is difficult to cope with the exponential growth of text data.

Method used

The entity recognition model is used to identify candidate geographic keywords in the target text, generate feature vectors, calculate text label probabilities, automatically determine geographic area labels, and use text interaction records and location information to improve the information richness of feature vectors.

Benefits of technology

It realizes automatic recognition of text geographic area tags, improves recognition efficiency, reduces labor costs, and improves recognition accuracy and text management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416998B_ABST
    Figure CN114416998B_ABST
Patent Text Reader

Abstract

This application is applicable to the field of big data technology and provides a text label recognition method, device, electronic device and storage medium. The method includes: responding to a label configuration request of a target text, determining the candidate geographic keywords contained in the target text through a preset entity recognition model; generating a feature vector corresponding to the candidate geographic keyword based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text; calculating the text label probability of the candidate geographic keyword based on the feature vector corresponding to the candidate geographic keyword; and determining the geographic region label corresponding to the target text from all candidate geographic keywords based on the text label probability corresponding to each candidate geographic keyword. The above method can greatly improve the efficiency of text label recognition and reduce labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data technology, and in particular relates to a method, device, electronic device and storage medium for identifying text tags. Background Art

[0002] With the continuous development of network technology, every user or group can publish articles on the Internet, and the amount of text data published on the Internet has increased exponentially. When organizing and analyzing text on the Internet, it is often necessary to add corresponding tags to the text to achieve rapid classification of the text. In some application scenarios, in order to determine the situation of a certain geographical area, text can be classified according to geographical tags. Therefore, how to accurately identify the geographical area described by the text content has become a problem that needs to be solved urgently.

[0003] Existing text tag recognition technology often requires manual tag configuration when determining the geographical area described by a text and the geographical tag of the text, as multiple different keywords related to geographical regions may appear in a text. This greatly reduces the efficiency of tag configuration. In addition, in scenarios where the amount of text is growing exponentially, a large amount of manpower is often required for text classification, further increasing labor costs. Summary of the Invention

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for identifying text tags, which can solve the problem that existing text tag recognition technology often uses manual configuration to classify when determining the geographical area described by the text tag content, thereby greatly increasing the labor cost of text tag configuration and low recognition efficiency.

[0005] In a first aspect, an embodiment of the present application provides a method for identifying a text label, comprising:

[0006] In response to a tag configuration request for a target text, determining candidate geographic keywords contained in the target text by using a preset entity recognition model;

[0007] generating a feature vector corresponding to the candidate geographic keyword based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text;

[0008] Calculating the text label probability of the candidate geographic keyword based on the feature vector corresponding to the candidate geographic keyword;

[0009] Based on the text label probabilities corresponding to the candidate geographic keywords, the geographic area label corresponding to the target text is determined from all the candidate geographic keywords.

[0010] In a possible implementation of the first aspect, generating a feature vector corresponding to the candidate geographic keyword based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text includes:

[0011] Determine a text feature parameter group of the candidate keyword based on the appearance position;

[0012] Determining geographic aliases of the candidate geographic keywords, and determining alias feature parameters based on the number of occurrences of all the geographic aliases in the target text;

[0013] Identifying the number of entities in the target text that are associated with the candidate geographic keywords and determining entity feature parameters;

[0014] Obtaining a word cloud set of the target text, and determining semantic feature parameters based on an inclusion relationship between the candidate geographic keywords and the word cloud set;

[0015] Identifying the publication information of the target text, and determining a publication feature parameter group based on a first correlation between the publication information and the candidate keywords;

[0016] Determining an interaction feature parameter group according to each of the text interaction records;

[0017] The feature vector is generated based on the text feature parameter group, the alias feature parameter, the entity feature parameter, the semantic feature parameter, the publishing feature parameter group, and the interaction feature parameter group.

[0018] In a possible implementation of the first aspect, identifying the publication information of the target text and determining the publication feature parameter group based on a first correlation between the publication information and the candidate keyword includes:

[0019] Determining a publication object of the target text, and calculating a first publication feature value based on a first distance value between a first geographical location associated with the publication object and a target geographical location corresponding to the candidate keyword;

[0020] Determining the text author of the target text, and obtaining a plurality of published texts associated with the text author;

[0021] A second publishing characteristic value is calculated based on a second distance value between a second geographical location corresponding to an existing geographical tag of each published text and the target geographical location; wherein the second publishing characteristic value is specifically:

[0022]

[0023] Publish2 is the second publishing feature value; Distance(HisText i , AddressKey) is the second distance value between the second geographical location of the i-th published text and the target geographical location; CurrentTime is the publishing time of the target text; Time i is the publishing time of the i-th published text; Num([HisText i ]) is the total number of published texts; Max{Distance(HisText i ,AddressKey)} is the maximum value selection function;

[0024] The publishing feature parameter group is determined according to the first publishing feature value and the second publishing feature value.

[0025] In a possible implementation of the first aspect, the text interaction record includes a text browsing record and a text comment record;

[0026] Determining an interaction feature parameter group according to each of the text interaction records includes:

[0027] determining first user information of a browsing object of each of the text browsing records, and determining the second relevance based on the first user information and the candidate keywords;

[0028] determining the review content of the review object of each of the text review records, and determining a third degree of association based on the review content and the candidate keywords;

[0029] The interaction feature parameter group is generated according to the second degree of association and the third degree of association.

[0030] In a possible implementation of the first aspect, calculating the text label probability of the candidate geographic keyword based on the feature vector corresponding to the candidate geographic keyword includes:

[0031] Determining a characteristic reference value corresponding to each eigenvalue in the eigenvector, and normalizing each eigenvalue according to the characteristic reference value;

[0032] Obtain a normalized feature vector based on the normalized feature value;

[0033] Importing the normalized feature vector into a preset prediction module to generate a global feature vector;

[0034] The global feature vector is imported into a preset trend evaluation module to calculate the text label probability.

[0035] In a possible implementation of the first aspect, in response to a tag configuration request for a target text, determining candidate geographic keywords contained in the target text using a preset entity recognition model includes:

[0036] In response to a tag configuration request for a target text, importing the target text into an entity recognition model to determine entity keywords corresponding to the target text;

[0037] Identifying entity keywords that co-occur in the target text and determining the association relationship between the entity keywords;

[0038] Generate a knowledge graph based on the association relationship between each of the entity keywords;

[0039] Calculate the fourth degree of association between any two entity keywords; the fourth degree of association is:

[0040] Sim(E1,E2)=∑ ei∈Context(E1),ej∈Context(E2) maxsim entity (ei,ej);

[0041] sim entity (ei,ej)=∑ p∈Prop(ei)∩Prop(ej) ω p Simlarity type(p) (ei[p],ej[p])

[0042] Among them, Sim(E1, E2) is the fourth degree of association between the two entity keywords; Context(E1) is the associated entity with the entity keyword E1 in the knowledge graph; Context(E2) is the associated entity with the entity keyword E2 in the knowledge graph; ei is the i-th associated entity in the association relationship of the entity keyword E1; ej is the j-th associated entity in the association relationship of the entity keyword E2; Prop(ei) is the entity type of the i-th associated entity in the association relationship of the entity keyword E1; Prop(ej) is the entity type of the j-th associated entity in the association relationship of the entity keyword E2; ω p The weight value corresponding to the entity type of the entity keyword; Simlarity type(p) (ei[p], ej[p]) is the matching function corresponding to the entity type; ei[p] is the parameter value of the entity type of the i-th associated entity in the association relationship of the entity keyword E1; ej[p] is the parameter value of the entity type of the j-th associated entity in the association relationship of the j-th entity keyword E2;

[0043] If the fourth correlation degree is greater than a preset correlation threshold, identifying the arbitrary two entity keywords as entity keywords having an alias relationship;

[0044] Entity keywords with alias relationships are clustered into one geographic keyword.

[0045] In a possible implementation of the first aspect, determining the geographic area label corresponding to the target text from all the candidate geographic keywords based on the text label probability corresponding to each candidate geographic keyword includes:

[0046] Selecting the candidate geographic keyword with the highest text identification probability as the geographic area label of the target text;

[0047] After determining the geographical area label corresponding to the target text from all the candidate geographical keywords based on the text label probability corresponding to each candidate geographical keyword, the method further includes:

[0048] All the target texts are classified based on the geographic area labels to obtain a plurality of regional text groups; the target texts in each regional text group have the same geographic area label.

[0049] In a second aspect, an embodiment of the present application provides a text label recognition device, comprising:

[0050] a candidate geographic keyword determining unit, configured to determine, in response to a tag configuration request of a target text, candidate geographic keywords contained in the target text by using a preset entity recognition model;

[0051] a feature vector determining unit, configured to generate a feature vector corresponding to the candidate geographic keyword based on a text interaction record corresponding to the target text and an occurrence position of the candidate geographic keyword in the target text;

[0052] A text label probability calculation unit, configured to calculate the text label probability of the candidate geographic keyword based on the feature vector corresponding to the candidate geographic keyword;

[0053] The geographic region label recognition unit is configured to determine the geographic region label corresponding to the target text from all the candidate geographic keywords based on the text label probability corresponding to each candidate geographic keyword.

[0054] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspects above is implemented.

[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects above is implemented.

[0056] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute any one of the methods described in the first aspect above.

[0057] Compared with the prior art, the beneficial effects of the embodiments of the present application are as follows: when it is necessary to identify the geographic region label corresponding to the target text, the target text will be identified through the entity recognition model to obtain the candidate geographic keywords contained in the target text, and the geographic region label of the target text can be selected from the candidate geographic keywords; in order to determine which candidate geographic keyword can better represent the content of the target text, it is necessary to determine the feature vector of each candidate geographic keyword based on the corresponding appearance position of each candidate geographic keyword in the target text and the text interaction record of the target text, and obtain the text label probability corresponding to each candidate geographic keyword based on the feature vector, and then select the geographic region label from the candidate geographic keywords, thereby achieving the purpose of automatically identifying text geographic region labels. Compared with the existing text label recognition technology, the method provided by this embodiment does not require manual configuration of geographic region labels, thereby greatly improving the efficiency of text label recognition and reducing labor costs. On the other hand, when determining the feature vectors of each candidate geographic keyword, the embodiment of the present application not only considers the appearance position of the candidate geographic keyword in the target text, and determines the importance of the candidate geographic keyword to the text content representation through the appearance position, but also determines the correlation between the object interacting with the target text and the candidate geographic keyword through the interaction record of the target text, thereby improving the richness of the information contained in the feature vector, and then improving the accuracy of subsequent identification of geographic area labels, and further improving text management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0059] Figure 1 This is a flowchart of a method for identifying a text label provided in one embodiment of the present application;

[0060] Figure 2This is a schematic diagram of an implementation method of S102 of a text label recognition method provided in an embodiment of the present application;

[0061] Figure 3 This is a schematic diagram of an implementation method of S1025 of a text label recognition method provided in one embodiment of the present application;

[0062] Figure 4 This is a schematic diagram of an implementation method of S1026 of a text label recognition method provided in an embodiment of the present application;

[0063] Figure 5 This is a schematic diagram of an implementation method of S103 of a text label recognition method provided in an embodiment of the present application;

[0064] Figure 6 is a schematic diagram of a network for calculating text label probabilities provided by an embodiment of the present application;

[0065] Figure 7 This is a schematic diagram of an implementation of S101 of a text label recognition method provided in an embodiment of the present application;

[0066] Figure 8 This is a schematic diagram of an implementation method of a text label recognition method provided in one embodiment of the present application;

[0067] Figure 9 Schematic diagram of the structure of the text label recognition method and device provided in the embodiment of the present application;

[0068] Figure 10 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0070] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0071] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0072] The text tag recognition method provided in the embodiment of the present application can be applied to electronic devices such as smart phones, servers, tablet computers, laptops, ultra-mobile personal computers (UMPCs), and netbooks. The embodiment of the present application does not impose any restrictions on the specific type of electronic device. In particular, the electronic device can also be a text server based on big data, which stores a large amount of text data and has tags configured for each text data. The above tags include but are not limited to content tags of the text data, character tags, etc. In particular, the above tags include geographical area tags for determining the geographical area specifically described by the content of the text data.

[0073] Of course, the addition of the above-mentioned geographic area tags to classify text data can also be applied to the field of determining public opinion conditions, as well as other fields for confirming the conditions in different regions.

[0074] See also Figure 1 , Figure 1 The following is a flowchart illustrating a method for identifying a text label provided in an embodiment of the present application. The method includes the following steps:

[0075] In S101 , in response to a tag configuration request of a target text, candidate geographic keywords contained in the target text are determined by a preset entity recognition model.

[0076] In this embodiment, the electronic device is equipped with a text database that stores a large amount of text data. The text data includes tagged text data and target text to be tagged. Upon receiving a tag configuration request for a target text, the electronic device executes operation S101. The tag configuration request can be generated based on user input or automatically.

[0077] In a possible implementation, the user terminal may send a tag configuration request carrying a target file to the electronic device. After receiving the tag configuration request, the electronic device may extract the target text carried therein and add a geographic area tag to the target text.

[0078] In a possible implementation, the tag configuration request may carry a text identifier, and the electronic device extracts the corresponding target text from a preset text database based on the text identifier and performs a geographic area tag recognition operation.

[0079] In one possible implementation, the electronic device downloads text data from the Internet at a preset period and performs tag recognition on the obtained text data. For example, the electronic device may be configured with a corresponding text keyword and download text data containing the text keyword from the Internet.

[0080] In this embodiment, the electronic device is configured with an entity recognition model, which is specifically used to identify entity keywords related to geographic locations contained in the target text, such as "Hunan" and "Shenzhen Science and Technology Building", and use the identified entity keywords as candidate geographic keywords corresponding to the target text. The entity recognition model can be generated by training a large amount of annotated data, and the annotation method adopts Basic Input Output System (BIOS) annotation. The trained model is trained by combining a BiLSTM network with a CRF network. After the training is completed, a named entity recognition model is used for prediction to obtain the above-mentioned entity recognition model.

[0081] In one possible implementation, the electronic device may store multiple training texts, each of which is marked with entity keywords related to geography, and train and learn the existing recognition model based on the annotated training texts, and set a corresponding loss function. When it is detected that the loss value of the loss function is less than or equal to a preset loss threshold, it is recognized that the above-mentioned recognition model has been trained, that is, the above-mentioned entity recognition model is obtained.

[0082] In S102 , a feature vector corresponding to the candidate geographic keyword is generated based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text.

[0083] In this embodiment, the electronic device can respectively determine the feature vectors corresponding to different candidate geographic keywords. The feature vector is used to determine the degree of generalization of the candidate geographic keywords for the content of the target text. In addition to being related to the text attributes such as the position where the candidate geographic keywords appear in the text and the statistical number of candidate geographic keywords according to the position of appearance, the feature vector is also related to the interaction record corresponding to the text, such as the user information of browsing the text, the user information of commenting on the text, and the author information corresponding to the text. Interaction operations include but are not limited to: sharing, liking, commenting, and collecting operations. The above interaction information can also determine the audience who pays attention to the target text to a certain extent. The audience with a high degree of attention to the text is often the user who has a strong correlation with the geographical area associated with the text content. Therefore, through the text interaction record, the geographical area represented by the content of the target text can be determined to a certain extent.

[0084] In one possible implementation, the electronic device can import the target text marked with candidate geographic keywords into a preset location feature data conversion model to calculate location feature data determined based on the occurrence location; the electronic device can identify whether each text interaction record contains the above-mentioned candidate geographic keywords, and calculate the interaction feature data based on the text interaction records in which the candidate geographic keywords appear, and obtain the above-mentioned feature vector based on the interaction feature data and the location feature data.

[0085] In S103, the text label probability of the candidate geographic keyword is calculated according to the feature vector corresponding to the candidate geographic keyword.

[0086] In this embodiment, after determining the feature vector of a candidate geographic keyword, the electronic device can import the feature vector into a preset tag probability recognition network to calculate the text tag probability corresponding to the candidate geographic keyword. A larger value of the text tag probability indicates a greater relevance to the target text; conversely, a smaller value of the text tag probability indicates a lower relevance to the target text.

[0087] In one possible implementation, the electronic device is configured with a text label recognition network. The text label recognition network includes two modules, namely a feature extraction module and a fully connected module. The feature extraction module can be specifically a module based on multiple convolution kernels, which performs convolution processing on the above-mentioned feature vector through multiple convolution kernels to extract the feature value corresponding to the candidate keyword, and imports it into the above-mentioned fully connected module based on the feature value, so as to calculate the probability of the text label of the target text, that is, the above-mentioned text label probability. The above-mentioned recognition network can be trained by learning through big data artificial intelligence.

[0088] It should be noted that the electronic device determines a feature vector for each candidate geographic keyword and calculates the probability of a text label corresponding to each candidate geographic keyword.

[0089] In S104 , based on the text label probability corresponding to each candidate geographic keyword, the geographic area label corresponding to the target text is determined from all the candidate geographic keywords.

[0090] In this embodiment, after calculating the text tag probability of each geographic keyword, the electronic device can identify and obtain the geographic area tag of the target text based on the text tag probability.

[0091] In a possible implementation, the electronic device may select a candidate geographic keyword with the highest text label probability as the geographic area label.

[0092] In a possible implementation, the electronic device may be configured with a corresponding probability threshold, and all candidate geographic keywords with text label probabilities greater than the probability threshold are used as the geographic area labels.

[0093] In a possible implementation, the number of determined geographic area labels may be one or more. If the number of the geographic area labels is multiple, each geographic area label may be in a cascade relationship with each other. For example, the multiple geographic area labels identified may be: Guangdong, Shenzhen, Futian District, Lianhua Street. The above-mentioned geographic area labels are in a cascade relationship. Lianhua Street is a street in Futian District, and Futian District belongs to an area in Shenzhen City, and Shenzhen City belongs to a prefecture-level city in Guangdong Province. There is a regional cascade relationship between them, corresponding to different division granularities, so that they can respond to text division operations of different granularities.

[0094] From the above, it can be seen that the text label recognition method provided by the embodiment of the present application will identify the target text through the entity recognition model when it is necessary to identify the geographic area label corresponding to the target text, and obtain the candidate geographic keywords contained in the target text, and the geographic area label of the target text can be selected from the candidate geographic keywords; in order to determine which candidate geographic keyword can better represent the content of the target text, it is necessary to determine the feature vector of each candidate geographic keyword based on the corresponding appearance position of each candidate geographic keyword in the target text and the text interaction record of the target text, and obtain the text label probability corresponding to each candidate geographic keyword based on the feature vector, and then select the geographic area label from the candidate geographic keywords, thereby achieving the purpose of automatically identifying text geographic area labels. Compared with the existing text label recognition technology, the method provided by this embodiment does not require manual configuration of geographic area labels, thereby greatly improving the efficiency of text label recognition and reducing labor costs. On the other hand, when determining the feature vectors of each candidate geographic keyword, the embodiment of the present application not only considers the appearance position of the candidate geographic keyword in the target text, and determines the importance of the candidate geographic keyword to the text content representation through the appearance position, but also determines the correlation between the object interacting with the target text and the candidate geographic keyword through the interaction record of the target text, thereby improving the richness of the information contained in the feature vector, and then improving the accuracy of subsequent identification of geographic area labels, and further improving text management efficiency.

[0095] Figure 2 FIG2 shows a specific implementation flow chart of a text label recognition method S102 provided by the second embodiment of the present invention. Figure 2 , relative to Figure 1In the embodiment, the text label recognition method provided in this embodiment includes S1021 to S1027, which are described in detail as follows:

[0096] Furthermore, generating a feature vector corresponding to the candidate geographic keyword based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text includes:

[0097] In S1021 , a text feature parameter group of the candidate keyword is determined based on the appearance position.

[0098] In this embodiment, the text can often be divided into different areas, such as the title area, subtitle area, abstract area, main text area, and quotation area, etc. Different areas have different degrees of summarization of the text content. For example, the title area summarizes the text content to a higher degree; while the main text area, because it contains a large amount of text, belongs to the area for describing the expanded content, and therefore summarizes the text content to a lower degree. Based on this, if a certain geographical area keyword appears in the title area, the information density of the text content represented is higher; if a certain geographical area keyword appears in the main text area, the information density of the text content represented is lower. Therefore, a text feature parameter group corresponding to a threshold value can be generated based on the position of occurrence of the candidate geographical keyword in the target text. The text feature parameter group can contain one feature parameter; it can also contain multiple feature parameters, which is determined according to the actual situation. For example, if a candidate geographical keyword appears multiple times in the target text, the number of parameters in the above text feature parameter group can also be consistent with the number of occurrences, that is, each occurrence position corresponds to a text feature parameter, so that all text feature parameters constitute the text feature parameter group of the candidate geographical keyword.

[0099] In a possible implementation, the text feature parameter group includes the following four feature parameter values:

[0100] 1. Determine the number of occurrences of the candidate geographic keyword in the target text, and determine a first text feature parameter based on the number of occurrences.

[0101] In this embodiment, a candidate geographic keyword may appear multiple times in a text. The electronic device may count the number of occurrences of a candidate geographic keyword in the target text and calculate a first text feature parameter based on the number of occurrences. It should be noted that if the candidate geographic keyword has one or more aliases, the number of occurrences of the aliases may also be counted in the number of occurrences of the candidate geographic keyword to obtain the corresponding first text feature parameter.

[0102] 2. Identify whether the candidate geographic keyword appears in the title area of ​​the target text and determine the second text feature parameter.

[0103] 3. Identify whether the candidate geographic keyword appears in the first or last paragraph of the target text body area and determine the third text feature parameter.

[0104] 4. Identify whether the candidate geographic keyword appears in the abstract and determine the fourth text feature parameter.

[0105] In this embodiment, based on the importance of the text content, three regions with high importance can be obtained: the title region, the abstract region, and the first or last paragraph of the main text region. The text in each of these regions can often highly summarize the content of the text. Therefore, if a candidate geographic keyword appears in one of these regions, it indicates that it is relatively important to the text content. Therefore, whether or not a candidate geographic keyword appears in one of these regions can be used to determine the corresponding text feature parameter. If it appears in one of these regions, the corresponding text feature parameter is the first value; otherwise, if it does not appear in one of these regions, the corresponding text feature parameter is the second value.

[0106] For example, if a candidate geographic keyword appears in the title area, the second text feature parameter of the candidate geographic keyword is 1 (i.e., the first value); if the above candidate geographic keyword does not appear in the abstract area, the fourth text feature parameter of the candidate geographic keyword is 0 (i.e., the second value), and so on.

[0107] In S1022 , the geographic aliases of the candidate geographic keywords are determined, and alias feature parameters are determined based on the number of occurrences of all the geographic aliases in the target text.

[0108] In this embodiment, the electronic device can obtain the alias of each candidate geographic keyword based on a preset knowledge graph or a pre-stored alias dictionary, determine whether the alias of each candidate geographic keyword has appeared in the target text, and the number of times it appears. Two feature parameters can be obtained through analysis, and the above two feature parameters are encapsulated to obtain the above alias feature parameters.

[0109] In S1023 , the number of entities in the target text that are associated with the candidate geographic keyword is identified, and entity feature parameters are determined.

[0110] In this embodiment, the electronic device can count whether there are place names associated with the candidate geographic keywords in the target text. The place names may not be recognized candidate geographic keywords, but entities with a high degree of relevance to the location. For example, Wuhan City includes Yellow Crane Tower, Wuhan Yangtze River Bridge, Wuhan University, Tanhualin, etc. The above-mentioned entity feature parameters are obtained based on the number of occurrences of entities associated with the candidate geographic keywords.

[0111] In S1024 , a word cloud set of the target text is obtained, and semantic feature parameters are determined based on the inclusion relationship between the candidate geographic keywords and the word cloud set.

[0112] In this embodiment, the word cloud is a collection of keywords that represent the main content of the target text, extracted after semantic analysis of the target text. If a candidate geographic keyword appears in the word cloud, it indicates that the candidate geographic keyword is highly representative of the text content of the target text. Therefore, the corresponding semantic feature parameters can be determined based on whether the word cloud contains the candidate geographic keyword.

[0113] In S1025 , the publication information of the target text is identified, and a publication feature parameter group is determined based on the first correlation between the publication information and the candidate keyword.

[0114] In this embodiment, the electronic device can obtain the publication information corresponding to the target text, such as the publisher and the publication location. Since the publication information is often strongly correlated with the geographical location of the content described in the text, for example, the publication object "Guangzhou Daily" often reports local news in Guangzhou. Therefore, by determining the first correlation between the candidate geographic keyword and the publication information, the correlation between the candidate first keyword and the geographic area label can be indirectly inferred, and the publication feature parameter group can be determined based on the above first correlation.

[0115] In S1026, an interaction feature parameter group is determined based on each of the text interaction records.

[0116] In this embodiment, the electronic device can generate a corresponding set of interaction feature parameters based on the degree of association between all text interaction records of the target text and the candidate geographic keywords. For example, the electronic device can determine whether the interaction content of the text interaction record contains the candidate geographic keyword or an entity associated with the candidate geographic keyword, thereby obtaining the corresponding interaction feature parameters.

[0117] In S1027 , the feature vector is generated based on the text feature parameter group, the alias feature parameter, the entity feature parameter, the semantic feature parameter, the publishing feature parameter group, and the interaction feature parameter group.

[0118] In this embodiment, the electronic device may encapsulate the above-mentioned multiple calculated feature parameters to generate a feature vector for the candidate geographic keyword.

[0119] In an embodiment of the present application, the characteristic parameters of the candidate geographic keywords are determined through multiple dimensions to generate a characteristic vector of the candidate geographic keywords. The degree of association between the candidate geographic keywords and the text content can be judged from multiple dimensions, greatly improving the recognition accuracy of subsequent geographic area labels.

[0120] Figure 3 FIG3 shows a specific implementation flow chart of a text label recognition method S1025 provided by the third embodiment of the present invention. Figure 3 , relative to Figure 2 In the embodiment, the text label recognition method provided in this embodiment includes S1025 including S301 to S304, which are described in detail as follows:

[0121] In S301 , a publication object of the target text is determined, and a first publication feature value is calculated based on a first distance value between a first geographical location associated with the publication object and a target geographical location corresponding to the candidate keyword.

[0122] In this embodiment, the above-mentioned publication information includes the publication object and the text author. Among them, the publication object can be an enterprise, group, group, individual, etc., such as the Shenzhen Daily, Guangzhou Daily or the official account of Guangzhou Public Security, etc. Of course, if the text author is the publication object of the target text, the publication object and the text author can be the same. Each publication object can be associated with a corresponding registered location, that is, the first geographical location mentioned above. The electronic device can obtain a first publication feature value based on the first distance value between the target geographical location corresponding to the candidate keyword and the first geographical location associated with the publication object. The smaller the first distance value, the larger the value of the corresponding first publication feature value.

[0123] In S302 , the text author of the target text is determined, and a plurality of published texts associated with the text author are obtained.

[0124] In this embodiment, the electronic device can obtain all texts published by the text author, that is, published texts, based on the text author associated with the target text.

[0125] In S1033, a second publishing characteristic value is calculated based on a second distance value between the second geographical location corresponding to the existing geographical tag of each published text and the target geographical location; wherein the second publishing characteristic value is specifically:

[0126]

[0127] Publish2 is the second publishing feature value; Distance(HisText i , AddressKey) is the second distance value between the second geographical location of the i-th published text and the target geographical location; CurrentTime is the publishing time of the target text; Time i is the publishing time of the i-th published text; Num([HisText i]) is the total number of published texts; Max{Distance(HisText i ,AddressKey)} is the maximum value selection function.

[0128] In this embodiment, each published text is a text that has been assigned a geographic region tag. Therefore, by obtaining the existing geographic tag corresponding to each published text, the corresponding second geographic location can be determined, and the distance value between the second geographic location and the target geographic location corresponding to the candidate keyword, i.e., the second distance value, can be calculated to obtain a second publication feature value related to the publication. The electronic device can determine a corresponding weight based on the difference in publication time between each published text and the target text, with the closer the publication time to the target text, the higher the corresponding weight.

[0129] In S1034, the publishing feature parameter group is determined according to the first publishing feature value and the second publishing feature value.

[0130] In this embodiment, the electronic device encapsulates the first release feature value and the second feature value to obtain a release feature parameter group related to the candidate geographic keyword.

[0131] In an embodiment of the present application, by determining the published text of the publishing object and the text author, and respectively determining the first publishing feature value and the second publishing feature value related to the publication, the comprehensiveness of the publication feature can be improved, and the accuracy of the subsequent calculation of the text label probability can be improved.

[0132] Figure 4 FIG4 shows a specific implementation flow chart of a text label recognition method S1026 provided by the fourth embodiment of the present invention. Figure 4 , relative to Figure 2 In the embodiment, the text label recognition method provided in this embodiment includes S1026 including: S401 to S404, which are described in detail as follows:

[0133] Furthermore, the text interaction record includes a text browsing record and a text comment record; and determining the interaction feature parameter group based on each of the text interaction records includes:

[0134] In S401 , first user information of a browsing object of each of the text browsing records is determined, and the second relevance is determined based on the first user information and the candidate keywords.

[0135] In S402 , the review content of the review object of each of the text review records is determined, and a third degree of association is determined based on the review content and the candidate keywords.

[0136] In S403, the interaction feature parameter group is generated according to the second correlation degree and the third correlation degree.

[0137] In this embodiment, the electronic device can obtain the first user information of the user viewing the target text, extract the network address from the first user information, and determine the location of the user browsing the target text through the network address, and determine the above-mentioned second correlation by calculating the distance between the user's location and the target geographical location corresponding to the candidate geographical keyword.

[0138] In one possible implementation, after determining the first user information of each text browsing record, the electronic device can count the proportion of locations of users who browsed the target text, select the top N locations with the largest number of viewers as representative browsing locations, and calculate the above-mentioned second correlation based on the distance value between the representative browsing location and the target geographic location corresponding to the candidate geographic keyword.

[0139] In this embodiment, similar to determining the second degree of association, the electronic device can determine the user locations corresponding to each user who commented on the target text based on the text comment records, and calculate the distance between the commenting user locations and the target geographic location corresponding to the candidate geographic keyword to determine the third degree of association. For a detailed description, please refer to the description of the second degree of association above and will not be repeated here.

[0140] In this embodiment, the electronic device may encapsulate the second degree of association and the third degree of association, thereby obtaining an interaction feature parameter group related to the interaction behavior.

[0141] In an embodiment of the present application, by determining the correlation between the geographic location of the interactive object and the candidate geographic keywords and determining the interactive feature parameter group, it is possible to determine whether the candidate geographic keywords are related to the geographic area of ​​the target text through the interactive object, thereby improving the information richness of the feature vector and further improving the accuracy of the subsequent text label probability.

[0142] Figure 5 FIG5 shows a specific implementation flow chart of a text label recognition method S103 provided by the fifth embodiment of the present invention. Figure 5 , relative to Figure 1 In the embodiment, the text label recognition method provided in this embodiment includes S1031 to S1034, which are described in detail as follows:

[0143] In S1051 , a characteristic reference value corresponding to each eigenvalue in the eigenvector is determined, and each eigenvalue is normalized according to the characteristic reference value.

[0144] In S1052 , a normalized feature vector is obtained based on the normalized feature value.

[0145] In S1053, the normalized feature vector is imported into a preset prediction module to generate a global feature vector.

[0146] In S1054, the global feature vector is imported into a preset trend evaluation module to calculate the text label probability.

[0147] In this embodiment, the electronic device can normalize each eigenvalue in the eigenvector, thereby eliminating the influence of different eigendimensions on the results. The specific normalization rules can be determined based on the physical characteristics of the corresponding eigenvalues, that is, determining the characteristic reference value of each eigenvalue in the eigenvector. For example, the softmax function can be used to normalize the above eigenvector to obtain a normalized eigenvector.

[0148] In a possible implementation, the electronic device can train the two modules before inputting them into the network composed of the prediction module and the trend evaluation module. Specifically, the electronic device imports the training data into the network, and then generates a corresponding decision tree by extracting features of the training data and compressing the data. The decision tree package can be output and the prediction module vector, and then the output of the prediction module is fed back to the trend evaluation module to calculate the corresponding global vector. In addition to processing the training data, corresponding verification data is also configured. Based on the verification score corresponding to the verification data output by the prediction module, the parameters of each module in the above framework are adjusted according to the verification score and the global vector, thereby obtaining a trained network, i.e., the prediction module and the trend evaluation module. For example, Figure 6 FIG2 shows a schematic diagram of a network for calculating text label probabilities provided by an embodiment of the present application. Figure 6 As shown in FIG, the network includes a prediction module and a trend evaluation module, which can be trained with training data and transform the feature vector after training to obtain the text label probability.

[0149] In an embodiment of the present application, before calculating the text label probability, each eigenvalue in the eigenvector is normalized, which can eliminate the influence caused by the dimension, thereby further improving the accuracy of subsequent calculations.

[0150] Figure 7 FIG6 shows a flowchart of a specific implementation of a text label recognition method S101 provided by the sixth embodiment of the present invention. Figure 7 , relative to Figure 1-5 In any of the embodiments, the text label recognition method S101 provided in this embodiment includes: S1011 to S1016, which are described in detail as follows:

[0151] In S1011 , in response to a tag configuration request of a target text, the target text is imported into an entity recognition model to determine entity keywords corresponding to the target text.

[0152] In S1012 , entity keywords that have a co-occurrence relationship in the target text are identified, and the association relationship between the entity keywords is determined.

[0153] In S1013, a knowledge graph is generated based on the association relationship between each of the entity keywords.

[0154] In S1014, the fourth correlation between any two entity keywords is calculated; the fourth correlation is:

[0155] Sim(E1,E2)=Σ ei∈Context(E1),ej∈Context(E2) maxsim entity (ei,ej);

[0156] sim entity (ei,ej)=Σ p∈Prop(ei)∩Prop(ej) ω p Simlarity type(p) (ei[p],ej[p])

[0157] Among them, Sim(E1, E2) is the fourth degree of association between the two entity keywords; Context(E1) is the associated entity with the entity keyword E1 in the knowledge graph; Context(E2) is the associated entity with the entity keyword E2 in the knowledge graph; ei is the i-th associated entity in the association relationship of the entity keyword E1; ej is the j-th associated entity in the association relationship of the entity keyword E2; Prop(ei) is the entity type of the i-th associated entity in the association relationship of the entity keyword E1; Prop(ej) is the entity type of the j-th associated entity in the association relationship of the entity keyword E2; ω p The weight value corresponding to the entity type of the entity keyword; Simlarity type(p) (ei[p], ej[p]) is the matching function corresponding to the entity type; ei[p] is the parameter value of the entity type of the i-th associated entity in the association relationship of the entity keyword E1; ej[p] is the parameter value of the entity type of the j-th associated entity in the association relationship of the j-th entity keyword E2.

[0158] In S1015 , if the fourth correlation degree is greater than a preset correlation threshold, the arbitrary two entity keywords are identified as entity keywords having an alias relationship.

[0159] In S1016 , entity keywords that have alias relationships are clustered into one geographic keyword.

[0160] In this embodiment, the electronic device determines that the target text contains entity keywords through the entity recognition model, and adds corresponding nodes for each entity keyword in the preset knowledge graph. If two entity keywords are in the same sentence or the same paragraph, it is recognized that the two entity keywords have a co-occurrence relationship, or based on the fact that the connective between the two entity keywords is a preset valid connective, it is determined that the two entity keywords have a co-occurrence relationship. If there are two entity keywords with a co-occurrence relationship, the nodes corresponding to the two entity keywords can be connected in the knowledge graph, that is, the two entity keywords have an association relationship, thereby connecting each isolated node to generate a knowledge graph based on all entity keywords. The electronic device can calculate the fourth correlation between each entity keyword for the knowledge graph. If the fourth correlation between the two entity association words is greater than the preset association threshold, it is recognized that there is an alias relationship between the two entity keywords, and the two entity keywords can be clustered into one keyword as a candidate keyword.

[0161] In an embodiment of the present application, after identifying the entity keywords related to geography in the target text, alias recognition is performed, and the entity keywords with alias relationships are clustered to obtain candidate geographic keywords. This can avoid calculating the text label probability of different keywords referring to the same object separately, dilute the importance of the keywords, and then improve the recognition accuracy of subsequent identification of geographic area labels.

[0162] Figure 8 FIG6 shows a specific implementation flow chart of a text label recognition method provided by the sixth embodiment of the present invention. Figure 8 , relative to Figure 1-5 In any of the embodiments, a text label recognition method S104 provided in this embodiment includes: S801, and after S104, further includes S802, which is described in detail as follows:

[0163] In S801 , the candidate geographic keyword with the highest text identification probability is selected as the geographic area label of the target text.

[0164] In S802, all the target texts are classified based on the geographic area labels to obtain a plurality of regional text groups; the target texts in each regional text group have the same geographic area label.

[0165] In this embodiment, the electronic device can select a candidate geographic keyword with the highest text identification probability as the geographic area label of the target text, and then classify all target texts based on the geographic area label, and divide all target texts belonging to the same geographic area label into a regional text group, so that users can understand the situation of a certain geographic area through the regional text group, such as public opinion and hot events.

[0166] In the embodiment of the present application, text is classified by geographic area tags, which makes it easier for users to understand the situation in a specific area and improves the efficiency of text search.

[0167] Figure 9 The structural block diagram of a text label recognition method device provided by an embodiment of the present invention is shown. The electronic device includes various units for performing Figure 1 Each step in the corresponding embodiment. Please refer to Figure 1 and Figure 1 For the sake of convenience, only the parts related to this embodiment are shown.

[0168] See also Figure 9 The text label recognition method and device includes:

[0169] A candidate geographic keyword determining unit 91 is configured to determine, in response to a tag configuration request of a target text, candidate geographic keywords contained in the target text using a preset entity recognition model;

[0170] A feature vector determining unit 92 is configured to generate a feature vector corresponding to the candidate geographic keyword based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text;

[0171] A text label probability calculation unit 93 is used to calculate the text label probability of the candidate geographic keyword based on the feature vector corresponding to the candidate geographic keyword;

[0172] The geographic region label identification unit 94 is configured to determine the geographic region label corresponding to the target text from all the candidate geographic keywords based on the text label probability corresponding to each candidate geographic keyword.

[0173] Optionally, the feature vector determining unit 92 includes:

[0174] a text feature parameter group determining unit, configured to determine the text feature parameter group of the candidate keyword based on the appearance position;

[0175] an alias feature parameter determination unit, configured to determine a geographic alias of the candidate geographic keyword, and determine an alias feature parameter based on the number of occurrences of all the geographic aliases in the target text;

[0176] An entity feature parameter determination unit, configured to identify the number of entities in the target text that are associated with the candidate geographic keyword and determine entity feature parameters;

[0177] a semantic feature parameter determination unit, configured to obtain a word cloud set of the target text and determine a semantic feature parameter based on an inclusion relationship between the candidate geographic keyword and the word cloud set;

[0178] a publishing characteristic parameter group determining unit, configured to identify the publishing information of the target text and determine a publishing characteristic parameter group based on a first correlation between the publishing information and the candidate keywords;

[0179] an interaction feature parameter group determining unit, configured to determine an interaction feature parameter group according to each of the text interaction records;

[0180] A parameter encapsulation unit is used to generate the feature vector based on the text feature parameter group, the alias feature parameter, the entity feature parameter, the semantic feature parameter, the publishing feature parameter group and the interaction feature parameter group.

[0181] Optionally, the release characteristic parameter group determination unit includes:

[0182] a first publication feature value determining unit, configured to determine a publication object of the target text, and calculate a first publication feature value based on a first distance value between a first geographical location associated with the publication object and a target geographical location corresponding to the candidate keyword;

[0183] a published text acquisition unit, configured to determine the author of the target text and acquire a plurality of published texts associated with the author;

[0184] A second publication characteristic value determining unit is configured to calculate a second publication characteristic value based on a second distance value between a second geographical location corresponding to an existing geographical tag of each published text and the target geographical location; wherein the second publication characteristic value is specifically:

[0185]

[0186] Publish2 is the second publishing feature value; Distance(HisText i, AddressKey) is the second distance value between the second geographical location of the i-th published text and the target geographical location; CurrentTime is the publishing time of the target text; Time i is the publishing time of the i-th published text; Num([HisText i ]) is the total number of published texts; Max{Distance(HisText i ,AddressKey)} is the maximum value selection function;

[0187] The release characteristic value encapsulation unit is configured to determine the release characteristic parameter group according to the first release characteristic value and the second release characteristic value.

[0188] Optionally, the text interaction record includes text browsing records and text comment records;

[0189] The interaction feature parameter group determination unit includes:

[0190] a second relevance determination unit, configured to determine first user information of a browsing object of each of the text browsing records, and determine the second relevance based on the first user information and the candidate keywords;

[0191] a third relevance determination unit, configured to determine the comment content of the comment object of each of the text comment records, and determine a third relevance based on the comment content and the candidate keywords;

[0192] The association degree encapsulation unit is configured to generate the interaction feature parameter group according to the second association degree and the third association degree.

[0193] Optionally, the text label probability calculation unit 93 includes:

[0194] a normalization processing unit, configured to determine a characteristic reference value corresponding to each eigenvalue in the eigenvector, and perform normalization processing on each eigenvalue according to the characteristic reference value;

[0195] a normalized vector generating unit, configured to obtain a normalized feature vector based on the normalized feature value;

[0196] A global characteristic vector determining unit, configured to import the normalized characteristic vector into a preset prediction module to generate a global characteristic vector;

[0197] The text label probability conversion unit is used to import the global feature vector into a preset trend evaluation module to calculate the text label probability.

[0198] Optionally, the candidate geographic keyword determination unit 91 includes:

[0199] An entity keyword recognition unit, configured to, in response to a tag configuration request of a target text, import the target text into an entity recognition model and determine entity keywords corresponding to the target text;

[0200] An association relationship identification unit, configured to identify entity keywords that co-occur in the target text and determine the association relationship between the entity keywords;

[0201] A knowledge graph generating unit, configured to generate a knowledge graph based on the association relationship between each of the entity keywords;

[0202] The fourth correlation calculation unit is used to calculate the fourth correlation between any two entity keywords; the fourth correlation is:

[0203] Sim(E1,E2)=Σ ei∈Context(E1),ej∈Context(E2) maxsim entity (ei,ej);

[0204] sim entity (ei,ej)=Σ p∈Prop(ei)∩Prop(ej) ω p Simlarity type(p) (ei[p],ej[p])

[0205] Among them, Sim(E1, E2) is the fourth degree of association between the two entity keywords; Context(E1) is the associated entity with the entity keyword E1 in the knowledge graph; Context(E2) is the associated entity with the entity keyword E2 in the knowledge graph; ei is the i-th associated entity in the association relationship of the entity keyword E1; ej is the j-th associated entity in the association relationship of the entity keyword E2; Prop(ei) is the entity type of the i-th associated entity in the association relationship of the entity keyword E1; Prop(ej) is the entity type of the j-th associated entity in the association relationship of the entity keyword E2; ω p The weight value corresponding to the entity type of the entity keyword; Simlarity type(p) (ei[p], ej[p]) is the matching function corresponding to the entity type; ei[p] is the parameter value of the entity type of the i-th associated entity in the association relationship of the entity keyword E1; ej[p] is the parameter value of the entity type of the j-th associated entity in the association relationship of the j-th entity keyword E2;

[0206] an alias relationship identifying unit, configured to identify the arbitrary two entity keywords as entity keywords having an alias relationship if the fourth correlation degree is greater than a preset correlation threshold;

[0207] The entity keyword clustering unit is used to cluster entity keywords with alias relationships into one geographic keyword.

[0208] Optionally, the geographic area tag identification unit 94 includes:

[0209] a text identification maximum probability selection unit, configured to select the candidate geographic keyword with the maximum text identification probability as the geographic area label of the target text;

[0210] The text label recognition device further includes:

[0211] The text classification unit is used to classify all the target texts based on the geographical area labels to obtain multiple regional text groups; the geographical area labels of the target texts in each regional text group are the same.

[0212] Therefore, the text tag recognition method and device provided by the embodiment of the present invention can also eliminate the need for manual configuration of geographic area tags, thereby greatly improving the efficiency of text tag recognition and reducing labor costs. On the other hand, when determining the feature vector of each candidate geographic keyword, the embodiment of the present application not only considers the occurrence position of the candidate geographic keyword in the target text, and determines the importance of the candidate geographic keyword to the text content representation through the occurrence position, but also determines the correlation between the object interacting with the target text and the candidate geographic keyword through the interaction record of the target text, thereby improving the richness of the information contained in the feature vector, thereby improving the accuracy of subsequent identification of geographic area tags, and further improving the efficiency of text management.

[0213] It should be understood that Figure 9 In the structural block diagram of the text label recognition method device shown, each module is used to perform Figures 1 to 8 The steps in the corresponding embodiments, and Figures 1 to 8 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figures 1 to 8 as well as Figures 1 to 8 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0214] Figure 10 This is a structural block diagram of an electronic device provided by another embodiment of the present application. Figure 10As shown, the electronic device 1000 of this embodiment includes: a processor 1010, a memory 1020, and a computer program 1030 stored in the memory 1020 and executable by the processor 1010, such as a program for a text label recognition method. When the processor 1010 executes the computer program 1030, the steps of each embodiment of the above-mentioned text label recognition method are implemented, such as Figure 1 Alternatively, the processor 1010 executes the computer program 1030 to implement the above Figure 10 The functions of each module in the corresponding embodiment are, for example, Figure 9 For details on the functions of units 91 to 94, please refer to Figure 9 Related description in the corresponding embodiment.

[0215] Exemplarily, the computer program 1030 may be divided into one or more modules, one or more of which are stored in the memory 1020 and executed by the processor 1010 to complete the present application. One or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 1030 in the electronic device 1000. For example, the computer program 1030 may be divided into various unit modules, and the specific functions of each module are as described above.

[0216] The electronic device 1000 may include, but is not limited to, a processor 1010 and a memory 1020. Those skilled in the art will appreciate that Figure 10 It is only an example of the electronic device 1000 and does not constitute a limitation of the electronic device 1000. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0217] The processor 1010 may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0218] The memory 1020 may be an internal storage unit of the electronic device 1000, such as a hard disk or memory of the electronic device 1000. The memory 1020 may also be an external storage device of the electronic device 1000, such as a plug-in hard disk, smart memory card, flash memory card, etc. equipped on the electronic device 1000. Furthermore, the memory 1020 may include both an internal storage unit of the electronic device 1000 and an external storage device.

[0219] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for identifying a text label, characterized in that: include: In response to a tag configuration request for a target text, determining candidate geographic keywords contained in the target text by using a preset entity recognition model; generating a feature vector corresponding to the candidate geographic keyword based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text; Calculating the text label probability of the candidate geographic keyword based on the feature vector corresponding to the candidate geographic keyword; Determining the geographic area label corresponding to the target text from all the candidate geographic keywords based on the text label probability corresponding to each candidate geographic keyword; The generating a feature vector corresponding to the candidate geographic keyword based on the text interaction record corresponding to the target text and the occurrence position of the candidate geographic keyword in the target text includes: Determining a text feature parameter group of the candidate geographic keyword based on the occurrence position; Determining geographic aliases of the candidate geographic keywords, and determining alias feature parameters based on the number of occurrences of all the geographic aliases in the target text; Identifying the number of entities in the target text that are associated with the candidate geographic keywords and determining entity feature parameters; Obtaining a word cloud set of the target text, and determining semantic feature parameters based on an inclusion relationship between the candidate geographic keywords and the word cloud set; Identifying the publication information of the target text, and determining a publication feature parameter group based on a first correlation between the publication information and the candidate geographic keyword; Determining an interaction feature parameter group according to each of the text interaction records; generating the feature vector based on the text feature parameter group, the alias feature parameter, the entity feature parameter, the semantic feature parameter, the publishing feature parameter group, and the interaction feature parameter group; The identifying the publication information of the target text and determining a publication feature parameter group based on a first correlation between the publication information and the candidate geographic keyword includes: Determining a publication object of the target text, and calculating a first publication feature value based on a first distance value between a first geographical location associated with the publication object and a target geographical location corresponding to the candidate geographical keyword; Determining the text author of the target text, and obtaining a plurality of published texts associated with the text author; A second publishing characteristic value is calculated based on a second distance value between a second geographical location corresponding to an existing geographical tag of each published text and the target geographical location; wherein the second publishing characteristic value is specifically: in, publishing a characteristic value for the second; is a second distance value between the second geographical location of the i-th published text and the target geographical location; The publishing time of the target text; The publishing time of the i-th published text; is the total number of published texts; Select the function for the maximum value; The publishing feature parameter group is determined according to the first publishing feature value and the second publishing feature value.

2. The identification method according to claim 1, characterized in that The text interaction records include text browsing records and text comment records; Determining an interaction feature parameter group according to each of the text interaction records includes: determining first user information of a browsing object of each of the text browsing records, and determining a second relevance based on the first user information and the candidate geographic keywords; determining the review content of the review object of each of the text review records, and determining a third degree of association based on the review content and the candidate geographic keyword; The interaction feature parameter group is generated according to the second degree of association and the third degree of association.

3. The identification method according to claim 1, characterized in that The calculating the text label probability of the candidate geographic keyword according to the feature vector corresponding to the candidate geographic keyword includes: Determining a characteristic reference value corresponding to each eigenvalue in the eigenvector, and normalizing each eigenvalue according to the characteristic reference value; Obtain a normalized feature vector based on the normalized feature value; Importing the normalized feature vector into a preset prediction module to generate a global feature vector; The global feature vector is imported into a preset trend evaluation module to calculate the text label probability.

4. The identification method according to any one of claims 1 to 3, characterized in that: The step of determining, in response to a tag configuration request for a target text, candidate geographic keywords contained in the target text by using a preset entity recognition model includes: In response to a tag configuration request for a target text, importing the target text into an entity recognition model to determine entity keywords corresponding to the target text; Identifying entity keywords that co-occur in the target text and determining the association relationship between the entity keywords; Generate a knowledge graph based on the association relationship between each of the entity keywords; Calculate the fourth degree of association between any two entity keywords; the fourth degree of association is: in, is the fourth degree of association between the two entity keywords; The entity keyword E1 is an associated entity with the associated relationship in the knowledge graph; The entity keyword E2 is an associated entity with the associated relationship in the knowledge graph; The i-th associated entity in the association relationship of the entity keyword E1; The jth associated entity in the association relationship of the entity keyword E2; The entity type of the i-th associated entity in the association relationship of the entity keyword E1; The entity type of the j-th associated entity in the association relationship of the entity keyword E2; The weight value corresponding to the entity type of the entity keyword; is the matching function corresponding to the entity type; The parameter value of the entity type of the i-th associated entity in the association relationship of the entity keyword E1; is the parameter value of the entity type of the j-th associated entity in the association relationship of the entity keyword E2; If the fourth correlation degree is greater than a preset correlation threshold, identifying the arbitrary two entity keywords as entity keywords having an alias relationship; Entity keywords with alias relationships are clustered into one geographic keyword.

5. The identification method according to any one of claims 1 to 3, characterized in that: The determining the geographic area label corresponding to the target text from all the candidate geographic keywords based on the text label probability corresponding to each candidate geographic keyword includes: Selecting the candidate geographic keyword with the highest text label probability as the geographic area label of the target text; After determining the geographical area label corresponding to the target text from all the candidate geographical keywords based on the text label probability corresponding to each candidate geographical keyword, the method further includes: All the target texts are classified based on the geographic area labels to obtain a plurality of regional text groups; the target texts in each regional text group have the same geographic area label.

6. A text label recognition device, characterized in that: include: a candidate geographic keyword determining unit, configured to determine, in response to a tag configuration request of a target text, candidate geographic keywords contained in the target text by using a preset entity recognition model; a feature vector determining unit, configured to generate a feature vector corresponding to the candidate geographic keyword based on a text interaction record corresponding to the target text and an occurrence position of the candidate geographic keyword in the target text; A text label probability calculation unit, configured to calculate the text label probability of the candidate geographic keyword based on the feature vector corresponding to the candidate geographic keyword; a geographic region label recognition unit, configured to determine the geographic region label corresponding to the target text from all the candidate geographic keywords based on the text label probability corresponding to each candidate geographic keyword; The feature vector determining unit includes: a text feature parameter group determining unit, configured to determine a text feature parameter group of the candidate geographic keyword based on the appearance position; an alias feature parameter determination unit, configured to determine a geographic alias of the candidate geographic keyword, and determine an alias feature parameter based on the number of occurrences of all the geographic aliases in the target text; An entity feature parameter determination unit, configured to identify the number of entities in the target text that are associated with the candidate geographic keyword and determine entity feature parameters; a semantic feature parameter determination unit, configured to obtain a word cloud set of the target text and determine a semantic feature parameter based on an inclusion relationship between the candidate geographic keyword and the word cloud set; a publication characteristic parameter group determining unit, configured to identify the publication information of the target text and determine a publication characteristic parameter group based on a first correlation between the publication information and the candidate geographic keyword; an interaction feature parameter group determining unit, configured to determine an interaction feature parameter group according to each of the text interaction records; a parameter encapsulation unit, configured to generate the feature vector based on the text feature parameter group, the alias feature parameter, the entity feature parameter, the semantic feature parameter, the publishing feature parameter group, and the interaction feature parameter group; The release characteristic parameter group determination unit includes: a first publication feature value determining unit, configured to determine a publication object of the target text, and calculate a first publication feature value based on a first distance value between a first geographical location associated with the publication object and a target geographical location corresponding to the candidate geographical keyword; a published text acquisition unit, configured to determine the author of the target text and acquire a plurality of published texts associated with the author; A second publication characteristic value determining unit is configured to calculate a second publication characteristic value based on a second distance value between a second geographical location corresponding to an existing geographical tag of each published text and the target geographical location; wherein the second publication characteristic value is specifically: in, publishing a characteristic value for the second; is a second distance value between the second geographical location of the i-th published text and the target geographical location; The publishing time of the target text; The publishing time of the i-th published text; is the total number of published texts; Select the function for the maximum value; The release characteristic value encapsulation unit is configured to determine the release characteristic parameter group according to the first release characteristic value and the second release characteristic value.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Keyword and topic label generation method and device, medium and electronic device

    CN110188158A

  • Geographic position prediction method and device for webpage content

    CN110795573A