Natural language processing task processing method and device, server and medium

By using the deep tree intersection model to classify the pending data of natural language processing tasks, selecting the parameters with the highest score of leaf nodes as the processing result, solving the inefficiency problem caused by the huge parameters of the existing multi-layer perceptron model, and achieving more efficient natural language processing.

CN119848260APending Publication Date: 2025-04-18CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311330337.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-13
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing multi-layer perceptron model has huge parameters and high computational pressure in natural language processing tasks, resulting in low processing efficiency.

Method used

The pre-trained deep tree intersection model is used to input the pending data of natural language processing tasks into the model, and the data is characterized by multiple tree structures, and the leaf node parameters with the highest score of leaf nodes are selected as the processing result.

Benefits of technology

It effectively reduces model parameters, improves the processing efficiency of natural language processing tasks, and saves equipment computing power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848260A_ABST
    Figure CN119848260A_ABST
Patent Text Reader

Abstract

The invention provides a natural language processing task processing method and device, a server and a medium. The method comprises the steps of inputting to-be-processed data of a natural language processing task into a pre-trained depth tree intersection model, performing feature classification on the to-be-processed data through a plurality of tree structures in the depth tree intersection model, and taking a leaf node parameter with the highest leaf node score in each tree structure as a parameter selected by a current tree, and obtaining a processing result according to the parameter. According to the method provided by the invention, the processing efficiency of the natural language processing task is improved while the computing power of equipment is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to artificial intelligence technology, and in particular to a method, device, server and medium for processing natural language processing tasks. Background Art

[0002] Natural language processing is one of the most important fields in artificial intelligence. Natural language processing is an important technology that reflects language intelligence. It can analyze, understand or generate natural language and realize natural communication between people and machines. Natural language processing tasks include text classification, sentiment analysis, sequence labeling, etc.

[0003] At present, deep learning models have been widely used in natural language processing. The basis of deep learning is the Multi-Layer Perception (MLP) model. Each layer of the existing MLP is fully connected, and all training parameters of each layer will be applied to all inputs of this layer. The parameters are huge, the computing pressure of the equipment is also high, and the processing efficiency of natural language processing tasks is low. Summary of the invention

[0004] The present application provides a method, device, server and medium for processing natural language processing tasks. The processing results are obtained by inputting the data to be processed of the natural language processing task into a pre-trained deep tree intersection model. The deep tree intersection model can screen parameters according to different feature categories, effectively reducing model parameters and improving the processing efficiency of the natural language processing task.

[0005] In a first aspect, the present application provides a method for processing a natural language processing task, comprising: obtaining data to be processed for the natural language processing task; inputting the data to be processed into a pre-trained deep tree intersection model to obtain a processing result of the natural language processing task; wherein the deep tree intersection model comprises a plurality of tree structures, each of the plurality of tree structures comprises an input node, a transformation node and a leaf node, the input node of each tree structure is used to input the data to be processed, the transformation node of each tree structure is used to perform a linear transformation on the data to be processed, the leaf node of each tree structure is used to output a leaf node score based on the data after the linear change, and the processing result is obtained based on the parameters corresponding to the leaf node with the highest leaf node score of each tree structure.

[0006] In combination with the first aspect, in certain implementations of the first aspect, the data to be processed is input into a pre-trained deep tree intersection model to obtain a processing result of the natural language processing task, including: inputting the data to be processed into the input node of each tree structure to obtain multiple leaf node scores of each tree structure; based on the multiple leaf node scores of each tree structure, selecting the leaf node with the highest leaf node score of each tree structure as the target leaf node; based on the parameters corresponding to the target leaf nodes of each tree structure, calculating the processing result.

[0007] In combination with the first aspect, in certain implementations of the first aspect, the step of inputting the data to be processed into the input node of each tree structure to obtain multiple leaf node scores of each tree structure includes: inputting the data to be processed into the input node of each tree structure, and obtaining multiple leaf node scores of each tree structure based on linear transformation and Gumbel distribution function.

