A method and related device for determining core words

A supervised training method enhances core word identification in text by using a word weight model with fusion vectors to adjust parameters based on label differences, improving recognition accuracy.

CN113705214BActive Publication Date: 2025-07-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110301838.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-22
Publication Date
2025-07-15
Estimated Expiration
2041-03-22

AI Technical Summary

Technical Problem

In the prior art, the core word recognition method for word frequency statistics based on global corpus of text has a low accuracy rate and is difficult to meet expectations.

Method used

The word weight model with supervision training is adopted, and the text module, word module and fusion module are used to generate text fusion vectors using fusion tensors, and the parameters are adjusted in combination with word labels to improve the accuracy of core word recognition.

Benefits of technology

It improves the accuracy of core word recognition and can more accurately identify core words in the text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113705214B_ABST
    Figure CN113705214B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method for determining core words and related devices. Based on further highlighting the relevant information of word vectors and text vectors through a fusion tensor, a processing device can, in combination with blockchain technology and artificial intelligence technology, perform supervised training on an initial word weight model for determining word weight parameters through the differences in word tags and word weight parameters, so as to improve the accuracy of the determined word weight parameters by adjusting the parameters of the initial word weight model, enabling the word weight model obtained through supervised training to accurately identify core words in the text and improve the recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and particularly to a method for determining core words and related devices. Background Art

[0002] The core words in a text can reflect the core semantic components of the text. For example, for the title word weights task of title-like texts, it is the main way to identify the core semantic components of sentences and eliminate the influence of redundant components.

[0003] How to accurately identify the core words in a text is an urgent problem to be solved. Most of the related technologies use statistical methods to complete, and statistics are unsupervised methods. Representative methods include term frequency–inverse document frequency (TF-IDF), mutual information (MI), etc.

[0004] Statistical methods mainly perform word frequency statistics based on the global corpus of the text, considering relatively single data dimensions, and it is difficult to meet the expected accuracy in identifying core words in the text. Summary of the Invention

[0005] To solve the above technical problems, embodiments of this application provide a method for determining core words and related devices, enabling the word weight model obtained through supervised training to accurately identify the core words in the text and improve the identification accuracy.

[0006] Embodiments of this application disclose the following technical solutions:

[0007] In a first aspect, embodiments of this application disclose a method for determining core words, and the method includes:

[0008] Obtain a training sample including a sample text and a word label of a sample word segmentation, where the sample word segmentation is one of multiple word segmentations of the sample text, and the word label is used to identify whether the sample word segmentation is a core word of the sample text;

[0009] Use the training sample as input data of an initial word weight model for model training. The initial word weight model includes a text module, a word module, and a fusion module. The text module is used to extract the text vector of the sample text, the word module is used to extract the word vector of the sample word segmentation, and the fusion module is used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor;

[0010] Obtain the word weight parameter determined according to the text fusion vector through the initial word weight model, where the word weight parameter is used to identify the probability that the sample word segmentation belongs to the core word of the sample text;

[0011] Adjust the parameters of the fusion tensor according to the difference between the word weight parameter and the word label;

[0012] Identify the core words in the target text through the trained word weight model.

[0013] In a second aspect, an embodiment of the present application discloses a core word determination device, which includes a first acquisition unit, a training unit, a second acquisition unit, a parameter adjustment unit, and an identification unit:

[0014] The first acquisition unit is configured to acquire a training sample including a sample text and a word label of a sample word segmentation, where the sample word segmentation is one of multiple word segmentations of the sample text, and the word label is used to identify whether the sample word segmentation is the core word of the sample text;

[0015] The training unit is configured to use the training sample as input data of an initial word weight model for model training. The initial word weight model includes a text module, a word module, and a fusion module. The text module is configured to extract a text vector of the sample text, the word module is configured to extract a word vector of the sample word segmentation, and the fusion module is configured to generate a text fusion vector according to the text vector and the word vector through a fusion tensor;

[0016] The second acquisition unit is configured to obtain, through the initial word weight model, a word weight parameter determined according to the text fusion vector, where the word weight parameter is used to identify the probability that the sample word segmentation belongs to the core word of the sample text;

[0017] The parameter adjustment unit is configured to adjust the parameters of the fusion tensor according to the difference between the word weight parameter and the word label;

[0018] The identification unit is configured to identify the core words in the target text through the trained word weight model.

[0019] In a third aspect, an embodiment of the present application discloses a core word determination method, and the method includes:

[0020] Obtain a target text including multiple word segmentations;

[0021] Determine the text vector of the target text and the word vector of the target word segment through a word weight model, where the target word segment is one of the multiple word segments, and the word weight model includes a text module, a word module, and a fusion module. The text module is used to extract the text vector of the target text, the word module is used to extract the word vector of the target word segment, and the fusion module is used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor;

[0022] According to the text fusion vector generated based on the fusion module, determine the word weight parameter of the target word segment through the word weight model. The word weight parameter is used to identify the probability that the target word segment belongs to the core word of the target text. The fusion tensor is used to enhance the context information of the target word segment in the target text in the word vector when generating the text fusion vector;

[0023] Determine whether the target word segment is the core word of the target text according to the word weight parameter.

[0024] In a fourth aspect, an embodiment of the present application discloses a core word determination device, which includes a third acquisition unit, a first determination unit, a second determination unit, and a third determination unit:

[0025] The third acquisition unit is used to acquire a target text including multiple word segments;

[0026] The first determination unit is used to determine the text vector of the target text and the word vector of the target word segment through a word weight model, where the target word segment is one of the multiple word segments, and the word weight model includes a text module, a word module, and a fusion module. The text module is used to extract the text vector of the target text, the word module is used to extract the word vector of the target word segment, and the fusion module is used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor;

[0027] The second determination unit is used to determine the word weight parameter of the target word segment through the word weight model according to the text fusion vector generated based on the fusion module. The word weight parameter is used to identify the probability that the target word segment belongs to the core word of the target text. The fusion tensor is used to enhance the context information of the target word segment in the target text in the word vector when generating the text fusion vector;

[0028] The third determination unit is used to determine whether the target word segment is the core word of the target text according to the word weight parameter.

