Cross-border ethnic text sorting method and device integrating document subject features

By integrating knowledge representation model and text clustering algorithm in cross-border ethnic culture text sorting, the problem of cross-border ethnic culture text data sorting is solved, more efficient and accurate text sorting is achieved, and retrieval performance is improved.

CN115114400BActive Publication Date: 2025-04-11KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210735924.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-04-11
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

Due to the high similarity and similar cultural customs of cross-border ethnic cultural text data, traditional and deep learning text sorting methods are difficult to effectively sort, and the model retrieval performance is weak.

Method used

The knowledge representation model is used to expand the search text physical semantics, combine the cross-border ethnic text clustering algorithm to integrate the document theme feature information, and integrate the attention mechanism with the query text and the text to be queried to improve the text sorting efficiency.

Benefits of technology

By integrating the theme characteristics of the document, the efficiency and accuracy of text sorting are improved, and the retrieval sorting performance is improved, allowing users to more effectively retrieve cross-border ethnic cultural texts with high correlation with query text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115114400B_ABST
    Figure CN115114400B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for sorting cross-border ethnic texts that integrate document subject features, and belongs to the field of natural language processing technology. In order to solve the problem of semantic loss in cross-border ethnic text data, the present invention proposes a method for sorting cross-border ethnic texts that integrates document subject features, which mainly includes: cross-border ethnic text data preprocessing, cross-border ethnic cultural knowledge graph feature representation, cross-border ethnic cultural document subject feature extraction, cross-border ethnic text sorting method training that integrates document subject features, and cross-border ethnic cultural text sorting prediction. The present invention implements a retrieval and sorting device for cross-border ethnic cultural text data according to the above steps, which has important theoretical and practical application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for sorting cross-border ethnic texts by integrating document subject features, and belongs to the technical field of natural language processing. Background Art

[0002] Using information retrieval technology to retrieve texts with correlations between cross-border ethnic cultural texts and sorting them according to the correlation between the search text and the text to be searched is an important part of the cross-border ethnic cultural text correlation analysis. Unlike traditional text sorting, cross-border ethnic text data has high similarity and similar cultural customs, which makes the cross-border ethnic text sorting task difficult. The key to solving the cross-border ethnic text sorting is to use text retrieval technology to calculate the correlation between cross-border ethnic cultural text data. Text sorting models mainly include: traditional text sorting methods and deep learning text sorting methods. In traditional text sorting methods, the sorting result is obtained by calculating the number of keywords, keyword frequency and document frequency in the text to obtain the similarity between the search text and the text to be searched. However, the sorting result is not ideal and requires a lot of manual screening. The core idea of ​​the text sorting method based on deep learning is to vectorize the words obtained after text segmentation, use different neural networks to extract text semantic features based on text feature information, and finally obtain the text sorting result based on the similarity of text semantic features. Due to the complex semantic environment in cross-border ethnic cultural text data, both traditional text sorting methods and deep learning-based text sorting methods consider the semantic information of keywords in the retrieved text, which makes the scope of the retrieved text relatively broad and the model retrieval performance relatively weak. Summary of the invention

[0003] The present invention provides a method and device for sorting cross-border ethnic texts by integrating document subject features, so as to solve the problems that text data in the retrieved text has high similarity and cultural customs are similar. The present invention adopts a knowledge representation model to perform entity semantic expansion auxiliary text retrieval on the retrieved text, and combines a cross-border ethnic text clustering algorithm to integrate document subject feature information on the cross-border ethnic text data, thereby improving the efficiency of text sorting.

[0004] The technical solution of the present invention is: in the first aspect, a method for sorting cross-border ethnic texts by integrating document subject features is provided, and the specific steps of the method for sorting cross-border ethnic texts by integrating document subject features are as follows:

[0005] Step 1, preprocessing of cross-border ethnic text data: after filtering, screening, removing stop words and special symbols, we obtain the text data of four cross-border ethnic groups, namely Dai, Thai, Yi and Lolo, and select 20,000 sentence pairs, including 10,000 positive samples and 10,000 negative samples; use the pre-training model to train the cross-border ethnic cultural text data to obtain the text word vector representation; use the knowledge representation model to capture the entity features in the cross-border ethnic cultural knowledge graph, and use the feature fusion method to enhance the entity semantic information in the cross-border ethnic cultural text data; use the text clustering model to extract the theme feature information of the cross-border ethnic cultural text data; use the attention mechanism to fuse it with the query text and the text to be queried;