[0008] In combination with the first aspect, in certain implementations of the first aspect, the parameters corresponding to the target leaf nodes of each tree structure include weight parameters and bias parameters; the processing result is calculated based on the parameters corresponding to the target leaf nodes of each tree structure, including: summing or multiplying the weight parameters corresponding to the target leaf nodes of each tree structure to obtain a first logical parameter; summing or multiplying the bias parameters corresponding to the target leaf nodes of each tree structure to obtain a second logical parameter; based on the first logical parameter and the second logical parameter, a preset activation function is used to calculate the processing result.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the natural language processing task is a sentiment analysis task, and the multiple tree structures include a tree structure for age feature selection, a tree structure for educational feature selection, and a tree structure for occupation feature selection.

[0010] In a second aspect, the present application provides a processing device for a natural language processing task, comprising: an acquisition module for acquiring data to be processed for the natural language processing task; a processing module for inputting the data to be processed into a pre-trained deep tree intersection model to obtain a processing result of the natural language processing task; wherein the deep tree intersection model comprises a plurality of tree structures, each of the plurality of tree structures comprises an input node, a transformation node and a leaf node, the input node of each tree structure being used to input the data to be processed, the transformation node of each tree structure being used to perform a linear transformation on the data to be processed, the leaf node of each tree structure being used to output a leaf node score based on the data after the linear change, and the processing result is obtained based on the parameters corresponding to the leaf node with the highest leaf node score of each tree structure.

[0011] Optionally, the processing module is specifically used to: input the data to be processed into the input node of each tree structure to obtain multiple leaf node scores of each tree structure; based on the multiple leaf node scores of each tree structure, select the leaf node with the highest leaf node score of each tree structure as the target leaf node; based on the parameters corresponding to the target leaf node of each tree structure, calculate the processing result.

[0012] Optionally, the processing module is further specifically used to: input the data to be processed into the input node of each tree structure, and obtain multiple leaf node scores of each tree structure based on linear transformation and Gumbel distribution function.

[0013] Optionally, the parameters corresponding to the target leaf nodes of each tree structure include weight parameters and deviation parameters, and the processing module is further specifically used to: sum or product the weight parameters corresponding to the target leaf nodes of each tree structure to obtain a first logical parameter; sum or product the deviation parameters corresponding to the target leaf nodes of each tree structure to obtain a second logical parameter; based on the first logical parameter and the second logical parameter, use a preset activation function to calculate the processing result.

[0014] In a third aspect, the present application provides a server, comprising: a processor, and a memory communicatively connected to the processor;

[0015] The memory stores computer-executable instructions;

[0016] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.

[0017] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0018] The present application provides a method, device, server and medium for processing natural language processing tasks, which inputs the data to be processed of the natural language processing task into a pre-trained deep tree intersection model, performs feature classification on the data to be processed through multiple tree structures in the deep tree intersection model, uses the leaf node parameter with the highest leaf node score in each tree structure as the parameter selected by the current tree, and obtains the processing result based on the parameter. The method provided by the present application classifies the data to be processed input into the deep tree model based on its data features, and selects parameters corresponding to each feature through different trees in the model. In this way, all parameters in the model do not need to participate in the result calculation, which saves the computing power of the equipment and improves the processing efficiency of the natural language processing task. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] Figure 1 A diagram showing an example structure of a multi-layer perceptron model provided in an embodiment of the present application;

[0021] Figure 2 A schematic flowchart of a method for processing a natural language processing task provided in an embodiment of the present application;

[0022] Figure 3 A schematic flowchart of another method for processing a natural language processing task provided in an embodiment of the present application;

[0023] Figure 4 An example diagram of the three-level structure of a single tree provided in an embodiment of the present application;

[0024] Figure 5 An example diagram of a two-dimensional deep tree intersection model provided in an embodiment of the present application;