[0029] Fifth aspect, an embodiment of the present application discloses a computer device, which includes a processor and a memory:

[0030] The memory is used to store program code and transmit the program code to the processor;

[0031] The processor is used to execute the core word determination method described in the first aspect or the third aspect according to the instructions in the program code.

[0032] Sixth aspect, an embodiment of the present application discloses a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the data processing method described in the first aspect or the third aspect.

[0033] It can be seen from the above technical solutions that in order to improve the accuracy of core word determination, a training sample including the sample text and the sample word segmentation of this tag can be obtained. The sample word segmentation is one of the multiple word segmentations corresponding to the sample text, and the word tag can be used to identify whether the sample word segmentation is the core word of the sample text. Thus, when training the initial word weight model for determining the word weights, this training sample can be used as the input data of the initial word weight model for supervised training. Among them, the initial word weight model includes a text module, a word module, and a fusion module. The text module and the word module are respectively used to extract the text vector of the sample text and the word vector of the sample word segmentation. The fusion module can be used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor. In this fusion process, the text vector and the word vector can respectively learn some information about themselves in each other, so that the relevant information of the sample word segmentation and the sample text can be further highlighted in the text fusion vector. During the training process, the word weight parameters determined according to the text fusion vector can be obtained first through the initial word weight model, and the word weight parameters are used to identify the probability that the sample word segmentation belongs to the core word of the sample text. Thus, through the difference between the word weight parameters and the word tags, the parameters of the fusion tensor can be adjusted, and further the initial word weight model can learn how to accurately determine the word weight parameters corresponding to the word segmentations. Therefore, the word weight model obtained through this training can accurately identify the core words in the target text and improve the recognition accuracy of the core words. Description of the Drawings

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0035] Figure 1Schematic diagram of a method for determining core words in an actual application scenario provided by an embodiment of the present application;

[0036] Figure 2 Flowchart of a method for determining core words provided by an embodiment of the present application;

[0037] Figure 3 Schematic diagram of a method for determining core words in an actual application scenario provided by an embodiment of the present application;

[0038] Figure 4 Schematic diagram of a method for determining core words provided by an embodiment of the present application;

[0039] Figure 5 Schematic diagram of a method for determining core words provided by an embodiment of the present application;

[0040] Figure 6 Structure block diagram of a device for determining core words provided by an embodiment of the present application;

[0041] Figure 7 Structure block diagram of a device for determining core words provided by an embodiment of the present application;

[0042] Figure 8 Structure diagram of a computer device provided by an embodiment of the present application;

[0043] Figure 9 Structure diagram of a server provided by an embodiment of the present application. Detailed implementation manners

[0044] The embodiments of the present application will be described below with reference to the accompanying drawings.

[0045] Identifying the core words in the text is a common means for text analysis and processing, and the accuracy of core word recognition directly affects the rationality of text processing. In the related art, an unsupervised method is usually adopted for core word recognition, such as directly counting the frequency of word segmentation in the text, etc. The recognition logic of this unsupervised recognition method is too single, and the accuracy of core word recognition is poor.

[0046] To solve the above technical problems, the embodiments of the present application provide a method and related device for determining core words. The processing device can, on the basis of further highlighting the relevant information of word vectors and text vectors through the fusion tensor, supervise and train the initial word weight model for determining the word weight parameters through the differences in word tags and word weight parameters, so as to improve the accuracy of the determined word weight parameters by adjusting the parameters of the initial word weight model, so that the word weight model obtained through supervised training can accurately identify the core words in the text and improve the recognition accuracy.

[0047] It can be understood that this method can be applied to a processing device, which is a processing device with the function of determining core words, such as a terminal device or a server with the function of determining core words. This method can be independently executed by a terminal device or a server, and can also be applied to a network scenario where a terminal device and a server communicate, and runs through the cooperation of the terminal device and the server. Among them, the terminal device can be a device such as a mobile phone, a desktop computer, a personal digital assistant (Personal Digital Assistant, PDA for short), or a tablet computer. The server can be understood as an application server or a Web server. In actual deployment, the server can be an independent physical server or a server cluster or distributed system composed of multiple physical servers. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and this application does not limit this here.

[0048] The embodiments of this application can also apply blockchain technology. For example, in the core word determination method disclosed in this application, multiple servers can be used for processes such as model training. Among them, multiple servers can form a blockchain, and the server is a node on the blockchain.

[0049] In addition, this application also relates to artificial intelligence (AI) technology. Artificial intelligence uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, and is a theory, method, technology, and application system that perceives the environment, acquires knowledge, and uses knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning, and decision-making.

[0050] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, including both hardware-level technologies and software-level technologies. Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. Among them, this application mainly relates to natural language processing technology and machine learning technology.

[0051] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between humans and computers in natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, the research in this field will involve natural language, that is, the language people use in daily life, so it has a close connection with the research of linguistics. Natural language processing technologies usually include text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.

[0052] Machine Learning (ML) is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specializes in studying how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning.

[0053] In the embodiments of the present application, the processing device can obtain training samples through natural language processing technology, and can perform word segmentation processing on the obtained target text. Through machine learning technology, the initial word weight model can be supervised training, so that the trained word weight model can accurately identify core words.

[0054] To facilitate the understanding of the technical solution provided by the present application, next, a method for determining core words provided in the embodiments of the present application will be introduced in combination with an actual application scenario.

[0055] See Figure 1 , Figure 1 FIG. is a schematic diagram of a method for determining core words in an actual application scenario provided in the embodiments of the present application. In this actual application scenario, the processing device is a server 101 with the function of determining core words.

[0056] Server 101 can obtain the input training samples, which include sample texts, sample word segmentations, and word labels corresponding to the sample word segmentations. The word labels are used to identify whether the sample word segmentations are the core words of the sample text, where the core word refers to the word segmentation that can best reflect the core semantics of the text among multiple word segmentations corresponding to the text. Server 101 can use the training samples as input data for the initial word weight model for training. The initial word weight model is used to identify core words by determining word weight parameters corresponding to each word segmentation in the text. The word weight parameters are used to identify the probability that the word segmentation belongs to the core word of the text. Since the word labels can identify whether the sample word segmentations are core words, Server 101 can use the sample text and sample word segmentations as training samples and the word labels as training labels to perform supervised training on the initial word weight model.

