Text information processing method, device, equipment, software program and storage medium

Through multi-level graph neural network processing text information, syntactic analysis is used to obtain multi-hop information, which solves the problem of poor emotional classification effect in processing long texts, and achieves higher emotional analysis accuracy and user experience.

CN116541517BActive Publication Date: 2025-06-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210089230.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2025-06-10
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

Existing text information emotion classification technology will lose key information when processing longer text information, resulting in poor emotional classification effect, especially in the financial field, which will affect the user experience.

Method used

Multi-level graph neural network is used to process text information, obtain multi-hop information through syntax analysis, and match the corresponding multi-level graph neural network for classification, reducing the complexity of sentiment analysis and improving accuracy.

Benefits of technology

Through the diversified analysis of multi-level graph neural network, the emotional state of text information can be more accurately analyzed, the accuracy of emotion analysis can be improved, and the user experience can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116541517B_ABST
    Figure CN116541517B_ABST
Patent Text Reader

Abstract

The present invention provides a text information processing method, apparatus, electronic device, software program, and storage medium. The method includes: obtaining text information to be processed; performing syntactic analysis processing on the text information to be processed to obtain a syntactic analysis result of the text information to be processed; determining different-level multi-hop information of the syntactic analysis result according to the syntactic analysis result of the text information to be processed; determining a multi-level graph neural network matching the text information to be processed based on the multi-hop information; and processing the text information to be processed through the multi-level graph neural network to obtain a classification result of the text information to be processed. Thus, it is possible to analyze the emotional state of text information diversely through a multi-level graph neural network, reduce the complexity of text information emotional analysis, improve the accuracy of emotional analysis, and enhance the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to text information processing technology, and in particular to a text information processing method, apparatus, electronic device, software program, and storage medium. Background Art

[0002] During the process of text information processing, due to the large span of text content fields, the technology used for text information sentiment classification is mainly based on Long Short-Term Memory (LSTM). However, if the text information is long, a large amount of key information will be lost using this method, resulting in poor sentiment classification results in the end. Another commonly used technology is to use Convolutional Neural Networks (CNN). When using CNN, due to its window features, features with different spans are extracted. This method has good parallelism and the model is relatively easy to train. However, it cannot grasp the relationship between words before and after, nor can it grasp positional features, which also affects the analysis of the sentiment state of text information, especially in the adaptability of text information processing in the financial field, and affects the user experience. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a text information processing method, apparatus, electronic device, software program, and storage medium, which can realize the diversified analysis of the sentiment state of text information through a multi-level graph neural network, reduce the complexity of text information sentiment analysis, improve the accuracy of sentiment analysis, and enhance the user experience.

[0004] The technical solution of the embodiments of the present invention is implemented as follows:

[0005] Embodiments of the present invention provide a text information processing method, including:

[0006] In response to a text information processing request, obtain the text information to be processed;

[0007] Perform syntactic analysis processing on the text information to be processed to obtain the syntactic analysis result of the text information to be processed;

[0008] According to the syntactic analysis result of the text information to be processed, determine different-level multi-hop information of the syntactic analysis result;

[0009] Based on the multi-hop information, determine a multi-level graph neural network that matches the text information to be processed;

[0010] Process the text information to be processed through the multi-level graph neural network to obtain the classification result of the text information to be processed, so as to determine the sentiment state of the text information to be processed through the classification result.

[0011] An embodiment of the present invention further provides a text information processing device, including:

[0012] An information transmission module, configured to obtain text information to be processed in response to a text information processing request;

[0013] An information processing module, configured to perform syntactic analysis processing on the text information to be processed to obtain a syntactic analysis result of the text information to be processed;

[0014] The information processing module is configured to determine multi-hop information at different levels of the syntactic analysis result according to the syntactic analysis result of the text information to be processed;

[0015] The information processing module is configured to determine a multi-level graph neural network matching the text information to be processed based on the multi-hop information;

[0016] The information processing module is configured to process the text information to be processed through the multi-level graph neural network to obtain a classification result of the text information to be processed, so as to determine the emotional state of the text information to be processed through the classification result.

[0017] In the above solution,

[0018] The information processing module is configured to parse the text information processing request to determine the target object included in the text information processing request and the financial scenario corresponding to the target object;

[0019] The information processing module is configured to determine the historical behavior parameters of the target object and the historical parameters of the financial scenario in the financial scenario;

[0020] The information processing module is configured to perform data cross-screening processing on the historical behavior parameters of the target object and the historical parameters of the financial scenario based on the target object to obtain text information to be processed that matches the target object.

[0021] In the above solution,

[0022] The information processing module is configured to trigger a corresponding word segmentation library according to the recognition environment of the text information to be processed;

[0023] The information processing module is configured to perform word segmentation processing on the text information to be processed through the word dictionary of the triggered word segmentation library to extract Chinese character text and form different word-level feature vectors;

[0024] The information processing module is configured to perform dependency syntactic processing on the word-level feature vectors to obtain at least one dependency relationship;

[0025] The information processing module is configured to analyze the word-level feature vectors according to the subject-predicate relationship in the at least one dependency relationship, so as to obtain the syntactic analysis result in the text to be processed.

[0026] In the above solution,

[0027] The information processing module is configured to determine the syntactic structure information of different word-level feature vectors according to the syntactic analysis result of the text information to be processed;

[0028] The information processing module is configured to determine different-level multi-hop information of the syntactic analysis result according to the syntactic structure information of different word-level feature vectors, where the multi-hop information at least includes: one-hop information and two-hop information.

[0029] In the above solution,

[0030] The information processing module is configured to determine a local graph neural network that matches the text information to be processed according to different-level multi-hop information in the multi-hop information;

[0031] The information processing module is configured to determine a global graph neural network that matches the text information to be processed according to the complete sentence information in the text to be processed, where the multi-level graph neural network includes a global graph neural network and at least one local graph neural network.

[0032] In the above solution,

[0033] The information processing module is configured to process the text information to be processed through the local graph neural network to obtain a first processing result;

[0034] The information processing module is configured to process the text information to be processed through the global graph neural network to obtain a second processing result;