[0025] Figure 6 A processing device for a natural language processing task provided in an embodiment of the present application;

[0026] Figure 7 A schematic diagram of a server structure provided in an embodiment of the present application.

[0027] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field under the enlightenment of the embodiments belong to the scope of protection of the present application.

[0029] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Next, let’s first introduce the multi-layer perceptron model that is widely used in natural language processing tasks in the prior art.

[0031] Figure 1 This is a diagram showing an example of the structure of a multi-layer perceptron model provided in an embodiment of the present application. Figure 1 As shown, the multi-layer perceptron model structure has an input layer x and a hidden layer y (1) ,y (2) , output layer y (3) , where the number of hidden layers depends on the needs. Figure 1 The multilayer perceptron model shown in contains two hidden layers y (1) and (2) .

[0032] like Figure 1 As shown, in the input layer x, x∈{x1,x2,…,x D} is the input value of D feature dimensions, and the data in the input layer passes through two hidden layers y (1) and (2) , in the output layer y (3) Returns K values, namely

[0033] The input values ​​of the D features input in the input layer x are propagated from the input layer to the first hidden layer, and the propagation satisfies the following formula (1):

[0034] y (1) =σ(W (1) ·x+b (1) ) (1)

[0035] Among them, W (1) is the weight parameter of the first hidden layer, b (1) is the bias parameter of the first hidden layer. If the first hidden layer consists of M neurons, then W (1) ∈R D×M , b(1) ∈R 1×M ; σ is the activation function, which is used for nonlinear function transformation.

[0036] In the multi-layer perceptron model, the first hidden layer y (1) The output value of will be used as the next hidden layer y (2) The input of the second hidden layer y (2) The output satisfies the following formula (2):

[0037] y (2) =σ(W (2) ·y (1) +b (2) ) (2)

[0038] Among them, W (2) is the weight parameter of the second hidden layer, b (2) is the bias parameter of the second hidden layer. If the second hidden layer consists of N neurons, then W (2) ∈R M×N , b (2) ∈R 1×N .

[0039] Then, the second hidden layer y (2) The output value is used as the output layer y (3) The input and output layer values ​​satisfy the following formula (3):

[0040] y (3) =softmax(W (3) ·y (2) +b (3) ) (3)

[0041] Among them, W (3) is the weight parameter of the output layer, b (3) is the bias parameter of the output layer. If K categories are output, then W (3) ∈R N×K , b (2) ∈R 1×K The normalized exponential function softmax is used for multi-classification tasks and can convert the K values ​​of the output layer into a probability distribution ranging from [0,1] and summing to 1.

[0042] Right now Among them, z i The output layer y (3) The i-th value returned, i = 1, 2, 3, ..., K, and

[0043] It should be understood that the weight parameter W of the first hidden layer (1)and the deviation parameter b (1) , the weight parameter W of the second hidden layer (2) and the deviation parameter b (2) , and the weight bias W of the output layer (3) and the deviation parameter b (3) All of them are obtained after the multi-layer perceptron model training is completed.

[0044] In the multi-layer perceptron model, each neuron in each layer is connected to each neuron in the previous layer. Therefore, the hidden layer and output layer in the multi-layer perceptron are fully connected layers (FC). All parameters of each layer are applied to the input of this layer to obtain the output value of this layer. Therefore, in the prior art, in the process of natural language processing, the number of model parameters is huge, and the number of parameters involved in the calculation is large, the operation efficiency is low, and a more powerful central processing unit (CPU) is required.

[0045] In view of this, the present application proposes a method for processing natural language processing tasks, which uses a deep tree intersection model as a deep learning model for processing natural language, performs feature classification on the data to be processed in the natural language processing task, and obtains model parameters according to the logical parameters of different features to reduce the parameters involved in the calculation during the processing of the data to be processed, thereby improving the processing efficiency of the natural language processing task.