[0057] Among them, the initial word weight model includes a text module, a word module, and a fusion module. The text module can extract a text vector based on the sample text. The word module can extract a word vector based on the sample word segmentation. The fusion module can fuse tensors and generate a text fusion vector by fusing the text vector and the word vector. During the vector fusion process, the text vector and the word vector can learn some information related to themselves from each other. Thus, through the text fusion vector, the initial word weight model can better obtain the context information of the sample word segmentation in the sample text. Furthermore, Server 101 can obtain word weight parameters with higher accuracy determined according to the text fusion vector through the initial word weight model. The word weight parameters can be used to identify the probability that the sample word segmentation belongs to the core word of the sample text.

[0058] Through the difference between the word weight parameters and the word labels, Server 101 can obtain the error of the initial word weight model in identifying the core words of the sample text. Therefore, Server 101 can adjust the parameters of the fusion tensor according to the difference, so that the word weight parameters determined based on the fusion tensor can be closer to the word labels of the sample word segmentations. Thus, through this supervised training process, Server 101 can improve the accuracy of the initial word weight model in determining word weight parameters. Based on this, the server can accurately identify the core words of the text by using the word weight model obtained through supervised training.

[0059] Next, in combination with the accompanying drawings, a method for determining core words provided by an embodiment of the present application will be introduced.

[0060] See Figure 2 , Figure 2 which is a signaling diagram of a method for determining core words provided by an embodiment of the present application. The method includes:

[0061] S201: Obtain a training sample including a sample text and word labels of sample word segmentations.

[0062] Among them, the sample text can be any sample including multiple word segments. The sample word segment can be one of the multiple word segments of the sample text. The word tag is used to identify whether the sample word segment is the core word of the sample text. The core word refers to the word segment that can best reflect the core semantics among the multiple word segments corresponding to the text. For example, in a text "I have lunch at 10 o'clock today", the word segments "I", "today", "10 o'clock", and "have lunch" can be obtained, and the core word can be "have lunch".

[0063] Specifically, in order to improve the integrity of the training samples, the training samples can be divided into positive samples and negative samples. A positive sample refers to a training sample in which the word tag indicates that the sample word segment is the core word, and a negative sample refers to a training sample in which the word tag indicates that the sample word segment is not the core word. Thus, through positive samples and negative samples, the processing device can train the initial word weight model in multiple training directions, enabling the model to more accurately learn how to identify the core words in the text.

[0064] S202: Use the training samples as the input data of the initial word weight model for model training.

[0065] In order to accurately identify the core words, the processing device can introduce a supervised recognition method. For example, a supervised model can be used for recognition. First, the processing device can obtain the initial word weight model, and then use a supervised method to train the initial word weight model to improve its accuracy in identifying the core words. The initial word weight model has a certain ability to identify the core words.

[0066] Among them, the initial word weight model includes a text module, a word module, and a fusion module. During the training process, the text module can be used to extract the text vector of the sample text, and the text vector can express the text semantics of the sample text in the vector dimension; the word module can be used to extract the word vector of the sample word segment, and the word vector can express the word semantics of the sample word segment in the vector dimension. Thus, based on the word vector and the text vector, the initial word weight model can calculate the weight of the sample word segment in the sample text based on multiple dimensions such as semantics, and the weight can reflect the probability that the semantics of the sample word segment belongs to the core semantics of the sample text.

[0067] In order to further improve the recognition accuracy of the initial word weight model, in the embodiments of the present application, the processing device may set a fusion module in the initial word weight model. The fusion module can be used to generate a text fusion vector based on the text vector and the word vector by fusing tensors, and the text fusion vector is used to reflect the correlation between the word vector and the text vector. In this fusion process, the word vector and the text vector are not directly fused, but the fusion tensor in the initial word weight model is combined, and the fusion tensor can make the fusion process more prominent in the correlation between the word vector and the text vector. Through the vector fusion process combined with the fusion tensor, the processing device can enable the word vector and the text vector to better learn the information related to each other in each other. From the perspective of the word vector, the processing device can enable the word vector to learn the context information related to itself in the text vector; from the perspective of the text vector, the processing device can further highlight the part of the information related to the word vector in the text vector.

[0068] Thus, based on the text fusion vector, the initial word weight model can more accurately segment the correlation between the word vector and the text vector, and further can more accurately determine the weight of the sample segmentation in the sample text, and finally identify a more accurate core word.

[0069] S203: Obtain the word weight parameter determined according to the text fusion vector through the initial word weight model.

[0070] Among them, the word weight parameter is used to identify the probability that the sample segmentation belongs to the core word of the sample text. When the initial word weight model analyzes based on the text fusion vector, if it is analyzed that the semantic similarity between the word vector and the overall semantic of the text vector is higher, it means that the sample segmentation can better reflect the core semantics of the sample text, and the determined word weight parameter is larger. The larger the word weight parameter, the higher the probability that the sample segmentation belongs to the core word of the sample text.

[0071] S204: Adjust the parameters of the fusion tensor according to the difference between the word weight parameter and the word label.

[0072] As mentioned above, the word label can be used to identify whether the sample segmentation is the core word of the sample text, and the word weight parameter can be used to identify the probability that the sample segmentation belongs to the core word of the sample text. Therefore, through the difference between the word weight parameter and the word label, the error of the initial word weight model in determining the word weight parameter can be reflected. Thus, in order to improve the determination accuracy of the word weight parameter, the processing device can adjust the relevant parameters in the initial word weight model based on this error.

[0073] Among them, the word weight parameter is determined based on the text fusion vector. When generating the text fusion vector, since the processing device does not directly fuse the word vector and the text vector, but adds a fusion tensor as a parameter for determining the text fusion vector, therefore, when adjusting the parameter, the processing device can also adjust the parameter of the fusion tensor in the reverse direction, so that the fusion module can fuse the word vector and the text vector more reasonably, and further make the relevant information of the word vector and the text vector more prominent in the text fusion vector. Based on this, after adjusting the parameter of the fusion tensor, the processing device can obtain a text fusion vector with more effective information, improving the determination accuracy of the word weight model for the word weight parameter after training.