[0035] The information processing module is configured to perform fusion processing on the first processing result and the second processing result based on an attention mechanism to obtain a fusion processing result, and perform normalization processing on the fusion processing result to obtain a classification result of the text information to be processed.

[0036] An embodiment of the present invention further provides an electronic device, where the electronic device includes:

[0037] A memory for storing executable instructions;

[0038] A processor, configured to implement the foregoing text information processing method when running the executable instructions stored in the memory.

[0039] The present invention relates to a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the foregoing text information processing method.

[0040] The embodiments of the present invention have the following beneficial effects:

[0041] In the present invention, in response to a text information processing request, the to-be-processed text information is obtained; syntactic analysis processing is performed on the to-be-processed text information to obtain a syntactic analysis result of the to-be-processed text information; according to the syntactic analysis result of the to-be-processed text information, different-level multi-hop information of the syntactic analysis result is determined; based on the multi-hop information, a multi-level graph neural network matching the to-be-processed text information is determined; the to-be-processed text information is processed through the multi-level graph neural network to obtain a classification result of the to-be-processed text information, so as to determine the emotional state of the to-be-processed text information through the classification result. It can realize the analysis of the emotional state of text information in a diversified manner through a multi-level graph neural network, reduce the complexity of text information emotional analysis, improve the accuracy of emotional analysis, and enhance the user experience. Description of the Drawings

[0042] Figure 1 It is a schematic diagram of the usage environment of the text information processing method provided by the embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of the composition structure of the text information processing device provided by the embodiment of the present invention;

[0044] Figure 3 It is an optional flowchart of the text information processing method provided by the embodiment of the present invention;

[0045] Figure 4 It is an optional schematic diagram of the processing process of multi-hop information in the embodiment of the present invention;

[0046] Figure 5 It is an optional schematic diagram of the structure of the multi-level graph neural network in the embodiment of the present invention;

[0047] Figure 6 It is an optional flowchart of the text information processing method provided by the embodiment of the present invention;

[0048] Figure 7 It is a schematic diagram of the graph neural network structure provided by the embodiment of the present invention. Detailed Embodiments

[0049] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limiting the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

[0050] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0051] Before further elaborating on the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are subject to the following explanations.

[0052] 1) Responsive to, used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more executed operations can be real-time or can have a set delay; without special instructions, there is no limitation on the execution order of the multiple executed operations.

[0053] 2) Information, various forms of information that can be obtained on the Internet, such as video files, multimedia information, news information, etc. presented in a client or intelligent device.

[0054] 3) Convolutional neural network (CNN, Convolutional Neural Networks) is a class of feed-forward neural networks (Feed forward Neural Networks) that contain convolutional calculations and have a deep structure, and is one of the representative algorithms of deep learning (deeplearning). The convolutional neural network has the ability of representation learning and can perform shift-invariant classification on the input information according to its hierarchical structure.

[0055] 4) Model training, performing multi-classification learning on an image dataset. The model can be constructed using deep learning frameworks such as Tensor Flow and torch, and a multi-classification model is composed of multiple layers of neural network layers such as CNN. The input of the model is a three-channel or original-channel matrix formed by reading an image through tools such as openCV, and the output of the model is a multi-classification probability. The web page category is finally output through algorithms such as softmax. During training, the model approaches the correct trend through objective functions such as cross-entropy.

[0056] 5) Neural Network (NN): Artificial Neural Network (ANN), abbreviated as neural network or neural-like network, is a mathematical model or computational model that mimics the structure and function of a biological neural network (the central nervous system of an animal, especially the brain) in the fields of machine learning and cognitive science, and is used to estimate or approximate a function.

[0057] 6) Graph Neural Network (GNN): A neural network that directly acts on a graph structure, mainly for processing data with a non-Euclidean space structure (graph structure). It has the following characteristics: ignoring the input order of nodes; during the calculation process, the representation of a node is affected by its surrounding neighbor nodes, while the graph connection itself remains unchanged; the graph structure representation enables graph-based reasoning. Usually, a graph neural network consists of two modules: a propagation module (PropagationModule) and an output module (Output Module). The propagation module is used to transfer information between nodes in the graph and update the state, and the output module is used to define an objective function according to different tasks based on the vector representations of the nodes and edges of the graph. Graph neural networks include: Graph Convolutional Networks (GCNs), Gated Graph Neural Networks (GGNNs), and Graph Attention Networks (GAT) based on the attention mechanism.

[0058] 7) Directed graph: Represents the relationship between objects and can be represented by an ordered triple (V(D), A(D), ψD), where ψD is an incidence function that maps each element in A(D) to an ordered pair of elements in V(D).

[0059] 8) Encoder-decoder structure: A network structure commonly used in machine translation technology. It consists of an encoder and a decoder. The encoder converts the input text into a series of context vectors that can express the features of the input text, and the decoder receives the output result of the encoder as its own input and outputs the corresponding text sequence in another language.

[0060] 9) Bidirectional Encoder Representations from Transformers (BERT): A bidirectional attention neural network model proposed by Google.

[0061] 10) Token: A word unit. Before any actual processing of the input text, it needs to be segmented into language units such as words, punctuation marks, numbers, or alphanumeric characters. These units are called word units.

[0062] 11) Softmax: The normalized exponential function, which is a generalization of the logistic function. It can "compress" a K-dimensional vector containing arbitrary real numbers into another K-dimensional real vector, such that the range of each element is between [0, 1], and the sum of all elements is 1.

[0063] 12) Word segmentation: Use Chinese word segmentation tools to segment Chinese text to obtain a set of fine-grained words. Stop words: Words or characters that contribute little or nothing to the semantics of the text. Cosine similarity: The cosine similarity between two texts represented as vectors.