[0046] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0047] Figure 2 A schematic flow chart of a method 200 for processing a natural language processing task provided in an embodiment of the present application. Figure 2 , the method 200 comprises the following steps:

[0048] S201. Obtain data to be processed for a natural language processing task.

[0049] S202: Input the data to be processed into a pre-trained deep tree intersection model to obtain a processing result of the natural language processing task.

[0050] Among them, the deep tree intersection model includes multiple tree structures, each of the multiple tree structures includes an input node, a transformation node and a leaf node, the input node of each tree structure is used to input the data to be processed, the transformation node of each tree structure is used to perform linear transformation on the data to be processed, and the leaf node of each tree structure is used to output the leaf node score based on the data after linear transformation, and the processing result is obtained based on the parameters corresponding to the leaf node with the highest leaf node score in each tree structure.

[0051] It should be understood that the tree structure in the deep tree intersection model has at least three levels. The top is the first level, which serves as the input of the tree structure and is composed of an input node; the middle level can be one level or multiple levels, and each middle level is composed of multiple transformation nodes; the bottom is the last level, which is composed of multiple leaf nodes.

[0052] Optionally, the data to be processed input to the input node may be a scalar, or a vector or a matrix, which is not specifically limited in the present application.

[0053] The method provided in the embodiment of the present application inputs the data to be processed of the natural language processing task into a pre-trained deep tree intersection model, performs feature classification on the data to be processed through multiple tree structures in the deep tree intersection model, uses the leaf node parameter with the highest leaf node score in each tree structure as the parameter selected by the current tree, and obtains the processing result according to the parameter. The method provided in the present application performs classification processing on the data to be processed input into the deep tree model based on its data features, selects parameters corresponding to each feature through different trees in the model, so that all parameters in the model do not need to participate in the result calculation, which saves the computing power of the equipment and improves the processing efficiency of the natural language processing task.

[0054] As an optional embodiment, Figure 3 A method 300 is a possible implementation of the above S202, and the method 300 includes the following steps:

[0055] S301 , inputting the data to be processed into the input node of each tree structure, and obtaining scores of multiple leaf nodes of each tree structure.

[0056] S302 . Based on the scores of multiple leaf nodes of each tree structure, select a leaf node with the highest score in each tree structure as a target leaf node.

[0057] S303: Calculate and obtain a processing result based on the parameters corresponding to the target leaf node of each tree structure.

[0058] A possible implementation of the above S301 includes: inputting the data to be processed into the input node of each tree structure, and obtaining multiple leaf node scores of each tree structure based on linear transformation and Gumbel distribution function.

[0059] Figure 4 The tree structure is a three-level single tree full binary structure, such as Figure 4 As shown in , the data of the input node is transmitted to the transformation node through linear transformation and activation function, and the data of the transformation node is transmitted to the leaf node through linear transformation and activation function. Figure 4 In the tree structure shown, the input node is the 0th layer, the transformation node is the first layer, and the leaf node is the second layer. Figure 4 , taking the data to be processed in the natural language processing task as vector data as an example, the method provided in the embodiment of the present application is described in detail.

[0060] In one possible implementation, the transformation node can be represented as The output of the transformation node satisfies the following formula (4):

[0061]

[0062] Where X is the data input to the input node, i represents the transformation layer number of the current node, j represents the position of the current node in the current layer, and t represents the number of the current tree structure. is the weight parameter when the tree structure numbered t is linearly transformed to the jth position of the i-th layer, is the deviation parameter when the tree structure numbered t is linearly transformed to the jth position of the i-th layer.

[0063] In one possible implementation, a leaf node can be represented as The output of the leaf node satisfies the following formula (5):

[0064]

[0065] in, is the value of the transformation node in the previous layer of the leaf node, i represents the layer number of the current node, j represents the position of the current node in the current layer, and t represents the number of the current tree structure. is the weight parameter when the tree structure numbered t is linearly transformed to the jth position of the i-th layer, is the deviation parameter when the tree structure numbered t is linearly transformed to the jth position of the i-th layer.