[0074] S205: Identify the core words in the target text through the word weight model obtained by training.

[0075] Among them, the target text can be any text including multiple word segments. Since the word weight model obtained by training already has relatively accurate core word recognition ability after adjusting the parameter of the fusion tensor, the processing device can apply the word weight model to the subsequent core word recognition process. The following will introduce this application process in detail.

[0076] S206: Obtain the target text including multiple word segments.

[0077] S207: Determine the text vector of the target text and the word vector of the target word segment through the word weight model.

[0078] Among them, the target word segment can be one of the multiple word segments. The word weight model includes a text module, a word module, and a fusion module. The text module is used to extract the text vector of the target text, the word module is used to extract the word vector of the target word segment. The text vector is used to express the semantics of the target text from the dimension of the vector, and the word vector is used to express the semantics of the target word segment from the dimension of the vector. The fusion module is used to generate a text fusion vector according to the text vector and the word vector through the fusion tensor.

[0079] S208: Determine the word weight parameter of the target word segment through the word weight model according to the text fusion vector generated by the fusion module.

[0080] Through vector fusion, the text vector and the word vector can learn information related to themselves from each other, and the fusion tensor can further improve the fusion effect of this vector fusion. For example, this fusion tensor can be used to, when generating the text fusion vector, enhance the context information of the target token in the target text in the word vector based on the text vector, and this context information helps the word weight model to more accurately understand the semantics of the target token. For example, in a text "How to get a higher score in Game A", if the target token is "Game A", then through the fusion tensor, the context information such as "in" and "get a higher score" can be incorporated into the word vector, enabling the word weight model to better understand the semantics of "Game A".

[0081] Through the above process, the text fusion vector can not only reflect the semantics of the word vector and the text vector themselves, but also reflect the correlation information between the word vector and the text vector. Thus, based on the text fusion vector determined by the fusion tensor, the word weight model can more accurately determine the word weight parameter corresponding to the target token, and this word weight parameter is used to indicate the probability that the target token belongs to the core word of the target text.

[0082] As Figure 4 shown Figure 4 shows a schematic diagram of determining the word weight parameter through the word weight model. Among them, encoder1 and encoder2 are two encoders, which are used as the text module and the word module respectively. Through encoder1, the target text can be encoded to obtain the corresponding text vector; through encoder2, the target token can be encoded to obtain the corresponding word vector. As shown in the figure, the target text can be "This character is about to lose. The economy is suppressed and it's impossible to win. Here's the phone for you to play", and the target token can be "character". They are respectively input into encoder1 and encoder2 to obtain the corresponding text vector and word vector, and then these vectors are input into the fusion module fusion to obtain the word weight parameter between 0 and 1. As Figure 5 shown, the results obtained by inputting each token in the target text can be [(character: 0.91) > (economy: 0.81) > (suppressed: 0.7) > (phone: 0.3) > (about to lose: 0.2) > (impossible to win: 0.2) > (this: 0.1)...], etc. Among them, the word weight parameter of "character" is the highest and can be regarded as the core word of the target text.

[0083] S209: Determine whether the target token is the core word of the target text according to the word weight parameter.

[0084] The processing device can determine whether the target word segment is a core word through the word weight parameter corresponding to the target word segment. Among them, there are various ways to determine the core word based on the word weight parameter. For example, the processing device can compare the word weight parameter corresponding to the target word segment with the word weight parameters of other word segments in the target text. If the word weight parameter corresponding to the target word segment is the highest, it can be determined that the target word segment is the core word of the target text; or, the processing device can preset a word weight parameter threshold. If the word weight parameter corresponding to the target word segment is greater than the word weight parameter threshold, it is determined that the target word segment is the core word of the target text.

[0085] As can be seen from the above technical solutions, in order to improve the accuracy of core word determination, a fusion tensor can be introduced during the fusion process. Through the fusion tensor, the text vector and the word vector can respectively learn some information about themselves from each other, so that the relevant information between the sample word segment and the sample text can be further highlighted in the text fusion vector. During the training process, the word weight parameter determined according to the text fusion vector can be obtained first through the initial word weight model, and this word weight parameter is used to identify the probability that the sample word segment belongs to the core word of the sample text. Thus, through the difference between this word weight parameter and the word label, the parameters of the fusion tensor can be adjusted, and then the initial word weight model can learn how to accurately determine the word weight parameter corresponding to the word segment. Therefore, the word weight model obtained through this training can accurately identify the core words in the target text and improve the recognition accuracy of the core words.

[0086] This method has a relatively wide range of application scenarios. For example, it can be applied to most scenarios that require understanding the core words of the text and determining the word weights of different word segments, such as general scenarios like understanding text titles and sentence patterns in a passage.

[0087] It can be understood that the core words of the text are usually used in text searches. For example, when a user wants to search for relevant strategies for Game A, "Game A" can be used as the core word for the search. Thus, when determining the core words of a piece of text, the user's search behavior can be used as one of the relatively reasonable determination bases.

[0088] In a possible implementation, when obtaining training samples, the processing device may first obtain historical search behavior data, which is used to identify search terms and the page text of the page opened by the search terms. The search term is the search term used by the user when searching for the page. Since the search term can be used to search for the page text, to a certain extent, the search term can reflect the core semantics of the page text, that is, the search term can be used as the core word corresponding to the page text. Based on this, the processing device can determine the page text as the sample text and determine the search term corresponding to the page text as the core word of the page text. When the search term is used as a sample token, the corresponding word tag can identify that the sample token is a core word. Thus, the processing device obtains a training sample with sample text and word tags of sample tokens.

[0089] Among them, the page opened by the search term may include various forms of content. For different forms of content, the way the processing device determines the page text of the page may also be different. For example, if the content on the page is in text form, the processing device can directly determine the page content as the page text; if the content on the page is in non-text form, such as pictures, audio, etc., the processing device can adopt corresponding conversion forms to convert the non-text form of content into text form of content. For example, when the page content is in picture form, the processing device can recognize the text in the picture and determine the recognition result as the corresponding page text; when the page content is in audio form, the processing device can perform speech recognition on the audio, convert it into corresponding text, and use the text as the corresponding page text. Thus, the processing device can determine training samples for text in various content forms, further improving the richness and flexibility of the training samples.