[0064] Figure 1 This is a schematic diagram of the usage scenario of the text information processing method provided by the embodiments of the present invention. Refer to Figure 1 , on the terminal (including terminal 10-1 and terminal 10-2), there is a client of software capable of displaying corresponding financial text information, such as a client or plugin for conducting financial activities through virtual resources or physical resources or paying through virtual resources (such as Q coins). The target object can obtain and display the financial text information through the corresponding client, and trigger a corresponding text information processing process during the text information processing (such as a payment applet in an instant messaging software or a process of purchasing stocks with funds in an instant messaging software. By processing the text information, the emotional state of the target object towards different stocks can be obtained to determine the degree of preference of the target object for different stocks); the terminal is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and uses a wireless link to achieve data transmission.

[0065] As an example, the server 200 is used to deploy the text information processing device to implement the text information processing method provided by the present invention, so as to obtain the text information to be processed by responding to a text information processing request; perform syntactic analysis processing on the text information to be processed to obtain the syntactic analysis result of the text information to be processed; determine different-level multi-hop information of the syntactic analysis result according to the syntactic analysis result of the text information to be processed; determine a multi-level graph neural network matching the text information to be processed based on the multi-hop information; process the text information to be processed through the multi-level graph neural network to obtain the classification result of the text information to be processed, so as to determine the emotional state of the text information to be processed through the classification result, and perform associated operations based on the emotional state of the text information, such as stock purchase behavior, emotional recognition of user conversations, etc. The specific behavior content is not limited in this application.

[0066] Of course, the text information processing device provided by the present invention can be applied to an environment where virtual resources or physical resources are used for financial activities, or information interaction is carried out through a physical financial resource payment environment (including but not limited to various types of physical financial resource change environments) or social software. In financial activities carried out with various types of physical financial resources or payments through virtual resources, financial text information from different data sources is usually processed, and finally, financial text information corresponding to the target object selected by the target object is presented on the user interface (UI). The emotional state of the text information to be processed formed by the target object in the current display interface (such as the emotional state of the real-time price fluctuation of stocks, the emotional state of the rise and fall of futures) can also be called by other application programs. It should be noted that the emotional state involved in this application can include at least the following: positive (forward) emotion, negative (backward) emotion, and neutral emotion. The emotional state can reflect the opinion tendency and emotional information of the target object, and has broad application prospects in fields such as topic discovery, opinion polling, targeted advertising, and after-sales service evaluation.

[0067] Among them, the text information processing method provided by the embodiments of this application is implemented based on artificial intelligence. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use 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 is also the study of the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making.

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

[0069] In the embodiments of the present application, the main artificial intelligence software technologies involved include the above-mentioned speech processing technologies and machine learning, etc. For example, it may involve Automatic Speech Recognition (ASR) in Speech Technology, which includes Speech signal preprocessing, Speech signal frequency analyzing, Speech signal feature extraction, Speech signal feature matching / recognition, Speech training, etc.

[0070] For another example, it may involve Machine learning (ML). Machine learning is an interdisciplinary field that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies 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 usually includes technologies such as Deep Learning. Deep Learning includes artificial neural networks, such as Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), Deep neural network (DNN), etc.

[0071] The following will elaborate on the structure of the text information processing device according to the embodiments of the present invention. The text information processing device can be implemented in various forms, such as a dedicated terminal with the processing function of the text information processing device, or a server equipped with the processing function of the text information processing device. For example, the server 200 in the foregoing Figure 1 mentioned above. Figure 2 FIG. is a schematic diagram of the composition structure of the text information processing device provided by the embodiments of the present invention. It can be understood that Figure 2 only shows the exemplary structure of the text information processing device rather than all structures, and some or all of the structures shown can be implemented according to needs. Figure 2

[0072] ​The text information processing device provided by the embodiments of the present invention includes: at least one processor 201, a memory 202, a user interface 203, and at least one network interface 204. Each component in the text information processing device is coupled together through a bus system 205. It can be understood that the bus system 205 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 205 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 2 all kinds of buses are labeled as the bus system 205.

[0073] Among them, the user interface 203 may include a display, a keyboard, a mouse, a trackball, a click wheel, a button, a touchpad, or a touch screen, etc.

[0074] It can be understood that the memory 202 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The memory 202 in the embodiments of the present invention can store data to support the operation of the terminal (such as 10-1). Examples of these data include: any computer programs for operating on the terminal (such as 10-1), such as an operating system and application programs. Among them, the operating system contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application programs may include various application programs.

[0075] In some embodiments, the text information processing device provided by the embodiments of the present invention can be implemented in a combination of software and hardware. As an example, the text information processing device provided by the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the text information processing method provided by the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor may adopt one or more application-specific integrated circuits (ASICs, Application Specific Integrated Circuits), DSPs, programmable logic devices (PLDs, Programmable Logic Devices), complex programmable logic devices (CPLDs, Complex Programmable Logic Devices), field-programmable gate arrays (FPGAs, Field-Programmable Gate Arrays), or other electronic components.

[0076] As an example of implementing the text information processing device provided in the embodiments of the present invention by combining software and hardware, the text information processing device provided in the embodiments of the present invention can be directly embodied as a combination of software modules executed by the processor 201. The software modules can be located in the storage medium, and the storage medium is located in the memory 202. The processor 201 reads the executable instructions included in the software modules in the memory 202 and combines the necessary hardware (for example, including the processor 201 and other components connected to the bus 205) to complete the text information processing method provided in the embodiments of the present invention.

[0077] As an example, the processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0078] As an example of implementing the text information processing device provided in the embodiments of the present invention by hardware, the device provided in the embodiments of the present invention can be directly executed and completed by the processor 201 in the form of a hardware decoding processor. For example, it is executed by one or more application-specific integrated circuits (ASIC, Application Specific Integrated Circuit), DSP, programmable logic device (PLD, Programmable Logic Device), complex programmable logic device (CPLD, Complex Programmable Logic Device), field-programmable gate array (FPGA, Field-Programmable Gate Array) or other electronic components to implement the text information processing method provided in the embodiments of the present invention.

[0079] The memory 202 in the embodiments of the present invention is used to store various types of data to support the operation of the text information processing device. Examples of these data include: any executable instructions for operating on the text information processing device, such as executable instructions, and the program implementing the text information processing method in the embodiments of the present invention can be included in the executable instructions.