[0006] Step 2: Training of cross-border ethnic text sorting model integrating document topic features: Expand entity semantics of cross-border ethnic cultural entities in the retrieved text, and use the potential topic feature information of the text to capture the association between the retrieved text and the text to be retrieved to alleviate the problem of missing text semantics in the retrieved text; Calculate the text similarity between the query text and the text to be queried, and use the ranking learning method to calculate the correlation between the query text and the text to be queried, and finally complete the training of the cross-border ethnic text sorting model to obtain the cross-border ethnic text sorting model;

[0007] Step 3. Cross-border ethnic text retrieval and ranking prediction: Retrieve and rank the input search sentences by training the cross-border ethnic text ranking model.

[0008] As a further solution of the present invention, Step 1 includes:

[0009] Step 1.1. Use crawler technology to crawl various ethnic websites to obtain cross-border ethnic cultural text data. After screening, filtering, deduplication, and removal of special symbols, 20,000 text data pairs of Dai, Thai (Thailand), Yi, and Lolo (Vietnam) are obtained, including 10,000 positive sample data and 10,000 negative sample data, covering 28 cross-border ethnic cultural categories, and the average length of sentence pairs is 145 characters;

[0010] Step 1.2, the pre-processed cross-border ethnic culture text data is processed by sentence segmentation, and the cross-border ethnic culture sentences are segmented by using the artificially constructed cross-border ethnic culture vocabulary and word segmentation tool. The cross-border ethnic culture text data is trained with a pre-trained model to obtain word vector representation, where the cross-border ethnic culture vocabulary contains 34,117 words;