[0090] In addition, it can be understood that some pages may correspond to multiple search terms. In this case, the processing device can count the search times corresponding to each of the multiple search terms and determine the core word corresponding to the page text based on the search times corresponding to the search terms. For example, the processing device can determine the search term with the most search times as the core word corresponding to the page text.

[0091] During the training process of the initial word weight model, since the word weight parameters are determined based on the fusion tensor, word vectors, and text vectors, in order to further improve the training accuracy of the initial word weight model, in addition to adjusting the parameters of the fusion tensor, the processing device can also further improve the extraction accuracy of the word vectors and text vectors.

[0092] In a possible implementation, the processing device may adjust the parameters of the text module, the word module, and the fusion tensor according to the difference between the word weight parameter and the word tag. Through this parameter adjustment, in addition to being able to obtain a text fusion vector that is more suitable for core word recognition during the vector fusion process through the fusion tensor, it is also possible to make the relevant information that is beneficial to core word recognition more prominent in the text vector and the word vector extracted through the text module and the word module, thereby further improving the accuracy of core word recognition.

[0093] In the process of obtaining the text fusion vector based on the text vector and the word vector through the fusion tensor, the processing device may adopt a corresponding method for vector fusion based on the specific formats of the vector and the tensor. For example, in a possible implementation, the dimension of the text vector may be the first dimension number, the dimension of the word vector is the second dimension number, the dimension of the text fusion vector is the third dimension number, and the fusion tensor is a three-dimensional tensor with dimensions of the first dimension number, the third dimension number, and the second dimension number respectively.

[0094] When determining the text fusion vector, since the text vector is equivalent to a vector of (1, the first dimension number), and the fusion tensor is equivalent to a tensor of (the first dimension number, the third dimension number, the second dimension number), the processing device can first obtain a primary fusion vector according to the text vector and the fusion tensor through the fusion module in the model. The dimension of the primary fusion vector may be the third dimension number and the second dimension number respectively, that is, equivalent to a vector of (the third dimension number, the second dimension number). Subsequently, since the secondary word vector is equivalent to a vector of (1, the second dimension number), and the transposed vector of the word vector can be a vector of (the second dimension number, 1), the text fusion vector can be obtained according to the primary fusion vector and the transposed vector of the word vector. The dimension of the text fusion vector is the third dimension number.

[0095] For example, the specific formula for this fusion can be shown as follows:

[0096] f fusion =f text *W*f word T

[0097] where f text is a text vector with dimension m, f word is a word vector with dimension n, W ∈ R m*d*n is a three-dimensional tensor, where d is the dimension of the text fusion vector f fusion . Finally, the processing device can input the d-dimensional text fusion vector into the fully connected layer through the model and obtain the word weight parameter corresponding to the word segmentation through methods such as the sigmoid function.

[0098] As mentioned above, in the vector fusion process, through the fusion tensor, the context information of the target token in the target text in the word vector can be enhanced based on the text vector, so that the word weight model can better understand the semantics of the word vector and the correlation between the word vector and the text vector. Among them, the vector fusion process can actually be a process of mutual influence. Therefore, in a possible implementation, the fusion tensor can also be used to enhance the context information of the target token in the target text in the text vector when generating the text fusion vector. Through the fusion tensor, the context information related to the target token in the text vector can be further highlighted. Thus, through the text fusion vector, the word weight model can not only focus on analyzing some information related to the target text in the word vector, but also focus on analyzing some information related to the word vector in the text vector, further enhancing the fusion effect of the fusion tensor on information fusion, making the text fusion vector more suitable for core word recognition.

[0099] To further expand the applicable range of the word weight model and improve the flexibility and applicability of core word determination, when the processing device obtains the target text, it can extract the text from various forms of content. For example, in a possible implementation, the target text can be a text title, a text body, the text recognized from an image, or the text recognized from an audio. For example, the processing device can obtain an image containing text content, and then recognize the text in it as the target text through technologies such as image recognition.

[0100] To facilitate the understanding of the technical solution provided by this application, next, a method for determining core words provided in the embodiments of this application will be introduced in combination with an actual application scenario.

[0101] In this actual application scenario, the processing device can be a core word determination server. First, the server can obtain training samples for training the initial word weight model, such as Figure 3As shown, the text content of the sample text can be "A guide to getting 600 points in game A". The respective sample word segmentations and corresponding word tags included in the sample text are (game A, 1), (guide, 1), (teach you, 0), (of, 0), where the word tag with a value of 1 indicates that the sample word segmentation is a core word of the sample text, and the word tag with a value of 0 indicates that the sample word segmentation is not a core word of the sample text. Thus, based on this sample text, the server can generate four pieces of input data for training, namely {"sample text": "A guide to getting 600 points in game A", "sample word segmentation": "game A", "word tag (label)": 1}, {"sample text": "A guide to getting 600 points in game A", "sample word segmentation": "teach you", "label": 0}, {"sample text": "A guide to getting 600 points in game A", "sample word segmentation": "guide", "word tag (label)": 1}, {"sample text": "A guide to getting 600 points in game A", "sample word segmentation": "of", "label": 0}.

[0102] The overall architecture of the initial word weight model consists of two encoders. One encoder is mainly used to encode the sample text to obtain a text vector, and the other encoder is used to encode the sample word segmentation to obtain the corresponding word vector. The model can obtain a text fusion vector by multiplying the word vector and the text vector through tensor multiplication by fusing tensors, and then obtain the word weight parameter corresponding to the sample word segmentation through the sigmoid function.

[0103] Among them, the encoding of the sample text can be completed in various ways such as Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM), and Long Short-Term Memory combined with the attention mechanism (LSTM+Attention). In this actual application scenario, the bidirectional encoder bert of Transformer can be introduced to encode the sample text. The encoding of the sample word segmentation can be performed using a Deep Neural Networks (DNN) model. Of course, many other encoding methods can also be applied to extract text vectors and word vectors, and no restrictions are imposed here.