[0066] In one possible implementation, represents the score (LeafScore) of the jth leaf node of the tth tree. The scores of the multiple leaf nodes each satisfy the following formula (6):

[0067]

[0068] Among them, L trepresents the number of leaf nodes in the tree numbered t, represents the data of the jth leaf node in the tree numbered t, g j =-log(-log(u j )),u j ~U(0,1) is the Gumbel distribution. The smaller τ is (τ→0), the sampled vector tends to be a one-hot vector; the larger τ is (τ→∞), the sampled vector tends to be uniformly distributed.

[0069] It should be understood that the Gumbel-Softmax function can make the calculated leaf node score In the form of a one-hot vector, that is, a vector with only one element being 1 and the rest being 0, the leaf node with the highest score can be selected as the weight parameter C corresponding to the target leaf node by using the following formula (7): t and the deviation parameter d t .

[0070]

[0071] in, and Leaf nodes The corresponding weight parameters and bias parameters, is the leaf node score calculated by the above formula (6).

[0072] It should be understood that the weight parameters and bias parameters involved in the embodiments of the present application are obtained after training the deep tree intersection model, and the training process is the conventional training process for the deep learning model in the prior art, which will not be repeated here.

[0073] The deep tree intersection model provided in the present application includes multiple tree structures, each of which can calculate a target leaf node. The weight parameters and deviation parameters of the target leaf node obtained according to the data to be processed are a set of target physical parameters selected for each tree structure.

[0074] Figure 5 The two-dimensional deep tree intersection model is shown. The model includes two tree structures, each tree structure includes four leaf nodes, that is, each tree has four sets of physical parameters. The physical parameters of the eight leaf nodes of the two numbers can be composed as follows: Figure 5 The 16 logic parameters are shown.

[0075] A possible implementation method of the above S303 includes: summing or multiplying the weight parameters corresponding to the target leaf nodes of each tree structure to obtain a first logical parameter; summing or multiplying the deviation parameters corresponding to the target leaf nodes of each tree structure to obtain a second logical parameter; and calculating the processing result based on the first logical parameter and the second logical parameter.

[0076] The first logic parameter and the second logic parameter are target logic parameters selected according to the data to be processed. Figure 5 As shown, although the two-dimensional deep tree intersection model can have 16 combinations of logic parameters, the logic parameter combinations selected by tree 1 and tree 2 are 5 logic parameters, that is, only one set needs to be selected for the final result operation.

[0077] It should be understood that Figure 5 The two-dimensional deep tree intersection model shown is only exemplary, and the present application does not specifically limit the number of tree structures involved in the deep tree intersection model.

[0078] In a possible implementation, the first logic parameter A and the second logic parameter b satisfy the following formula (8):

[0079]

[0080] Among them, T is the number of tree structures in the deep tree comparison model.

[0081] In the deep tree intersection model for classification tasks, the processing result y obtained by the processed data x based on the first logical parameter A and the second logical parameter b satisfies the probability distribution obtained by the following formula (9).

[0082] y=softmax(A·x+b) (9)

[0083] According to the method provided in the embodiment of the present application, after the data to be processed of the natural language processing task is input into a pre-trained deep tree intersection model, the deep tree intersection model can select the physical parameters corresponding to the target leaf nodes of multiple trees according to the characteristics of the data to be processed, and sum or multiply the selected physical parameters to obtain the logical parameters required to obtain the processing results. This method does not require each physical parameter of the leaf node to participate in the result calculation, which can save equipment computing power and improve the processing efficiency of natural language processing tasks.

[0084] In a possible implementation, the natural language processing task is a sentiment analysis task in this article, and the multiple tree structures include a tree structure for age feature selection, a tree structure for educational background feature selection, and a tree structure for occupation feature selection.