[0080] In some other embodiments, the text information processing device provided in the embodiments of the present invention can be implemented in software. Figure 2The text information processing device stored in the memory 202 is shown. It can be software in the form of programs and plugins, etc., and includes a series of modules. As an example of the program stored in the memory 202, it can include a text information processing device. The text information processing device includes the following software module information transmission module 2081 and information processing module 2082. When the software modules in the text information processing device are read into the RAM by the processor 201 and executed, the text information processing method provided by the embodiments of the present invention will be implemented. Among them, the functions of each software module in the text information processing device include:

[0081] The information transmission module 2081 is used to obtain the text information to be processed in response to a text information processing request.

[0082] The information processing module 2082 is used to perform syntactic analysis processing on the text information to be processed to obtain the syntactic analysis result of the text information to be processed.

[0083] The information processing module 2082 is used to determine different-level multi-hop information of the syntactic analysis result according to the syntactic analysis result of the text information to be processed.

[0084] The information processing module 2082 is used to determine a multi-level graph neural network that matches the text information to be processed based on the multi-hop information.

[0085] The information processing module 2082 is used to process the text information to be processed through the multi-level graph neural network to obtain the classification result of the text information to be processed, so as to determine the emotional state of the text information to be processed through the classification result.

[0086] According to Figure 2 The electronic device shown, in one aspect of the present application, the present application also provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various alternative implementations of the above text information processing method.

[0087] Continue to combine Figure 1The usage scenario shown below illustrates the text information processing method provided by this application. Among them, the terminal (including terminal 10-1 and terminal 10-2) obtains the market text information of the financial resource allocation process such as funds and stocks from the corresponding server 200 through the network 300 and makes comments. The comments generated can be used as the text information to be processed. For example, through platforms such as the change pass and stock trading APPs, comments on the market are made. Due to the large span of the text content field, the technology used for text information sentiment classification is mainly based on the long short-term memory network (LSTM, Long Short-Term Memory). However, if the text information is long, this method will lose a large amount of key information, resulting in a poor sentiment classification effect in the end. Another commonly used technology is to use the convolutional neural network (Convolutional Neural Networks, CNN). When using CNN, due to the window features, features with different spans are extracted. This method has good parallelism and the model is relatively easy to train. However, it cannot grasp the relationship between words before and after, nor can it grasp the position features, which also affects the analysis of the sentiment state of text information, especially in the text information processing in the financial field, where the adaptability is poor and the user experience is affected.

[0088] To solve the above defects, refer to Figure 3 , Figure 3 FIG. is an optional flowchart of the text information processing method provided by an embodiment of the present invention, where the target object can be selected for use in different financial scenarios. It can be understood that Figure 3 the steps shown can be executed by various electronic devices running the text information processing device. For example, it can be a dedicated terminal (stock machine or mobile phone) with text information processing functions, an electronic device, or a financial applet. The steps shown below Figure 3 will be described.

[0089] Step 301: The text information processing device responds to a text information processing request and obtains the text information to be processed.

[0090] In some embodiments of the present invention, taking the financial text information processing scenario as an example, the financial text information to be processed can be obtained in the following ways:

[0091] Parse the text information processing request to determine the target object included in the text information processing request and the financial scenario corresponding to the target object; in the financial scenario, determine the historical behavior parameters of the target object and the historical parameters of the financial scenario; through data cross-screening processing of the historical behavior parameters of the target object and the historical parameters of the financial scenario, obtain the text information to be processed that matches the target object. For example, when making stock recommendations through a stock trading software, the user sends a text information processing request to the financial server through the client of the stock trading software. Among them, the text information processing request includes: target object identification parameters and scenario parameters. After parsing the text information processing request to obtain the target object identification parameters and scenario parameters, continue to determine the target object and the data interface corresponding to the target object according to the mapping relationship of the target object identification parameters. Through the data interface, the historical behavior parameters of the target object can be retrieved from the database of the financial server. For example, the target object collects a certain stock or comments on a certain stock, or purchases a certain stock; through the mapping relationship of the scenario parameters, it can be determined that the scenario corresponding to the target object is a financial scenario and the data interface of the scenario parameters. Since there are many data types in the financial scenario and it involves the privacy data of the target object at the same time, each data interface of the scenario parameters corresponds to only one fixed financial server; use the data interface of the scenario parameters to retrieve the historical parameters of the corresponding scenario from the historical information database through the financial server. For example, it can be the overall market upward trend data in stock trading, or the trading volume change data of stocks in a certain sector. Use the historical behavior parameters of the target object to perform data cross-screening in the historical parameters of the financial scenario, and determine the operation information of the target object in the financial scenario at different times as the text information to be processed that matches the target object. For example, through data cross-screening, it can be obtained that "as the overall market upward trend data changes, which stock did the target object purchase", or it can also be obtained that "as the trading volume of stocks in a certain sector changes, what kind of comments did the target object make on a certain stock".

[0092] In some embodiments of the present invention, the target object is a user participating in stock trading. The historical parameters of the financial scenario can be the trading information of any stock listed on the stock exchange, or the individual stock data corresponding to the individual stock and the overall market data corresponding to the overall market. The historical behavior parameters of the target object can be the text record information when the user operates various financial products, such as stocks, securities, futures, funds, and the historical evaluations of the above financial products. It should be noted that in the embodiments of the present invention, any credit instrument that can be used as a certificate of the user's economic rights and interests can be called a financial product, such as securities, bonds / derivative market products (such as stock futures, options, interest rate futures, etc.). The specific type of financial product used in this application is not specifically limited.

[0093] Specifically, corresponding stock data can be obtained based on the identifier (such as the code) corresponding to an individual stock or the overall market as historical parameters in the financial scenario. Through the text information processing method provided by this application, when it is desired to obtain preference information for any stock by parsing a text information processing request, the historical behavior parameters of the target object can be used to perform data cross-screening in the historical parameters of the financial scenario, so as to obtain the market text description and the text description information of the trading volume of any stock. For example, the to-be-processed text information matching the target object obtained can be: 1) "XXX stock is really good. It has been rising well recently. I have bought XXX lots of XXX stock." 2) "The situation of XXX stock has been very poor recently. I have liquidated all my positions."