[0104] Based on the core word determination method provided in the above embodiment, the embodiment of the present application also provides a core word determination device. See Figure 6 , Figure 6 This is a structural block diagram of a core word determination device 600 provided by the embodiment of the present application. The device 600 includes a first acquisition unit 601, a training unit 602, a second acquisition unit 603, a parameter adjustment unit 604, and an identification unit 605:

[0105] The first acquisition unit 601 is configured to acquire a training sample including a sample text and a word label of a sample word segmentation, where the sample word segmentation is one of multiple word segmentations of the sample text, and the word label is used to identify whether the sample word segmentation is a core word of the sample text;

[0106] The training unit 602 is configured to use the training sample as input data of an initial word weight model for model training. The initial word weight model includes a text module, a word module, and a fusion module. The text module is configured to extract a text vector of the sample text, the word module is configured to extract a word vector of the sample word segmentation, and the fusion module is configured to generate a text fusion vector according to the text vector and the word vector through a fusion tensor;

[0107] The second acquisition unit 603 is configured to obtain a word weight parameter determined according to the text fusion vector through the initial word weight model, where the word weight parameter is used to identify the probability that the sample word segmentation belongs to a core word of the sample text;

[0108] The parameter adjustment unit 604 is configured to adjust the parameters of the fusion tensor according to the difference between the word weight parameter and the word label;

[0109] The recognition unit 605 is configured to recognize core words in a target text through the trained word weight model.

[0110] In a possible implementation manner, the first acquisition unit 601 is specifically configured to:

[0111] Acquire historical search behavior data, where the historical search behavior data is used to identify a search term and page text of a page opened through the search term;

[0112] Determine the sample text according to the page text, and determine the search term corresponding to the page text as the core word of the page text.

[0113] In a possible implementation manner, the parameter adjustment unit 604 is specifically configured to:

[0114] Adjust the parameters of the text module, the word module, and the fusion tensor according to the difference between the word weight parameter and the word label.

[0115] In a possible implementation manner, the dimension of the text vector is a first dimension number, the dimension of the word vector is a second dimension number, the dimension of the text fusion vector is a third dimension number, the fusion tensor is a three-dimensional tensor, and the dimensions are the first dimension number, the third dimension number, and the second dimension number respectively; the training unit 602 is specifically configured to:

[0116] A primary fusion vector is obtained based on the text vector and the fusion tensor, and the dimensions of the primary fusion vector are the third dimension number and the second dimension number respectively;

[0117] The text fusion vector is obtained based on the primary fusion vector and the transposed vector of the word vector.

[0118] In addition, based on a method for determining a core word provided in the above embodiments, an embodiment of the present application further provides a device for determining a core word. Refer to Figure 7 , Figure 7 which is a structural block diagram of a core word determination device 700 provided by an embodiment of the present application. The device 700 includes a third acquisition unit 701, a first determination unit 702, a second determination unit 703, and a third determination unit 704:

[0119] The third acquisition unit 701 is configured to acquire a target text including a plurality of word segments.

[0120] The first determination unit 702 is configured to determine a text vector of the target text and a word vector of a target word segment through a word weight model, where the target word segment is one of the plurality of word segments, and the word weight model includes a text module, a word module, and a fusion module. The text module is configured to extract the text vector of the target text, the word module is configured to extract the word vector of the target word segment, and the fusion module is configured to generate a text fusion vector based on the text vector and the word vector through a fusion tensor;

[0121] The second determination unit 703 is configured to determine a word weight parameter of the target word segment through the word weight model according to the text fusion vector generated based on the fusion module. The word weight parameter is used to identify the probability that the target word segment belongs to a core word of the target text. The fusion tensor is used to enhance the context information of the target word segment in the target text in the word vector when generating the text fusion vector;

[0122] The third determination unit 704 is configured to determine whether the target word segment is a core word of the target text according to the word weight parameter.

[0123] In a possible implementation manner, the fusion tensor is further configured to enhance the context information of the target word segment in the target text in the text vector when generating the text fusion vector.

[0124] In a possible implementation manner, the target text is a text title, a text body, text recognized from an image, or text recognized from audio.

[0125] The embodiments of the present application also provide a computer device, which will be introduced below with reference to the accompanying drawings. Please refer to Figure 8 As shown, the embodiments of the present application provide a device, which can also be a terminal device. The terminal device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA for short), a point of sales (POS for short), an in-vehicle computer, etc. Taking the terminal device as a mobile phone as an example:

[0126] Figure 8 Shown is a block diagram of a part of the structure of a mobile phone related to the terminal device provided by the embodiments of the present application. Refer to Figure 8 , the mobile phone includes: a radio frequency (RF) circuit 810, a memory 820, an input unit 830, a display unit 840, a sensor 850, an audio circuit 860, a wireless fidelity (WiFi) module 870, a processor 880, and a power supply 890 and other components. Those skilled in the art can understand that Figure 8 the structure of the mobile phone shown in

[0127] does not limit the mobile phone, and it may include more or fewer components than shown, or combine some components, or have different component arrangements. Figure 8 The following will specifically introduce each component of the mobile phone:

[0128] The RF circuit 810 can be used for receiving and transmitting information or signals during communication. Specifically, after receiving the downlink information from the base station, it is sent to the processor 880 for processing. Additionally, the uplink data designed is sent to the base station. Generally, the RF circuit 810 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. Moreover, the RF circuit 810 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0129] The memory 820 can be used to store software programs and modules. The processor 880 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 820. The memory 820 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 820 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0130] The input unit 830 can be used to receive input digital or character information and generate key signal inputs related to the user settings and function controls of the mobile phone. Specifically, the input unit 830 can include a touch panel 831 and other input devices 832. The touch panel 831, also known as a touch screen, can collect touch operations of the user thereon or nearby (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 831), and drive corresponding connection devices according to a preset program. Optionally, the touch panel 831 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 880, and can also receive and execute commands sent by the processor 880. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel 831. In addition to the touch panel 831, the input unit 830 can also include other input devices 832. Specifically, the other input devices 832 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0131] The display unit 840 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 840 can include a display panel 841. Optionally, the display panel 841 can be configured in forms such as a liquid crystal display (LCD) and an organic light-emitting diode (OLED). Further, the touch panel 831 can cover the display panel 841. After the touch panel 831 detects a touch operation thereon or nearby, it transmits the operation to the processor 880 to determine the type of touch event. Subsequently, the processor 880 provides corresponding visual output on the display panel 841 according to the type of touch event. Although in Figure 8 the touch panel 831 and the display panel 841 are implemented as two independent components to realize the input and output functions of the mobile phone, in some embodiments, the touch panel 831 and the display panel 841 can be integrated to realize the input and output functions of the mobile phone.