[0085] Below, a 3D-Deep Tree-Intersect model is taken as an example to analyze the features of the natural language processing task, which is the sentiment analysis task in this article, and the three tree structures are age, occupation, and education level.

[0086] Among them, the first tree structure (t1) is used for age feature selection and is divided into elderly youth Two categories; the second tree structure (t2) is used for academic feature selection, divided into high school Undergraduate master Three categories; the third tree structure (t3) is used for occupational feature selection, divided into teachers student engineer Three categories. Each tree structure selects the physical parameters of the corresponding features based on the analysis of the input data, and combines the physical parameters into logical parameters for specific tasks. Table 1 shows an example of the logical relationship between text style, features and categories.

[0087] Table 1 Examples of text style composition

[0088] Text Style Features and categories Style 1 {Age: Elderly; Education: Bachelor’s degree; Occupation: Teacher} Style 2 {Age: Youth; Education: High School; Occupation: Student}

[0089] Inputting the text published by a 60-year-old retired professor and the text published by an 18-year-old high school student into the above-mentioned deep tree intersection model can perform sentiment classification on the input texts of different styles and output the processing result of whether the sentiment expression of the text is positive or negative.

[0090] Figure 6 A processing device 600 for a natural language processing task provided in an embodiment of the present application includes: an acquisition module 601 and a processing module 602. The acquisition module 601 is used to: acquire the data to be processed of the natural language processing task; the processing module 602 is used to: input the data to be processed into a pre-trained deep tree intersection model to obtain the processing result of the natural language processing task; wherein the deep tree intersection model includes multiple tree structures, each of the multiple tree structures includes an input node, a transformation node and a leaf node, the input node of each tree structure is used to input the data to be processed, the transformation node of each tree structure is used to perform a linear transformation on the data to be processed, and the leaf node of each tree structure is used to output a leaf node score based on the data after the linear change, and the processing result is obtained based on the parameters corresponding to the leaf node with the highest leaf node score of each tree structure.

[0091] Optionally, the processing module is specifically used to: input the data to be processed into the input node of each tree structure to obtain multiple leaf node scores of each tree structure; based on the multiple leaf node scores of each tree structure, select the leaf node with the highest leaf node score of each tree structure as the target leaf node; based on the parameters corresponding to the target leaf node of each tree structure, calculate the processing result.

[0092] Optionally, the processing module is further specifically used to: input the data to be processed into the input node of each tree structure, and obtain multiple leaf node scores of each tree structure based on linear transformation and Gumbel distribution function.

[0093] Optionally, the parameters corresponding to the target leaf node of each tree structure include a weight parameter and a deviation parameter, and the processing module is also specifically used to: sum or product the weight parameters corresponding to the target leaf node of each tree structure to obtain a first logical parameter; sum or product the deviation parameters corresponding to the target leaf node of each tree structure to obtain a second logical parameter; based on the first logical parameter and the second logical parameter, use a preset activation function to calculate the processing result.

[0094] A processing device for a natural language processing task provided in an embodiment of the present application can be used to implement the technical solution in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0095] Figure 7 A schematic diagram of the structure of a server 700 provided in an embodiment of the present application. Figure 7 The server 700 includes: a memory 701, a processor 702 and a communication interface 703. The memory 701 is used to store executable instructions of the processor.

[0096] The processor 702 is configured to perform any of the aforementioned method embodiments by executing executable instructions.

[0097] Optionally, the memory 701 can be independent or integrated with the processor 702. When the memory 701 is independently provided, the server 700 further includes a bus for connecting the memory 701 and the processor 702.

[0098] The server provided in the present application can be used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principles and technical effects are similar and will not be repeated here.

[0099] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the technical solution provided by any of the aforementioned method embodiments.