[0094] It can be understood that in the specific implementation of this application, user-related data such as the historical behavior parameters of the target object are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0095] In some embodiments, the text information processing device can collect the historical parameters corresponding to a stock through at least one of the following collection methods: obtain the stock data corresponding to the stock in the database; call an application programming interface (API) to obtain the stock data corresponding to the stock; crawl the historical data on the web page and the historical behavior parameters of the target object (whether to select this stock as a favorite stock or whether there is a trading record) through a web crawler.

[0096] Exemplarily, the text information processing device can be a server provided by an operator, which is provided with a database for storing historical stock data. This database stores the stock data of multiple individual stocks for a period of time (such as one month), as well as the overall market data for a period of time. For example, when the server needs to obtain individual stock data (which can also be overall market data), based on the code of the individual stock to be obtained, it queries the individual stock data corresponding to this code in the database. Exemplarily, when the server needs to obtain the real-time data of a stock, it calls the API and obtains the real-time data of the individual stock and the overall market data to be obtained through the data interface with the stock exchange. Exemplarily, when the server needs to obtain individual stock data (which can also be overall market data), the server can crawl the stock data corresponding to this individual stock on relevant external websites through a web crawler. In the operation of financial products, the comment statements of a user on a certain stock or the trading note information of a certain sector of stocks can be obtained as the to-be-processed text information matching the target object. By analyzing the emotional state of the to-be-processed text information, stocks (or the stock types of a certain sector) corresponding to the text information with a positive emotional state can be recommended to the user in the financial mini-program.

[0097] Step 302: The text information processing device performs syntactic analysis processing on the to-be-processed text information to obtain the syntactic analysis result of the to-be-processed text information.

[0098] In some embodiments of the present invention, performing syntactic analysis processing on the to-be-processed text information to obtain the syntactic analysis result of the to-be-processed text information can be achieved by the following method:

[0099] According to the recognition environment of the to-be-processed text information, a corresponding word segmentation library is triggered; the to-be-processed text information is segmented by the word dictionary of the triggered word segmentation library to extract Chinese character text and form different word-level feature vectors; the word-level feature vectors are subjected to dependency syntactic processing to obtain at least one dependency relationship; according to the subject-predicate relationship in the at least one dependency relationship, the word-level feature vectors are analyzed to obtain the syntactic analysis result in the to-be-processed text. Among them, taking the recognition environment of the to-be-processed text information as the financial scenario of stock trading as an example, when obtaining the syntactic analysis result, the financial scenario dictionary and the stock trading word segmentation dictionary are first triggered. For Chinese financial text information, the Chinese word segmentation tool Jieba can be used to segment the Chinese text. Among them, for the to-be-processed text information "The highest market value of this stock 6001 occurred in 2001", after segmentation using the word segmentation dictionary, it becomes "This / only / stock / 6001 / of / the / highest / market value / occurred / in / two / zero / zero / one / year". Among them, "stock" and "6001" have noun meanings as segmented words; each segmented word is a word or phrase, that is, the smallest semantic unit with a definite meaning; for the recognition environment of the to-be-processed text information, the smallest semantic units it needs to divide are also different. For example, for the financial scenario, the smallest semantic unit needs to be a phrase, and when recording the emotional state of the user preference scenario, the smallest semantic unit needs to be a single character. Therefore, it is necessary to make timely adjustments to the smallest semantic unit to ensure the accuracy of the emotional state; for the Chinese to-be-processed text information, since the words that are the smallest semantic units are often composed of different numbers of characters and there is no natural separation mark such as a blank space between words in alphabetic languages, for Chinese, accurately segmenting words to obtain reasonable word segmentation objects is an important step.

[0100] Further, the dependency parsing (DP) used in the embodiments of the present application is also one of the key technologies in the field of NLP, which refers to determining the dependency relationships between different words in the text, such as subject-predicate relationships and verb-object relationships. Since the subject in the text to be processed is usually the main component, after obtaining multiple word-level feature vectors in the text, dependency parsing is also performed on the multiple word-level feature vectors to obtain the dependency relationships between the word-level feature vectors. Different word feature vectors can be divided into dependent words: one word modifies another word, and governing words: the words being modified. The embodiments of the present application do not limit the manner of dependency parsing. Then, according to the subject-predicate relationships in the multiple dependency relationships, word-level feature vectors with the grammatical type of subject are screened out from the multiple word-level feature vectors, facilitating the matching of the types of the screened word-level feature vectors with the types of multiple set word-level feature vectors. Through the above method, word-level feature vectors with a higher degree of importance can be screened out, thereby further improving the accuracy of subsequent selection of knowledge extraction templates and the indirect object relationship.

[0101] In some embodiments of the present invention, when performing dependency parsing on word-level feature vectors to obtain at least one dependency relationship and analyzing the word-level feature vectors according to the subject-predicate relationships in the at least one dependency relationship to obtain the syntactic analysis result of the text to be processed, the processing of dependency parsing can be implemented by calling a dependency parsing module. Among them, the interface request domain name of the dependency parsing module is nlp.tencentcloudapi.com. Table 1 shows the input parameters of the interface of the dependency parsing module:

[0102] Table 1

[0103]

[0104] When analyzing the word-level feature vectors to obtain the syntactic analysis result of the text to be processed, for example, when the text information to be processed is "Chairman Zhao XX of XX Company collects and purchases 100 lots of XX stocks", the syntactic analysis result is:

[0105] Syntactic analysis results of person names and stocks: [["Zhao XX", "XX stocks"]];

[0106] Syntactic analysis results of person names and institutions: [["Zhao XX", "Chairman", "XX Company"]];

[0107] Syntactic analysis results of stocks and quantities: [["XX stocks", 100 lots]];

[0108] Syntactic analysis results of person names and actions: [["Zhao XX", "collects and purchases"]].

[0109] Step 303: The text information processing device determines multi-hop information at different levels of the syntactic analysis result according to the syntactic analysis result of the to-be-processed text information.