[0132] The mobile phone may further include at least one sensor 850, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 841 and / or the backlight when the mobile phone is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that the mobile phone can also be configured with, they will not be elaborated here.

[0133] The audio circuit 860, the speaker 861, and the microphone 862 can provide an audio interface between the user and the mobile phone. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, and the speaker 861 converts it into a sound signal for output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and then converted into audio data. After the audio data is output to the processor 880 for processing, it is sent through the RF circuit 810 to, for example, another mobile phone, or the audio data is output to the memory 820 for further processing.

[0134] WiFi belongs to short - range wireless transmission technology. The mobile phone can help users send and receive emails, browse the web, and access streaming media through the WiFi module 870, which provides users with wireless broadband Internet access. Although Figure 8 the WiFi module 870 is shown, it can be understood that it does not belong to an essential component of the mobile phone and can be omitted entirely within the scope of not changing the essence of the invention according to needs.

[0135] The processor 880 is the control center of the mobile phone. It connects various parts of the entire mobile phone using various interfaces and lines. By running or executing software programs and / or modules stored in the memory 820, and by calling data stored in the memory 820, it executes various functions of the mobile phone and processes data. Optionally, the processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 880 either.

[0136] The mobile phone further includes a power supply 890 (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the processor 880 through a power management system, so as to manage functions such as charging, discharging, and power consumption management through the power management system.

[0137] Although not shown, the mobile phone may further include a camera, a Bluetooth module, etc., which will not be elaborated here.

[0138] In this embodiment, the processor 880 included in the terminal device further has the following functions:

[0139] Obtain a training sample including a sample text and a word tag of a sample word segmentation, where the sample word segmentation is one of multiple word segmentations of the sample text, and the word tag is used to identify whether the sample word segmentation is a core word of the sample text;

[0140] Use the training sample as input data of an initial word weight model for model training. The initial word weight model includes a text module, a word module, and a fusion module. The text module is used to extract a text vector of the sample text, the word module is used to extract a word vector of the sample word segmentation, and the fusion module is used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor;

[0141] Obtain word weight parameters determined according to the text fusion vector through the initial word weight model, where the word weight parameters are used to identify the probability that the sample word segmentation belongs to the core word of the sample text;

[0142] Adjust the parameters of the fusion tensor according to the difference between the word weight parameters and the word tag;

[0143] Identify the core words in the target text through the trained word weight model.

[0144] Or:

[0145] Obtain a target text including multiple word segmentations;

[0146] Determine a text vector of the target text and a word vector of a target word segmentation through a word weight model, where the target word segmentation is one of the multiple word segmentations. The word weight model includes a text module, a word module, and a fusion module. The text module is used to extract a text vector of the target text, the word module is used to extract a word vector of the target word segmentation, and the fusion module is used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor;

[0147] Based on the text fusion vector generated by the fusion module, determine the word weight parameter of the target word segmentation through the word weight model. The word weight parameter is used to identify the probability that the target word segmentation belongs to the core word of the target text. The fusion tensor is used to enhance the context information of the target word segmentation in the target text in the word vector based on the text vector when generating the text fusion vector.

[0148] Determine whether the target word segmentation is the core word of the target text according to the word weight parameter.

[0149] The embodiment of the present application also provides a server. Please refer to Figure 9 as shown. Figure 9 FIG. 900 is a structural diagram of the server 900 provided by the embodiment of the present application. The server 900 may vary greatly due to configuration or performance, and may include one or more central processing units (CPUs) 922 (for example, one or more processors) and a memory 932, and one or more storage media 930 for storing application programs 942 or data 944 (for example, one or more mass storage devices). Among them, the memory 932 and the storage media 930 may be transient storage or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 922 may be configured to communicate with the storage media 930 and execute a series of instruction operations in the storage media 930 on the server 900.

[0150] The server 900 may further include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input / output interfaces 958, and / or one or more operating systems 941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so on.

[0151] The steps performed by the server in the above embodiments may be based on Figure 9 the server structure shown.

[0152] The embodiment of the present application also provides a computer-readable storage medium for storing a computer program, and the computer program is used to execute any one of the core word determination methods described in the foregoing embodiments.

[0153] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments. The foregoing storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disc, etc., which can store program codes of various types.

[0154] It should be noted that the embodiments in this specification are all described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiments. The device and system embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0155] As described above, it is only a specific implementation manner of this application. However, the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in this application should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims

1. A method for determining core words, characterized in that, The method includes: Obtaining a training sample including a sample text and a word label of a sample word segment, where the sample word segment is one of multiple word segments of the sample text, and the word label is used to identify whether the sample word segment is a core word of the sample text; Using the training sample as input data of an initial word weight model for model training, where the initial word weight model includes a text module, a word module, and a fusion module, the text module is used to extract a text vector of the sample text, the word module is used to extract a word vector of the sample word segment, and the fusion module is used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor; Obtaining, through the initial word weight model, a word weight parameter determined according to the text fusion vector, where the word weight parameter is used to identify the probability that the sample word segment belongs to the core word of the sample text; Adjusting parameters of the fusion tensor according to the difference between the word weight parameter and the word label; Identifying core words in a target text through the trained word weight model.

2. The method according to claim 1, wherein The obtaining of the training sample including the sample text and the word label of the sample word segment includes: Obtaining historical search behavior data, where the historical search behavior data is used to identify a search term and page text of a page opened through the search term; Determining the sample text according to the page text, and determining the search term corresponding to the page text as the core word of the page text.