[0100] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0101] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for processing a natural language processing task, characterized in that: include: Obtain data to be processed for natural language processing tasks; Inputting the data to be processed into a pre-trained deep tree intersection model to obtain a processing result of the natural language processing task; Among them, the deep tree intersection model includes multiple tree structures, each of the multiple tree structures includes an input node, a transformation node and a leaf node, the input node of each tree structure is used to input the data to be processed, the transformation node of each tree structure is used to perform linear transformation on the data to be processed, and the leaf node of each tree structure is used to output a leaf node score based on the data after linear transformation, and the processing result is obtained based on the parameters corresponding to the leaf node with the highest leaf node score of each tree structure.

2. The method according to claim 1, characterized in that: The step of inputting the data to be processed into a pre-trained deep tree intersection model to obtain a processing result of the natural language processing task includes: Inputting the data to be processed into the input node of each tree structure to obtain scores of multiple leaf nodes of each tree structure; Based on the scores of multiple leaf nodes of each tree structure, select the leaf node with the highest score of each leaf node of each tree structure as the target leaf node; The processing result is obtained by calculation based on the parameters corresponding to the target leaf nodes of each tree structure.

3. The method according to claim 2, characterized in that The step of inputting the data to be processed into the input node of each tree structure to obtain scores of multiple leaf nodes of each tree structure includes: The data to be processed is input into the input node of each tree structure, and based on linear transformation and Gumbel distribution function, multiple leaf node scores of each tree structure are obtained.

4. The method according to claim 2, characterized in that: The parameters corresponding to the target leaf node of each tree structure include weight parameters and bias parameters; The calculating the processing result based on the parameters corresponding to the target leaf nodes of each tree structure includes: Performing a sum or product operation on the weight parameters corresponding to the target leaf nodes of each tree structure to obtain a first logical parameter; Performing a summation or product operation on the deviation parameters corresponding to the target leaf nodes of each tree structure to obtain a second logic parameter; Based on the first logic parameter and the second logic parameter, a preset activation function is used to calculate and obtain the processing result.

5. The method according to any one of claims 1 to 4, characterized in that The natural language processing task is a sentiment analysis task in this article, and the multiple tree structures include a tree structure for age feature selection, a tree structure for educational background feature selection, and a tree structure for occupation feature selection.

6. A processing device for a natural language processing task, characterized in that: include: An acquisition module is used to obtain the data to be processed for the natural language processing task; A processing module, used for inputting the data to be processed into a pre-trained deep tree intersection model to obtain a processing result of the natural language processing task; Among them, the deep tree intersection model includes multiple tree structures, each of the multiple tree structures includes an input node, a transformation node and a leaf node, the input node of each tree structure is used to input the data to be processed, the transformation node of each tree structure is used to perform linear transformation on the data to be processed, and the leaf node of each tree structure is used to output a leaf node score based on the data after linear transformation, and the processing result is obtained based on the parameters corresponding to the leaf node with the highest leaf node score of each tree structure.

7. The device according to claim 6, characterized in that The processing module is specifically used for: Inputting the data to be processed into the input node of each tree structure to obtain scores of multiple leaf nodes of each tree structure; Based on the scores of multiple leaf nodes of each tree structure, select the leaf node with the highest score of each leaf node of each tree structure as the target leaf node; The processing result is obtained by calculation based on the parameters corresponding to the target leaf nodes of each tree structure.

8. The device according to claim 7, characterized in that The processing module is also specifically used for: The data to be processed is input into the input node of each tree structure, and based on linear transformation and Gumbel distribution function, multiple leaf node scores of each tree structure are obtained.

9. The device according to claim 7, characterized in that The parameters corresponding to the target leaf node of each tree structure include a weight parameter and a deviation parameter, and the processing module is further specifically used for: Performing a sum or product operation on the weight parameters corresponding to the target leaf nodes of each tree structure to obtain a first logical parameter; Performing a summation or product operation on the deviation parameters corresponding to the target leaf nodes of each tree structure to obtain a second logic parameter; Based on the first logic parameter and the second logic parameter, a preset activation function is used to calculate and obtain the processing result.

10. A server, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.