[0110] In some embodiments of the present invention, determining multi-hop information at different levels of the syntactic analysis result according to the syntactic analysis result of the to-be-processed text information can be implemented in the following manner:

[0111] Determine the syntactic structure information of different word-level feature vectors according to the syntactic analysis result of the to-be-processed text information; determine multi-hop information at different levels of the syntactic analysis result according to the syntactic structure information of the different word-level feature vectors, where the multi-hop information at least includes: one-hop information and two-hop information. Among them, refer to Figure 4 , Figure 4 is an optional processing process schematic diagram of multi-hop information in the embodiments of the present invention. Taking the to-be-processed text information "It hasbad money but a good battery ife" as an example, Figure 4 The subscripts 1, 2, and 3 in indicate how many relational steps the current word vector needs to go through to reach another word vector. In the dependency syntax of the embodiments of the present application, if there is a dependency relationship between two words (a, b) (the manifestation in the tree structure is that there is a direct edge connection, and it is a->b), then a->b can be defined as the one-hop information of multi-hop information at different levels. Similarly, if there is a dependency relationship b->c, but there is no direct dependency relationship between a->c, then a->b->c is defined as the two-hop information in multi-hop information at different levels. Therefore, the to-be-processed text can include multi-hop information at different levels, which can be recorded as one-hop information, two-hop information... N-hop information.

[0112] Step 304: The text information processing device determines a multi-level graph neural network that matches the to-be-processed text information based on the multi-hop information.

[0113] In some embodiments of the present invention, determining a multi-level graph neural network that matches the to-be-processed text information based on the multi-hop information can be implemented in the following manner:

[0114] Determine a local graph neural network that matches the to-be-processed text information according to the multi-hop information at different levels in the multi-hop information; determine a global graph neural network that matches the to-be-processed text information according to the complete sentence information in the to-be-processed text, where the multi-level graph neural network includes a global graph neural network and at least one local graph neural network. Among them, refer to Figure 5 , Figure 5This is an optional structural schematic diagram of a multi-level graph neural network in an embodiment of the present invention. When the local graph neural network Local_1GCN processes text information, it only uses the one-hop information in syntactic analysis, and the rest of the results are all set to 0. When the local graph neural network Local_2GCN processes text information, it only uses the two-hop information in syntactic analysis, and the rest of the results are all set to 0. The global graph neural network Global GCN can use all the results of syntactic analysis for all hops (that is, one-hop information + two-hop information... N-hop information, so it can also be called global multi-hop information). In the process of determining the multi-level graph neural network, due to the different multi-hop information of the text information to be processed, the structure of the multi-level graph neural network can also be adjusted. The structure of the multi-level graph neural network includes a global graph neural network and at least one local graph neural network. For example, taking the text information to be processed as "I collected xx stocks" as an example, each word vector "I", "collected", and "xx stocks" has a dependency relationship with each other (in the tree structure, it is directly connected by an edge, and it is "I" -> "collected" and "collected" -> "xx stocks"). Then, the one-hop information of different levels of multi-hop information of "I" -> "collected" can be defined, and at the same time, the dependency relationship "I" -> "xx stocks" is the two-hop information in different levels of multi-hop information. Therefore, the text information to be processed can include two levels of multi-hop information, which can be recorded as one-hop information and two-hop information. The multi-level graph neural network required for processing the text information to be processed includes: the local graph neural network Local_1GCN, the local graph neural network Local_2GCN, and the global graph neural network Global GCN.

[0115] In some embodiments of the present application, when the text information to be processed includes one-hop information, two-hop information, and three-hop information, the number of local graph neural networks is 3, namely: the local graph neural network Local_1GCN, the local graph neural network Local_2GCN, and the local graph neural network Local_3GCN. By calling the trained global graph neural network GlobalGCN and the 3 trained local graph neural networks Local_GCN together, the multi-level graph neural network required for processing the text information to be processed is formed. When the multi-hop information of the text information to be processed changes, the structure of the multi-level graph neural network used in the text information processing method provided by the present application also changes, so as to adapt to the requirements of text information processing in different scenarios.

[0116] By using the global graph neural network Global GCN, the meaning of a sentence can be understood from the overall perspective of the complete sentence of the text to be processed, so that the understanding of the sentence will not deviate. The local graph neural network Local_N GCN is used to enable the multi-level graph neural network to focus on its nearest attributes, so that when performing sentiment analysis, it is targeted at the subject corresponding to any one-hop information, ensuring the relevance of the attribute result analysis. Further, when obtaining the information between texts to be processed through one-hop information, two-hop information, and three-hop information, by capturing the information of the syntactic structure, it is converted into the information between hops, and then the information of the hops is converted into the adjacency matrix of the multi-level graph neural network GCN. Through this series of conversions, the data that needs to be input into the multi-level graph neural network can be obtained. With the information extraction ability of the multi-level graph neural network GCN, the multi-level graph neural network can effectively obtain the association information between various elements.

[0117] Step 305: The text information processing device processes the text information to be processed through the multi-level graph neural network to obtain a classification result of the text information to be processed, so as to determine the emotional state of the text information to be processed through the classification result.

[0118] In some embodiments of the present invention, refer to Figure 6 , Figure 6 which is an optional flowchart of the text information processing method provided by the embodiments of the present invention, and specifically includes the following steps:

[0119] Step 601: Process the text information to be processed through the local graph neural network to obtain a first processing result.

[0120] In an embodiment of the present application, the text information to be processed is respectively:

[0121] 1) The operation experience of the financial transaction applet is great, but its funds are always losing money.

[0122] 2) The funds of the financial transaction applet are great, but its funds are always losing money.

[0123] Among them, taking the number of local graph neural networks as 2 as an example, the local graph neural network Local_1GCN only uses the one-hop information in syntactic analysis when processing text information, and all other results are set to 0. The local graph neural network Local_1GCN only uses the two-hop information in syntactic analysis when processing text information, and all other results are set to 0. The obtained first processing result can be a feature vector representing relevance. The local graph neural network is to focus on the nearest attributes of the text information, ensuring the relevance of the attribute result analysis.