3. The method according to claim 1, wherein The adjusting of parameters of the fusion tensor according to the difference between the word weight parameter and the word label includes: Adjusting parameters of the text module, the word module, and the fusion tensor according to the difference between the word weight parameter and the word label.

4. The method according to any one of claims 1 to 3, characterized in that, The dimension of the text vector is a first dimension number, the dimension of the word vector is a second dimension number, the dimension of the text fusion vector is a third dimension number, the fusion tensor is a three-dimensional tensor, and the dimensions are the first dimension number, the third dimension number, and the second dimension number respectively; the generating of the text fusion vector according to the text vector and the word vector through the fusion tensor includes: Obtaining a primary fusion vector according to the text vector and the fusion tensor, where the dimensions of the primary fusion vector are the third dimension number and the second dimension number respectively; Obtaining the text fusion vector according to the primary fusion vector and the transposed vector of the word vector.

5. A core word determination device, characterized in that, The apparatus includes a first obtaining unit, a training unit, a second obtaining unit, a parameter adjusting unit, and an identifying unit: The first obtaining unit is used to obtain a training sample including a sample text and a word label of a sample word segment, where the sample word segment is one of multiple word segments of the sample text, and the word label is used to identify whether the sample word segment is a core word of the sample text; The training unit is used to use the training sample as input data of an initial word weight model for model training, where the initial word weight model includes a text module, a word module, and a fusion module, the text module is used to extract a text vector of the sample text, the word module is used to extract a word vector of the sample word segment, and the fusion module is used to generate a text fusion vector according to the text vector and the word vector through a fusion tensor; The second acquisition unit is configured to obtain, via the initial word weight model, a word weight parameter determined according to the text fusion vector, where the word weight parameter is used to identify the probability that the sample word segmentation belongs to a core word of the sample text; The parameter adjustment unit is configured to adjust parameters of the fusion tensor according to a difference between the word weight parameter and the word label; The recognition unit is configured to recognize a core word in a target text via a trained word weight model.

6. The device according to claim 5, characterized in that Specifically, the first acquisition unit is configured to: Obtain historical search behavior data, where the historical search behavior data is used to identify a search term and page text of a page opened via the search term; Determine the sample text according to the page text, and determine the search term corresponding to the page text as the core word of the page text.

7. The device according to claim 5, characterized in that, Specifically, the parameter adjustment unit is configured to: Adjust parameters of the text module, the word module, and the fusion tensor according to a difference between the word weight parameter and the word label.

8. The device according to any one of claims 5 to 7, characterized in that, The dimension of the text vector is a first dimension number, the dimension of the word vector is a second dimension number, the dimension of the text fusion vector is a third dimension number, and the fusion tensor is a three-dimensional tensor with dimensions of the first dimension number, the third dimension number, and the second dimension number respectively; specifically, the training unit is configured to: Obtain a primary fusion vector according to the text vector and the fusion tensor, where the dimension of the primary fusion vector is the third dimension number and the second dimension number respectively; Obtain the text fusion vector according to the primary fusion vector and a transposed vector of the word vector.

9. A method for determining a core word, characterized in that The method includes: Obtain a target text including a plurality of word segmentations; Determine a text vector of the target text and a word vector of a target word segmentation via a word weight model, where the target word segmentation is one of the plurality of word segmentations, the word weight model includes a text module, a word module, and a fusion module, the text module is configured to extract the text vector of the target text, the word module is configured to extract the word vector of the target word segmentation, and the fusion module is configured to generate a text fusion vector according to the text vector and the word vector via a fusion tensor; Determine, via the word weight model, a word weight parameter of the target word segmentation according to the text fusion vector generated based on the fusion module, where the word weight parameter is used to identify the probability that the target word segmentation belongs to a core word of the target text, and the fusion tensor is configured to highlight context information of the target word segmentation in the target text in the word vector when generating the text fusion vector; Determine whether the target word segmentation is a core word of the target text according to the word weight parameter.

10. The method according to claim 9, characterized in that, The fusion tensor is further configured to highlight context information of the target word segmentation in the target text in the text vector when generating the text fusion vector.

11. The method according to claim 9 or 10, characterized in that, The target text is a text title, text body, text recognized from an image, or text recognized from audio.

12. A core word determination device, characterized in that The apparatus includes a third acquisition unit, a first determination unit, a second determination unit, and a third determination unit: The third acquisition unit is configured to obtain a target text including a plurality of word segmentations; The first determination unit is configured to determine a text vector of the target text and a word vector of a target word segmentation through a word weight model, where the target word segmentation is one of the multiple word segmentations, and the word weight model includes a text module, a word module, and a fusion module. The text module is configured to extract the text vector of the target text, the word module is configured to extract the word vector of the target word segmentation, and the fusion module is configured to generate a text fusion vector based on the text vector and the word vector through a fusion tensor; The second determination unit is configured to determine a word weight parameter of the target word segmentation through the word weight model according to the text fusion vector generated based on the fusion module. The word weight parameter is used to identify the probability that the target word segmentation belongs to a core word of the target text. The fusion tensor is configured to highlight context information of the target word segmentation in the target text in the word vector when generating the text fusion vector; The third determination unit is configured to determine whether the target word segmentation is a core word of the target text according to the word weight parameter.

13. The device according to claim 12, characterized in that, The fusion tensor is further configured to highlight context information of the target word segmentation in the target text in the text vector when generating the text fusion vector.

14. The device according to claim 12 or 13, characterized in that, The target text is a text title, a text body, text recognized from an image, or text recognized from audio.

15. A computer device, characterized in that, The device includes a processor and a memory: The memory is configured to store program code and transmit the program code to the processor; The processor is configured to execute the core word determination method according to any one of claims 1-4 or claims 9-11 based on the instructions in the program code.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium is configured to store a computer program, and the computer program is configured to execute the core word determination method according to any one of claims 1-4 or 9-11.

Citation Information

Patent Citations

  • Language model training method and device

    CN109800435A

  • Core element extraction method and device and electronic equipment

    CN110019758A