[0011] Step 1.3, use the knowledge representation model to represent the triple relationship in the cross-border ethnic cultural knowledge graph, and map the head node h and tail node t in each group of relationships in the cross-border ethnic cultural knowledge graph to a hyperplane H in a vector space; extract specific cross-border ethnic cultural entities in the search text, such as the text: "Dai's specialty food lemongrass grilled fish" can get the entities "Dai" and "lemongrass grilled fish", and use the knowledge representation model to get the vector representation of the entity: [e 傣族 ,e 香茅草烤鱼 ]. The query text is segmented using a word segmentation tool and combined with the cross-border ethnic cultural vocabulary, and the pre-trained Word2Vec model is used to embed it to obtain the vector x bow ={x 傣族 ,x 特色 ,x 美食 ,x 香茅草烤鱼 Finally, the above two feature vectors are fused by splicing to obtain X = {x 傣族 +e 傣族 ,x 特色 ,x 美食 ,x 香茅草烤鱼 +e 香茅草烤鱼}.

[0012] As a further solution of the present invention, in Step 1, the specific steps of extracting the subject feature information of cross-border ethnic cultural text data by using the text clustering model are:

[0013] Step 1.4, using the association relationship between entities and topics in the cross-border ethnic cultural text data to construct a cross-border ethnic cultural document association analysis graph, introducing a heterogeneous graph convolutional neural network and extracting the global features of the cross-border ethnic cultural text data, using a long short-term memory network to obtain the local features of the cross-border ethnic cultural text data, splicing the local features and global feature information of the cross-border ethnic cultural text into a multi-layer perceptron, and iteratively training it to obtain a cross-border ethnic cultural text clustering model;

[0014] Step 1.5: In order to obtain the topic feature information of the search text and the text to be searched, the cross-border ethnic cultural text clustering model is used to capture the potential topic feature Z in the text data, and the attention weight a is calculated by taking it as the attention vector q and the vectorized search text X. The specific calculation method is shown in the following formula; the method of integrating the topic features of the search text and the search text is the same:

[0015]

[0016]

[0017] l represents the length of the search text.

[0018] As a further solution of the present invention, in Step 1, the specific steps of using the attention mechanism to fuse it with the query text and the features of the text to be queried are:

[0019] Step 1.6. Use the CNN network and the attention mechanism network to extract local features of the text, obtain more important feature information in the cross-border ethnic cultural text data, and pass the feature information to the feedforward network to complete the first local feature extraction of the cross-border ethnic cultural text data. Perform a second feature extraction on the obtained local features, and finally use the residual network and the first extracted feature information to combine them to form a representation vector of the cross-border ethnic cultural text data.

[0020] As a further solution of the present invention, the Step 2 comprises:

[0021] (1) By obtaining the query text and the semantic representation vector V of the text to be queried query and V result , the above two vectors are calculated using cosine similarity to obtain the similarity matrix Each element is the corresponding cosine similarity;

[0022] (2) Use the Gaussian kernel function to obtain the similarity matrix M similarity The feature vectors in are mapped into high-order features, and the obtained high-order feature vectors are concatenated to calculate the correlation between the query text and the text to be retrieved. Finally, the ranking learning method is used to linearly calculate the correlation vectors of the retrieval text and the text to be retrieved, and finally sorted according to the correlation score.

[0023] In the second aspect, a device for sorting cross-border ethnic texts integrating document subject features includes the following modules:

[0024] Cross-border ethnic text data preprocessing module: used to obtain cross-border ethnic text data of Dai, Thai, Yi and Lolo; use pre-training model to train cross-border ethnic cultural text data to obtain text word vector representation; use knowledge representation model to capture entity features in cross-border ethnic cultural knowledge graph, and use feature fusion to enhance entity semantic information in cross-border ethnic cultural text data; use text clustering model to extract topic feature information of cross-border ethnic cultural text data; use attention mechanism to fuse it with query text and to-be-queried text features;

[0025] The cross-border ethnic text sorting model training module integrates the document subject features, which is used to expand the entity semantics of the cross-border ethnic cultural entities in the retrieved text, and use the potential subject feature information of the text to capture the association between the retrieved text and the text to be retrieved to alleviate the problem of missing text semantics in the retrieved text; calculate the text similarity between the query text and the text to be queried, and use the ranking learning method to calculate the correlation between the query text and the text to be queried, and finally complete the cross-border ethnic text sorting model training to obtain the cross-border ethnic text sorting model;

[0026] Cross-border ethnic text retrieval and ranking prediction module: used to retrieve and rank the input search sentences by training the cross-border ethnic text ranking model.

[0027] Cross-border ethnic cultural text retrieval and ranking deployment, first, save the cross-border ethnic text ranking model that integrates the document subject feature information, and use Flask technology to load the model into the memory to avoid the frequent model loading process caused by the request results and improve the running speed of the recognition model; then, deploy the model as an API interface through Flask technology, and then realize the function of multiple concurrent requests of the Web port; finally, call the text ranking model deployed to the server side on the Web side, and obtain the cross-border ethnic cultural text data after retrieval and ranking by entering the search sentence or search term, and finally display the obtained prediction results on the front-end interface.

[0028] The beneficial effects of the present invention are:

[0029] 1. The present invention uses the potential topic feature information of the text to capture the association relationship between texts, integrates the entity semantic information to expand the semantics of the text, and solves the problem of semantic loss in the text.

[0030] 2. The present invention uses a text clustering method to capture the subject features in text data, uses a cross-border ethnic cultural knowledge graph to achieve semantic expansion of cross-border ethnic cultural entities and obtains a semantic vector representation of cross-border ethnic cultural entities; uses a cross-border ethnic cultural graph to perform entity semantic expansion on the search text to assist text retrieval, and uses a text clustering algorithm to fuse document subject features on cross-border ethnic cultural text data, thereby improving the efficiency of text sorting and obtaining a cross-border ethnic text sorting model;

[0031] 3. The present invention integrates document subject features in the process of text retrieval and sorting to improve the retrieval and sorting performance, and can return documents with high relevance to the query text when actually retrieving cross-border ethnic cultural texts, thereby increasing users' search interest. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is the overall model diagram in the present invention;

[0033] Figure 2 It is a flowchart of the method of the present invention;

[0034] Figure 3 Schematic diagram of text feature extraction of the present invention. DETAILED DESCRIPTION

[0035] Example 1: Figure 1-Figure 3 As shown, in the first aspect, a method for sorting cross-border ethnic texts by integrating document subject features is provided, and the specific steps of the method are as follows:

[0036] Step 1, preprocessing of cross-border ethnic text data: after filtering, screening, removing stop words and special symbols, we obtain the text data of four cross-border ethnic groups, namely Dai, Thai, Yi and Lolo, and select 20,000 sentence pairs, including 10,000 positive samples and 10,000 negative samples; use the pre-training model to train the cross-border ethnic cultural text data to obtain the text word vector representation; use the knowledge representation model to capture the entity features in the cross-border ethnic cultural knowledge graph, and use the feature fusion method to enhance the entity semantic information in the cross-border ethnic cultural text data; use the text clustering model to extract the theme feature information of the cross-border ethnic cultural text data; use the attention mechanism to fuse it with the query text and the text to be queried;

[0037] Step 2, training of cross-border ethnic text sorting model integrating document topic features: expanding the entity semantics of cross-border ethnic cultural entities in the retrieval text, using the potential topic feature information of the text to capture the association between the retrieval text and the text to be retrieved to alleviate the problem of missing text semantics in the retrieval text; calculating the text similarity between the query text and the text to be queried, and using the ranking learning method to calculate the correlation between the query text and the text to be queried, and finally completing the training of the cross-border ethnic text sorting model to obtain the cross-border ethnic text sorting model.

[0038] Step 3. Cross-border ethnic text retrieval and ranking prediction: Retrieve and rank the input search sentences by training the cross-border ethnic text ranking model.

[0039] As a preferred embodiment of the present invention, the specific steps of Step 1 are:

[0040] Step 1.1. Use crawler technology to crawl various ethnic websites to obtain cross-border ethnic cultural text data. After screening, filtering, deduplication, and removal of special symbols, 20,000 text data pairs of Dai, Thai (Thailand), Yi, and Lolo (Vietnam) are obtained, including 10,000 positive sample data and 10,000 negative sample data, covering 28 cross-border ethnic cultural categories, and the average length of sentence pairs is 145 characters.

[0041] Step 1.2, the pre-processed cross-border ethnic cultural text data is processed into sentences, and the cross-border ethnic cultural sentences are segmented by using the artificially constructed cross-border ethnic cultural vocabulary and the word segmentation tool. The pre-trained model is used to train the cross-border ethnic cultural text data to obtain the word vector representation, where the cross-border ethnic cultural vocabulary contains 34,117 words.

[0042] Step 1.3 By drawing on the ideas of Wang et al., the entity semantic relationship of the cross-border ethnic cultural knowledge graph is integrated into the representation of the retrieval text, thereby enhancing the entity semantic features of the retrieval text. The TransH model is an improvement on the TransE model, and is more effective than the one-to-many relationship model of entities in the cross-border ethnic cultural knowledge graph. The knowledge representation model is used to represent the triple relationship in the cross-border ethnic cultural knowledge graph. Specifically, the TransH model maps the head node h and the tail node t in each group of relationships in the cross-border ethnic cultural knowledge graph to a hyperplane H in a vector space, and then calculates the difference between the head and tail nodes based on the translation vector on the hyperplane. By continuously adjusting h, r and t to satisfy h+r=t, where r represents the relationship vector.

[0043] Extract specific cross-border ethnic cultural entities in the search text. For example, the text "Dai ethnic group's special delicacy lemongrass grilled fish" can get the entities "Dai" and "lemongrass grilled fish". The TransH model is used to get the vector representation of the entity: 傣族 ,e 香茅草烤鱼 The query text is embedded using the jieba tool and combined with the cross-border ethnic cultural vocabulary, and the pre-trained Word2Vec model is used to embed it to obtain the vector x bow ={x 傣族 ,x 特色 ,x 美食 ,x 香茅草烤鱼}, and finally the above two feature vectors are fused by splicing to obtain X = {x 傣族 +e 傣族 ,x 特色 ,x 美食 ,x 香茅草烤鱼 +e 香茅草烤鱼}

[0044] Step 1.4: In order to capture the topic feature information of cross-border ethnic cultural texts, the word frequency statistics of each cross-border ethnic cultural text data are extracted by word frequency-inverse document frequency to process it into a representation x of length V. bow, using the association relationship between entities and topics in cross-border ethnic cultural text data to build a cross-border ethnic cultural document association analysis graph, and using a heterogeneous graph convolutional neural network to extract the global feature information of the text. For the local features of the text, the Word2vec model is used to train the cross-border ethnic cultural text data to obtain word vectors, and the word embedding representations of the query text and the text to be queried are obtained based on the word vector information. i ∈R 100 , where N represents the number of words in the title, 100 represents the word vector dimension, and the local feature representation of the text is obtained through the LSTM model. Finally, the local features and global feature information of the cross-border ethnic cultural text are spliced ​​as the input of the multi-layer perceptron, and the following formula is used as the objective function for iteration. Iterative training is performed to obtain the cross-border ethnic cultural text clustering model;

[0045] L VAE =E q(z|h) [logp(h|z)]-D KL (q(z|h)||p(z))

[0046] Step 1.5: In order to obtain the topic feature information of the search text and the text to be searched, the cross-border ethnic cultural text clustering model is used to capture the potential topic feature Z in the text data, and finally the potential topic feature Z of the cross-border ethnic cultural text data is obtained.

[0047] The potential topic feature Z of the text is used as the attention vector q, and the weight is calculated with the search text X that has been vectorized to obtain a. Then, the vector representations of the current search text and the text to be searched are fused. The specific calculation method is as follows:

[0048]

[0049]

[0050] Where l represents the length of the search text. The search text does not perform the text entity semantic feature enhancement step. It is embedded by using the pre-trained Word2Vec model to obtain the vector x bow Then, the above two formulas are used to fuse the document topic features of the to-be-retrieved text to obtain the feature vector representation T of the to-be-retrieved text of the document topic to be fused.

[0051] As a preferred solution of the present invention, in Step 1, the specific steps of using the attention mechanism to fuse it with the query text and the features of the text to be queried are:

[0052] Step 1.6, the embedding representations of the retrieved text (query text) and the text to be retrieved (query text) are: Where n represents the length of the cross-border ethnic cultural text data, and v represents the embedding length; Figure 3 As shown, the obtained embedding vector D i and T j Through the CNN network, the CNN network is combined with the attention mechanism network to extract local features of the text, obtain more important feature information in the cross-border ethnic cultural text data, and pass the feature information to the feedforward network to complete the first local feature extraction of the cross-border ethnic cultural text data. The obtained local features are subjected to a second feature extraction, and finally the residual network and the first extracted feature information are combined to form a representation vector of the cross-border ethnic cultural text data.

[0053] V i '=fn(SelfAttention(CNN(D i )))

[0054] V j '=fn(SelfAttention(CNN(T j )))

[0055] V i ”=fn(SelfAttention(CNN(V i ')))

[0056] V j ”=fn(SelfAttention(CNN(V j ')))

[0057] V query =V i '+V i ”

[0058] V result =V j '+V j ”

[0059] Among them, V represents the fused feature information.

[0060] As a further solution of the present invention, Step 2 includes:

[0061] (1) The feature vector V of the retrieved text i and V j Perform cosine similarity calculation to obtain the text similarity matrix The specific formula is as follows:

[0062]

[0063] in Represents the i-th row element in the query text, Represents the j-th column element in the text to be retrieved.

[0064] (2) The Kernel Pooling technique proposed by Cui et al. is used to pool the similarity matrix M using N Gaussian kernels. similarity The feature vector in is mapped into high-order features, and finally an N-dimensional feature is obtained.

[0065]

[0066] Among them, μ k represents the mean of the kth Gaussian kernel, δ k Represents the parameters corresponding to the kth Gaussian kernel.

[0067] The obtained feature vector After concatenation, the correlation feature vector between the query text and the text to be retrieved is calculated. The specific concatenation process is as follows:

[0068]

[0069] Among them, φ(M)∈N×l max , l max Represents the maximum width of the convolution kernel. The calculation formula for the relevance score between the query text and the text to be retrieved is as follows:

[0070]

[0071] Among them, w r and b r These are all hyperparameters during training, and tanh(.) is the activation function. During the model training process, Pointwise loss is used to train the model, and its calculation formula is as follows:

[0072]

[0073] Among them, n represents the number of texts to be retrieved, x i Represents the true label of the i-th text to be retrieved. The above formula is used to calculate the correlation score between the query text and the text to be retrieved, and the top 2000 data with the highest correlation score are selected as the query results of cross-border ethnic cultural text retrieval.

[0074] In order to illustrate the effectiveness of the present invention, the present invention conducted the following comparative experiments, including: 20,000 sentence pairs, including 10,000 positive sample data and 10,000 negative sample data, the average length of each sentence is 145, and Table 1 is a sample description of the model training process.

[0075] Table 1 Experimental data format

[0076]

[0077] Table 2 shows the parameter settings during model training:

[0078] Table 2 Model parameter settings

[0079]

[0080] In order to verify the performance of the text sorting proposed in the present invention, the evaluation index of the cross-border ethnic text sorting model integrating document topic features mainly adopts MAP (Mean Average Precision), and the calculation method is as follows:

[0081]

[0082] Among them, Q represents the number of query texts, and its value is set to 2 in the experiment; k represents the position of the search result in the result list, P(k) represents the accuracy of the first k query results in the search text; rel(k) represents the relevance between the search text at the kth position and the query text, if relevant rel(k) = 1, irrelevant rel(k) = 0.

[0083] Experiment 1: Baseline model comparison experiment

[0084] In order to verify the effectiveness of the model, this paper selects four baseline models for comparison on cross-border ethnic cultural text data, as shown in Table 3.

[0085] MatchPyramid: Pang et al. proposed in 2016 to calculate text by similarity and construct a similarity matrix, and then extract feature information through convolution.

[0086] ESIM: Chen et al. proposed a model based on BiLSTM and Attention mechanism in 2016, which has good text matching effect.

[0087] K-nrm: Xiong et al. proposed a neural ranking model based on convolutional kernels in 2017.

[0088] Conv-knrm: Dai et al. proposed the Conv-knrm model in 2018 to consider word expressions at the n-gram level and capture more subtle entity semantics through convolution.

[0089] Table 3 Comparative experimental results

[0090]

[0091] According to Table 3, the text model has better performance than the baseline models based on semantic similarity calculation and interaction-based baseline models. Compared with the baseline model Conv-knrm of the present invention, the model of the present invention semantically expands the entities in the query text and fully matches the semantic information of the text. In addition, the method proposed by the present invention optimizes the sorting of the retrieved text. However, the Conv-knrm model only interacts with the n-gram model features in the data. For the problem of polysemy in cross-border ethnic text data, this method will cause feature semantic information drift, thereby failing to capture the association between texts.

[0092] Among the baseline models, the retrieval ranking performance of the K-nrm model is poor. The reason for this phenomenon is that the K-nrm model directly interacts between word vectors for cross-border ethnic text data, and the performance of the model depends entirely on the quality of the word vectors. Cross-border ethnic culture belongs to a specific field, which contains a large number of professional terms. The word vector library of the general field cannot identify professional terms. Compared with the MatchPyramid model with better performance, this model constructs a similarity matrix between words and uses a CNN model to extract local features from the similarity matrix. However, it ignores the relationship between words and text representations.

[0093] In summary, the performance of the cross-border ethnic text sorting model that integrates document topic features proposed in the present invention is better than other baseline models, which proves that integrating document topic features in the process of text retrieval and sorting can improve the retrieval and sorting performance, effectively improve the robustness of the model, and actually retrieve cross-border ethnic cultural texts. When returning documents with a high degree of relevance to the query text, it can increase users' search interest.

[0094] Experiment 2: Ablation experiment

[0095] This experiment is to verify the effectiveness of each model in the model proposed in the present invention. The specific results are shown in Table 4.

[0096] -Attention: means not using the Attention network for feature extraction.

[0097] -TransH: means no entity semantics enhancement is performed on the query text.

[0098] -Residual network: It means that residual connection is not used and only local features of text data are extracted.

[0099] Table 4 Ablation experiment results

[0100]

[0101] As can be seen from Table 4, when a part of the model is removed, the model performance is reduced. In the case of "-residual network", the performance of the experimental model is reduced by 1.5% compared with the model of the present invention. This is because the residual network can ensure that more feature information is retained in the representation of cross-border ethnic text data, while when the residual network is removed, it is easy to cause too much information loss, resulting in a decrease in model performance. In the case of "-Attention", the model performance is reduced by 2.1%. The emergence of this phenomenon also proves that the use of the attention mechanism to extract local features of cross-border ethnic cultural texts is effective. In addition, in the case of "-TransH", the model performance is most significantly reduced, and the value of MAP@2 is reduced by 5.1%. This is because the entity semantics in cross-border ethnic culture is relatively complex. Only the features of word-level information in the baseline model are used to extract, which is easy to cause the loss of entity semantic information, and the relationship between cross-border ethnic groups cannot be obtained. It is worth noting that when the "-document topic feature" module is removed, the performance of the retrieval ranking model is reduced by 1.8%. This phenomenon strongly verifies that the article idea can well integrate the topic feature information of the document, which is beneficial to the subsequent text sorting work and improves the performance of sorting learning.

[0102] Experiment 3: Comparison of model retrieval effects

[0103] The present invention conducted a third experiment to verify the retrieval performance of the model of the present invention, and the specific results are shown in Table 5.

[0104] Table 5 Visualization of model retrieval effect

[0105]

[0106] As can be seen from Table 5, for the cross-border ethnic cultural text retrieval task, the traditional text retrieval method and the method proposed in the present invention have achieved good results. However, due to the expansion of cross-border ethnic cultural entity semantic information in the model of the present invention, for the complex entity semantics in the cross-border ethnic cultural text data, only using ordinary models cannot find the association relationship between texts. For example, the traditional retrieval method in Table 5 only contains texts with the keyword "Water Splashing Festival" in the search results for the query text "Dai Water Splashing Festival", but the model of the present invention can retrieve texts containing keywords such as "Songkran Festival" and "Dai New Year". At the same time, it also proves the correctness of the model of the present invention to use the cross-border ethnic cultural knowledge graph to expand the entity semantics of the query text.

[0107] According to the concept of the present invention, the present invention also provides a method and device for sorting cross-border ethnic texts by integrating document subject features, including the following modules:

[0108] Cross-border ethnic text data preprocessing module: used to obtain cross-border ethnic text data of Dai, Thai, Yi and Lolo; use pre-training model to train cross-border ethnic cultural text data to obtain text word vector representation; use knowledge representation model to capture entity features in cross-border ethnic cultural knowledge graph, and use feature fusion to enhance entity semantic information in cross-border ethnic cultural text data; use text clustering model to extract topic feature information of cross-border ethnic cultural text data; use attention mechanism to fuse it with query text and to-be-queried text features;

[0109] The cross-border ethnic text sorting model training module integrates the document subject features, which is used to expand the entity semantics of the cross-border ethnic cultural entities in the retrieved text, and use the potential subject feature information of the text to capture the association between the retrieved text and the text to be retrieved to alleviate the problem of missing text semantics in the retrieved text; calculate the text similarity between the query text and the text to be queried, and use the ranking learning method to calculate the correlation between the query text and the text to be queried, and finally complete the cross-border ethnic text sorting model training to obtain the cross-border ethnic text sorting model;

[0110] Cross-border ethnic text retrieval and ranking prediction module: used to retrieve and rank the input search sentences by training the cross-border ethnic text ranking model.

[0111] In a feasible implementation manner, the cross-border ethnic text data preprocessing module is further used to:

[0112] We crawled various ethnic websites through crawler technology to obtain cross-border ethnic cultural text data. After screening, filtering, deduplication, and removal of special symbols, we obtained 20,000 pairs of Dai, Thai, Yi, and Lolo text data, including 10,000 positive sample data and 10,000 negative sample data, covering 28 cross-border ethnic cultural categories. The average length of the sentence pairs is 145 characters.

[0113] The pre-processed cross-border ethnic culture text data is processed into sentences, and the cross-border ethnic culture sentences are segmented using the artificially constructed cross-border ethnic culture vocabulary and word segmentation tools. The cross-border ethnic culture text data is trained using a pre-trained model to obtain word vector representation;

[0114] The knowledge representation model is used to represent the triple relationship in the cross-border ethnic culture knowledge graph, and the head node h and the tail node t in each group of relationships in the cross-border ethnic culture knowledge graph are mapped to a hyperplane H in a vector space; specific cross-border ethnic cultural entities in the retrieval text are extracted, and the vector representation of the entity is obtained using the knowledge representation model; the word segmentation tool is used for the query text, combined with the word segmentation of the cross-border ethnic culture field vocabulary, and the pre-trained Word2Vec model is used to embed it to obtain the vector representation; finally, the above two feature vectors are fused by splicing.

[0115] Cross-border ethnic cultural text retrieval and ranking deployment, first, save the cross-border ethnic text ranking model that integrates the document subject feature information, and use Flask technology to load the model into the memory to avoid the frequent model loading process caused by the request results and improve the running speed of the recognition model; then, deploy the model as an API interface through Flask technology, and then realize the function of multiple concurrent requests of the Web port; finally, call the text ranking model deployed to the server side on the Web side, and obtain the cross-border ethnic cultural text data after retrieval and ranking by entering the search sentence or search term, and finally display the obtained prediction results on the front-end interface.

[0116] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

Claims

1. A cross-border ethnic text sorting method integrating document subject features, characterized by: The specific steps of the cross-border ethnic text sorting method integrating document subject features are as follows: Step 1, preprocessing of cross-border ethnic text data: obtain text data of four cross-border ethnic groups, namely Dai, Thai, Yi and Lolo; use pre-training model to train cross-border ethnic cultural text data to obtain text word vector representation; use knowledge representation model to capture entity features in cross-border ethnic cultural knowledge graph, and use feature fusion to enhance entity semantic information in cross-border ethnic cultural text data; use text clustering model to extract thematic feature information of cross-border ethnic cultural text data; Use the attention mechanism to fuse it with the query text and the features of the text to be queried; Step 2: Training of cross-border ethnic text sorting model integrating document topic features: Expand entity semantics of cross-border ethnic cultural entities in the retrieved text, and use the potential topic feature information of the text to capture the association between the retrieved text and the text to be retrieved to alleviate the problem of missing text semantics in the retrieved text; Calculate the text similarity between the query text and the text to be queried, and use the ranking learning method to calculate the correlation between the query text and the text to be queried, and finally complete the training of the cross-border ethnic text sorting model to obtain the cross-border ethnic text sorting model; Step 3: Cross-border ethnic text search and ranking prediction: Retrieve and rank the input search sentences by training the cross-border ethnic text ranking model; The Step 1 includes: Step 1.

1. Use crawler technology to crawl various ethnic websites to obtain cross-border ethnic cultural text data. After screening, filtering, deduplication, and removal of special symbols, 20,000 text data pairs of Dai, Thai, Yi, and Lolo were obtained, including 10,000 positive sample data and 10,000 negative sample data, covering 28 cross-border ethnic cultural categories. The average length of the sentence pairs is 145 characters. Step 1.2, the pre-processed cross-border ethnic culture text data is processed into sentences, and the cross-border ethnic culture sentences are segmented by using the artificially constructed cross-border ethnic culture vocabulary and word segmentation tools, and the cross-border ethnic culture text data is trained with a pre-trained model to obtain word vector representation; Step 1.3, use the knowledge representation model to represent the triple relationship in the cross-border ethnic culture knowledge graph, and map the head node h and tail node t in each group of relationships in the cross-border ethnic culture knowledge graph to a hyperplane H in a vector space; extract specific cross-border ethnic cultural entities in the search text, and use the knowledge representation model to obtain the vector representation of the entity; use the word segmentation tool for the query text and combine it with the cross-border ethnic culture field vocabulary to segment the query text, and use the pre-trained Word2Vec model to embed it to obtain the vector representation; finally, use the splicing method to merge the above two feature vectors; In Step 1, the specific steps of extracting the subject feature information of cross-border ethnic cultural text data by using the text clustering model are: Step 1.4, using the association relationship between entities and topics in the cross-border ethnic cultural text data to construct a cross-border ethnic cultural document association analysis graph, introducing a heterogeneous graph convolutional neural network and extracting the global features of the cross-border ethnic cultural text data, using a long short-term memory network to obtain the local features of the cross-border ethnic cultural text data, splicing the local features and global feature information of the cross-border ethnic cultural text into a multi-layer perceptron, and iteratively training it to obtain a cross-border ethnic cultural text clustering model; Step 1.5: In order to obtain the topic feature information of the search text and the text to be searched, the cross-border ethnic cultural text clustering model is used to capture the potential topic feature Z in the text data, and the attention weight a is calculated by taking it as the attention vector q and the vectorized search text X. The specific calculation method is shown in the following formula; the method of integrating the topic features of the search text and the search text is the same: l represents the length of the search text; In Step 1, the specific steps of using the attention mechanism to fuse it with the query text and the features of the text to be queried are: Step 1.

6. Use the CNN network and the attention mechanism network to extract local features of the text, obtain more important feature information in the cross-border ethnic cultural text data, and pass the feature information to the feedforward network to complete the first local feature extraction of the cross-border ethnic cultural text data. Perform a second feature extraction on the obtained local features, and finally use the residual network and the first extracted feature information to combine them to form a representation vector of the cross-border ethnic cultural text data.

2. The cross-border ethnic text sorting method integrating document subject features according to claim 1 is characterized in that: The Step 2 includes: (1) By obtaining the query text and the semantic representation vector V of the text to be queried query and V result , the above two vectors are calculated using cosine similarity to obtain the similarity matrix Each element is the corresponding cosine similarity; (2) Use the Gaussian kernel function to obtain the similarity matrix M similarity The feature vectors in are mapped into high-order features, and the obtained high-order feature vectors are concatenated to calculate the correlation between the query text and the text to be retrieved. Finally, the ranking learning method is used to linearly calculate the correlation vectors of the retrieval text and the text to be retrieved, and finally sorted according to the correlation score.

3. A cross-border ethnic text sorting device integrating document subject features, characterized in that: The method comprises a module for executing the method according to any one of claims 1 to 2.