[0124] Among them, a graph neural network (GNN) can ignore the input order of nodes; during the calculation process, the representation of a node is affected by its surrounding neighbor nodes, while the connections of the graph itself remain unchanged; a graph neural network consists of two modules: a propagation module and an output module. The propagation module is used to transmit information between nodes in the graph and update the state, and the output module is used to define an objective function based on the vector representations of the nodes and edges of the graph according to different tasks. Graph neural networks include: graph convolutional networks (GCNs), gated graph neural networks (GGNNs), and graph attention networks (GAT) based on the attention mechanism. The advantage of predicting target stocks through a graph neural network is that based on the constructed graph network, each node in the graph network can automatically transmit all the feature (trend) information of the node to adjacent neighbor nodes. Through multiple information propagations between neighbors, each node in the graph network can contain the attribute information of nodes directly or indirectly related to itself.

[0125] In some embodiments of the present invention, referring to Figure 7 , Figure 7 is a schematic diagram of the graph neural network structure provided by the embodiments of the present invention. Since in the global graph network provided in this application, nodes with direct or indirect connections mostly have similar trends. The propagation method between layers of the graph neural network refers to Formula 1:

[0126]

[0127] Among them: A = A + I, where I is the identity matrix and D is the degree matrix of A; H is the feature of each layer; W is the parameter matrix from the input layer to the hidden layer in the graph neural network. The constructed graph neural network has N nodes, and each node represents an associated object of the target object. The features of these nodes form an N×D-dimensional matrix X, and then the relationships between each node will also form an N×N-dimensional matrix A, also known as the adjacency matrix. X and A are the inputs of the graph neural network. Among them, tanh is the activation function between multiple layers of the network. Refer to Formula 2:

[0128] Z = tanh(A tanh(A tanh(AXW (0) )W (1) )W (2) ) Formula 2

[0129] After that, where A is the input between multiple layers of the network, W(0) W (1) and W (2) are parameter matrices between different hidden layers

[0130] Two fully connected layers are used to map the learned distributed feature representations to the corresponding sample label spaces to improve the accuracy of the final classification results. Finally, a normalization operation is performed on the vector, and the maximum value in the vector is taken; then it is mapped back to the corresponding sentiment label, which is the most likely sentiment state of the attribute.

[0131] Step 602: Process the to-be-processed text information through the global graph neural network to obtain a second processing result.

[0132] Among them, the second processing result can be a feature vector calculated by the global graph neural network. The global graph neural network Global GCN uses the results of all hops obtained by syntactic analysis to understand the meaning of the text information from the overall perspective of the text, so that the meaning of the recognized text information will not deviate, ensuring the accuracy of recognition.

[0133] Step 603: Based on the attention mechanism, fuse the first processing result and the second processing result to obtain a fused processing result, and perform a normalization process on the fused processing result to obtain the classification result of the to-be-processed text information. Among them, through the text information processing method provided by this application, different attribute expression results are obtained according to diversified GCNs, effectively ensuring the sentiment analysis results of specific attributes. Since sentiment can be divided into 3 types: positive (forward), negative (backward), and neutral, corresponding labels can be set for each sentiment classification. By performing a normalization process on the fused processing result, the maximum value of the vector in the fused processing result is obtained, and the vector maximum value is mapped to the corresponding sentiment label to obtain the sentiment state. Further, the target object can adjust the labels of the sentiment classification according to different usage requirements, for example, only retaining the positive sentiment label to only obtain the positive sentiment analysis result in the to-be-processed text.

[0134] In some embodiments of the present application, for the text information: 1) The operation experience of the financial transaction mini-program is great, but its funds always incur losses. 2) The funds of the financial transaction mini-program are great, but its funds always incur losses. By fusing the processing results, different classification results can be obtained: 1) The subject is: the recommended funds, (the emotional state is negative -1), 2) The subject is: the operation experience, (the emotional state is positive 1). Thus, analyzing the sentiment of the funds recommended by the financial transaction mini-program, it can be obtained that it is negative, but when the subject of the text information in 2) becomes the operation experience of the financial transaction mini-program, it is positive. Through the multi-level graph neural network provided by the present application, text information of different subjects can be accurately processed, so that the emotional states of different subjects can be effectively identified.

[0135] At the same time, considering that in practical applications, the solution of the present application can be implemented not only through a financial APP, but also through an instant messaging software mini-program. Therefore, by storing the multi-level graph neural network in a financial blockchain, when the user changes the terminal, the text information processing model deployed in the blockchain network can be used to quickly predict the financial text information of different target objects.

[0136] Specifically, the target object identifier, the model parameters of the text information processing model, and the target object identifier can be sent to the blockchain network, so that the nodes of the blockchain network fill the target object identifier, the model parameters of the text information processing model, and the target object identifier into a new block, and when consensus is reached on the new block, the new block is appended to the tail of the blockchain.

[0137] Among them, the embodiments of the present invention can be implemented in combination with cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing. It can also be understood as the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. Therefore, cloud technology needs to be supported by cloud computing.

[0138] It should be noted that cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". The resources in the "cloud" seem to users to be infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid according to usage. As a basic capability provider of cloud computing, a cloud computing resource pool platform, abbreviated as a cloud platform, is generally referred to as Infrastructure as a Service (IaaS). Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud computing resource pool mainly includes: computing devices (which can be virtual machines, including operating systems), storage devices, and network devices.

[0139] Combined with the foregoing Figure 1 As shown, the text information processing method provided by the embodiments of the present invention can be implemented through corresponding cloud devices. For example: terminals (including terminal 10-1 and terminal 10-2) are connected to the server 200 located in the cloud through the network 300. The network 300 can be a wide area network, a local area network, or a combination of the two. It is worth noting that the server 200 can be a physical device or a virtualized device.

[0140] Beneficial technical effects:

[0141] In the embodiments of the present invention, by responding to a text information processing request, the text information to be processed is obtained; syntactic analysis processing is performed on the text information to be processed to obtain a syntactic analysis result of the text information to be processed; according to the syntactic analysis result of the text information to be processed, different-level multi-hop information of the syntactic analysis result is determined; based on the multi-hop information, a multi-level graph neural network matching the text information to be processed is determined; through the multi-level graph neural network, the text information to be processed is processed to obtain a classification result of the text information to be processed, so as to determine the emotional state of the text information to be processed through the classification result, and it can be realized that the emotional state of the text information is analyzed diversely through the multi-level graph neural network, reducing the complexity of text information emotional analysis, improving the accuracy of emotional analysis, and enhancing the user experience.

[0142] The above is only the embodiments of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for processing text information, characterized in that, the method includes: responding to a text information processing request, and obtaining the text information to be processed; performing syntactic analysis processing on the text information to be processed to obtain a syntactic analysis result of the text information to be processed; determining multi-hop information at different levels of the syntactic analysis result according to the syntactic analysis result of the text information to be processed; determining a multi-level graph neural network matching the text information to be processed based on the multi-hop information; wherein, the multi-level graph neural network includes a global graph neural network matching the text information to be processed and a plurality of local graph neural networks; processing the text information to be processed through the global graph neural network and the plurality of local graph neural networks respectively to obtain a processing result of the global graph neural network and processing results of the local graph neural networks; performing fusion processing on the processing results of the global graph neural network and the plurality of local graph neural networks to obtain a fusion processing result, and performing normalization processing on the fusion processing result to obtain a classification result of the text information to be processed; wherein, the multi-hop information includes one-hop information, two-hop information... N-hop information; when each local graph neural network processes text information, only one of the multi-hop information is used, and the rest of the results are all set to 0, and the global graph neural network uses the global multi-hop information in the syntactic analysis result; when the multi-hop information of the text information to be processed changes, updating the structure of the multi-level graph neural network, wherein different multi-hop information corresponds to different structures of the multi-level graph neural network.

2. The method according to claim 1, characterized in that, the responding to a text information processing request and obtaining the text information to be processed includes: analyzing the text information processing request to determine a target object included in the text information processing request and a financial scenario corresponding to the target object; in the financial scenario, determining historical behavior parameters of the target object and historical parameters of the financial scenario; performing data cross-screening processing on the historical behavior parameters of the target object and the historical parameters of the financial scenario based on the target object to obtain the text information to be processed matching the target object.

3. The method according to claim 1, characterized in that, the performing syntactic analysis processing on the text information to be processed to obtain a syntactic analysis result of the text information to be processed includes: triggering a corresponding word segmentation library according to the recognition environment of the text information to be processed; performing word segmentation processing on the text information to be processed through the word dictionary of the triggered word segmentation library, extracting Chinese character text, and forming different word-level feature vectors; performing dependency syntactic processing on the word-level feature vectors to obtain at least one dependency relationship; analyzing the word-level feature vectors according to the subject-predicate relationship in the at least one dependency relationship to obtain a syntactic analysis result in the text information to be processed.

4. The method according to claim 3, characterized in that, Determining multi-hop information at different levels of the syntactic analysis result according to the syntactic analysis result of the to-be-processed text information includes: Determining syntactic structure information of different word-level feature vectors according to the syntactic analysis result of the to-be-processed text information; Determining multi-hop information at different levels of the syntactic analysis result according to the syntactic structure information of the different word-level feature vectors, where the multi-hop information at different levels includes at least: one-hop information and two-hop information.

5. The method according to claim 1, wherein, Determining a multi-level graph neural network that matches the to-be-processed text information based on the multi-hop information includes: Determining a local graph neural network that matches the to-be-processed text information according to the multi-hop information at different levels in the multi-hop information; Determining a global graph neural network that matches the to-be-processed text information according to the complete sentence information in the to-be-processed text, where the multi-level graph neural network includes a global graph neural network and at least one local graph neural network.

6. The method according to claim 5, wherein, Processing the to-be-processed text information through the global graph neural network and the multiple local graph neural networks respectively includes: Processing the to-be-processed text information through the local graph neural network to obtain a first processing result; Processing the to-be-processed text information through the global graph neural network to obtain a second processing result; Fusing the processing results of the global graph neural network and the multiple local graph neural networks to obtain a fused processing result includes: Fusing the first processing result and the second processing result based on an attention mechanism to obtain a fused processing result.

7. A text information processing device, wherein, The device includes: An information transmission module, configured to obtain to-be-processed text information in response to a text information processing request; An information processing module, configured to perform syntactic analysis processing on the to-be-processed text information to obtain a syntactic analysis result of the to-be-processed text information; The information processing module is configured to determine multi-hop information at different levels of the syntactic analysis result according to the syntactic analysis result of the to-be-processed text information; The information processing module is configured to determine a multi-level graph neural network that matches the to-be-processed text information based on the multi-hop information; where the multi-level graph neural network includes a global graph neural network that matches the to-be-processed text information and multiple local graph neural networks; The information processing module is configured to process the to-be-processed text information through the global graph neural network and the multiple local graph neural networks respectively to obtain the processing result of the global graph neural network and the processing results of the local graph neural networks; fuse the processing results of the global graph neural network and the multiple local graph neural networks to obtain a fused processing result, and perform normalization processing on the fused processing result to obtain a classification result of the to-be-processed text information; Among them, the multi-hop information includes one-hop information, two-hop information... N-hop information; when each of the local graph neural networks processes text information, only one of the multi-hop information is used, and the rest of the results are all set to 0, and the global graph neural network uses the global multi-hop information in the syntactic analysis result; When the multi-hop information of the text information to be processed changes, the structure of the multi-level graph neural network is updated, where different multi-hop information corresponds to different structures of the multi-level graph neural network.

8. An electronic device, Characterized in that, The electronic device includes: A memory for storing executable instructions; A processor for implementing the text information processing method according to any one of claims 1 to 6 when running the executable instructions stored in the memory.

9. A computer program product, including a computer program or instruction, Characterized in that, When the computer program or instruction is executed by a processor, the text information processing method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium storing executable instructions, Characterized in that, When the executable instructions are executed by a processor, the text information processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Aspect-level text sentiment classification method and system

    CN112347248A

  • Aspect-level sentiment analysis method based on graph neural network

    CN113535904A