CN114357969A - Data processing method and device based on graph attention network - Google Patents

Data processing method and device based on graph attention network Download PDF

Info

Publication number
CN114357969A
CN114357969A CN202111572546.0A CN202111572546A CN114357969A CN 114357969 A CN114357969 A CN 114357969A CN 202111572546 A CN202111572546 A CN 202111572546A CN 114357969 A CN114357969 A CN 114357969A
Authority
CN
China
Prior art keywords
information
word
node
attribute
attention network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111572546.0A
Other languages
Chinese (zh)
Inventor
黄于晏
陈畅新
钟艺豪
陈莹莹
孔晓晴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Youmi Technology Co ltd
Original Assignee
Youmi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Youmi Technology Co ltd filed Critical Youmi Technology Co ltd
Priority to CN202111572546.0A priority Critical patent/CN114357969A/en
Publication of CN114357969A publication Critical patent/CN114357969A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data processing method and a device based on a graph attention network, wherein the method comprises the following steps: detecting whether a text generation request is received or not to obtain a detection result; the text generation request comprises a plurality of input words; when the detection result is yes, processing the text generation request by using a preset information association model to obtain attribute word information; the attribute word information comprises L attribute word information; l is a positive integer greater than or equal to 1; the information association model comprises a first information association model based on the graph attention network and/or a second information association model; sorting and screening the attribute word information to obtain target text word information; the target text word information comprises a plurality of target text words; the target text word is used to generate marketing text. Therefore, the method and the device are beneficial to improving the information output quantity of the related words, so that the marketing text generation requirements with different lengths are met.

Description

Data processing method and device based on graph attention network
Technical Field
The invention relates to the technical field of data processing, in particular to a data processing method and device based on a graph attention network.
Background
At present, the problem of insufficient output information amount is easy to occur in the data processing process of generating the marketing text for the given input text. Therefore, it is important to provide a data processing method and apparatus based on a graph attention network to improve the information output of related words, so as to meet the generation requirements of marketing texts with different lengths.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a data processing method and device based on a graph attention network, which can process a text generation request by using an information association model to obtain attribute word information, and then perform comprehensive processing such as sequencing and screening on the attribute word information to obtain a target text word for generating a marketing text, thereby being beneficial to improving the information output quantity of associated words and further meeting the requirements of generating marketing texts with different lengths.
In order to solve the above technical problem, a first aspect of an embodiment of the present invention discloses a data processing method based on a graph attention network, where the method includes:
detecting whether a text generation request is received or not to obtain a detection result; the text generation request comprises a plurality of input words;
when the detection result is yes, processing the text generation request by using a preset information association model to obtain attribute word information; the attribute word information comprises L pieces of attribute word information; l is a positive integer greater than or equal to 1; the information association model comprises a first information association model based on a graph attention network and/or a second information association model;
sorting and screening the attribute word information to obtain target text word information; the target text word information comprises a plurality of target text words; the target text word is used for generating marketing text.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing the text generation request by using a preset information association model to obtain attribute word information includes:
processing all the input words by using the first information correlation model to obtain word vector information; the input word vector information comprises a plurality of word vector sub-information;
processing the word vector information by using the second information association model to obtain attribute word information; the attribute word information comprises first node word information, and/or second node word information, and/or third node word information; the first node word information, the second node word information and the third node word information respectively comprise T pieces of attribute word information; and T is a positive integer greater than or equal to 1.
As an optional implementation manner, in the first aspect of this embodiment of the present invention, the second information association model includes a first association submodel, and/or a second association submodel, and/or a third association submodel;
the processing the word vector information by using the second information association model to obtain attribute word information includes:
inputting the word vector information into the first association submodel to obtain the first node word information; the first node word information represents the incidence relation between the current node and the direct incidence node in the graph attention network; and/or the presence of a gas in the gas,
inputting the word vector information into the second association submodel to obtain second node word information; the second node word information represents the incidence relation between the current node and a first indirect incidence node in the graph attention network; the current node is separated from the first indirect association node by one node; and/or the presence of a gas in the gas,
inputting the word vector information into the third association submodel to obtain the third node word information; the third node word information represents the incidence relation between the current node and a second indirect incidence node in the graph attention network; the current node is separated from the second indirectly associated node by two of the nodes.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing all the input words by using the first information association model to obtain word vector information includes:
for any input word, judging whether a preset knowledge graph contains the input word or not to obtain an input judgment result;
when the input judgment result is yes, inputting the input word into the first information association model to obtain attribute word information corresponding to the input word;
when the input judgment result is negative, processing the input word by using a preset word threshold value and the first information association model to obtain threshold word information corresponding to the input word; the threshold word information comprises M pieces of attribute word information; the M matches the word threshold; and M is a positive integer greater than or equal to 1.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the text generation request further includes text length information;
the sorting and screening processing of the attribute word information to obtain target text word information includes:
calculating and ordering the attribute word information to obtain an attribute word sequence;
and processing the attribute word sequence and the text length information to obtain target text word information.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the performing a calculation sorting process on the attribute word information to obtain an attribute word sequence includes:
performing heat index calculation on the attribute word information by using a preset heat model to obtain word selection index information; the word selection index information comprises a plurality of word selection indexes; the heat model is used for processing at least 5 word selection indexes of any word direction quantum information in the attribute word information;
and sequencing all the word selection indexes in the word selection index information from large to small to obtain an attribute word sequence.
As an optional implementation manner, in the first aspect of this embodiment of the present invention, the word-oriented quantum information includes first word vector sub information and second word vector sub information;
the first word vector sub-information comprises index identification information, a first word vector and a second word vector; the dimension of the second word vector is greater than or equal to 4;
the second word vector sub-information comprises first connection entity identification information and second connection entity identification information; the first connection entity identification information and the second connection entity identification information represent a link relationship.
The second aspect of the embodiment of the invention discloses a data processing device based on a graph attention network, which comprises:
the detection module is used for detecting whether a text generation request is received or not to obtain a detection result; the text generation request comprises a plurality of input words;
the first processing module is used for processing the text generation request by using a preset information association model to obtain attribute word information when the detection result is yes; the attribute word information comprises L pieces of attribute word information; l is a positive integer greater than or equal to 1; the information association model comprises a first information association model based on a graph attention network and/or a second information association model;
the second processing module is used for carrying out sequencing and screening processing on the attribute word information to obtain target text word information; the target text word information comprises a plurality of target text words; the target text word is used for generating marketing text.
As one such optional implementation manner, in the second aspect of the embodiment of the present invention, the first processing module includes a first processing sub-module and a second processing sub-module, wherein:
the first processing submodule is used for processing all the input words by using the first information association model to obtain word vector information; the input word vector information comprises a plurality of word vector sub-information;
the second processing submodule is used for processing the word vector information by using the second information association model to obtain attribute word information; the attribute word information comprises first node word information, and/or second node word information, and/or third node word information; the first node word information, the second node word information and the third node word information respectively comprise T pieces of attribute word information; and T is a positive integer greater than or equal to 1.
As a further alternative implementation, in the second aspect of the embodiment of the present invention, the second information association model includes a first association submodel, and/or a second association submodel, and/or a third association submodel;
the second processing submodule processes the word vector information by using the second information association model, and the specific way of obtaining attribute word information is as follows:
inputting the word vector information into the first association submodel to obtain the first node word information; the first node word information represents the incidence relation between the current node and the direct incidence node in the graph attention network; and/or the presence of a gas in the gas,
inputting the word vector information into the second association submodel to obtain second node word information; the second node word information represents the incidence relation between the current node and a first indirect incidence node in the graph attention network; the current node is separated from the first indirect association node by one node; and/or the presence of a gas in the gas,
inputting the word vector information into the third association submodel to obtain the third node word information; the third node word information represents the incidence relation between the current node and a second indirect incidence node in the graph attention network; the current node is separated from the second indirectly associated node by two of the nodes.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the specific manner in which the first processing sub-module processes all the input words by using the first information association model to obtain word vector information is as follows:
for any input word, judging whether a preset knowledge graph contains the input word or not to obtain an input judgment result;
when the input judgment result is yes, inputting the input word into the first information association model to obtain attribute word information corresponding to the input word;
when the input judgment result is negative, processing the input word by using a preset word threshold value and the first information association model to obtain threshold word information corresponding to the input word; the threshold word information comprises M pieces of attribute word information; the M matches the word threshold; and M is a positive integer greater than or equal to 1.
As one optional implementation manner, in the second aspect of the embodiment of the present invention, the text generation request further includes text length information;
the second processing module performs sorting and screening processing on the attribute word information to obtain target text word information in a specific mode:
calculating and ordering the attribute word information to obtain an attribute word sequence;
and processing the attribute word sequence and the text length information to obtain target text word information.
As an optional implementation manner, in a second aspect of the embodiment of the present invention, the second processing module performs calculation and ordering processing on the attribute word information to obtain a specific manner of an attribute word sequence:
performing heat index calculation on the attribute word information by using a preset heat model to obtain word selection index information; the word selection index information comprises a plurality of word selection indexes; the heat model is used for processing at least 5 word selection indexes of any word direction quantum information in the attribute word information;
and sequencing all the word selection indexes in the word selection index information from large to small to obtain an attribute word sequence.
As one such optional implementation manner, in the second aspect of the embodiment of the present invention, the word-oriented quantum information includes first word-oriented vector sub information and second word-oriented vector sub information;
the first word vector sub-information comprises index identification information, a first word vector and a second word vector; the dimension of the second word vector is greater than or equal to 4;
the second word vector sub-information comprises first connection entity identification information and second connection entity identification information; the first connection entity identification information and the second connection entity identification information represent a link relationship.
The third aspect of the present invention discloses another data processing apparatus based on a graph attention network, the apparatus comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute part or all of the steps of the data processing method based on the graph attention network disclosed by the first aspect of the embodiment of the invention.
In a fourth aspect of the present invention, a computer storage medium is disclosed, where the computer storage medium stores computer instructions, and when the computer instructions are called, the computer instructions are configured to perform some or all of the steps in the data processing method based on the graph attention network disclosed in the first aspect of the embodiments of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, whether a text generation request is received or not is detected to obtain a detection result; the text generation request comprises a plurality of input words; when the detection result is yes, processing the text generation request by using a preset information association model to obtain attribute word information; the attribute word information comprises L attribute word information; l is a positive integer greater than or equal to 1; the information association model comprises a first information association model based on the graph attention network and/or a second information association model; sorting and screening the attribute word information to obtain target text word information; the target text word information comprises a plurality of target text words; the target text word is used to generate marketing text. Therefore, the method and the device can process the text generation request by using the information association model to obtain the attribute word information, and then perform comprehensive processing such as sequencing and screening on the attribute word information to obtain the target text word for generating the marketing text, thereby being beneficial to improving the information output quantity of the associated words and further meeting the requirements of generating the marketing texts with different lengths.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a data processing method based on a graph attention network according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another data processing method based on a graph attention network according to the embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a data processing apparatus based on a graph attention network according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of another data processing apparatus based on a graph attention network according to the embodiment of the present invention;
fig. 5 is a schematic structural diagram of another data processing apparatus based on a graph attention network according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or apparatus that comprises a list of steps or elements is not limited to those listed but may alternatively include other steps or elements not listed or inherent to such process, method, product, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention discloses a data processing method and device based on a graph attention network, which can process a text generation request by using an information association model to obtain attribute word information, and then perform comprehensive processing such as sequencing and screening on the attribute word information to obtain a target text word for generating a marketing text, thereby being beneficial to improving the information output quantity of associated words and further meeting the marketing text generation requirements with different lengths. The following are detailed below.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a data processing method based on a graph attention network according to an embodiment of the present invention. The data processing method based on the graph attention network described in fig. 1 is applied to a data processing system, such as a local server or a cloud server for data processing management based on the graph attention network, and the embodiment of the present invention is not limited thereto. As shown in fig. 1, the data processing method based on the graph attention network may include the following operations:
101. and detecting whether a text generation request is received or not to obtain a detection result.
In the embodiment of the present invention, the text generation request includes a plurality of input words.
102. And when the detection result is yes, processing the text generation request by using a preset information association model to obtain attribute word information.
In the embodiment of the present invention, the attribute word information includes L pieces of attribute word sub-information.
In an embodiment of the present invention, L is a positive integer of 1 or more.
In an embodiment of the present invention, the information association model includes a first information association model based on a graph attention network, and/or a second information association model.
103. And sequencing and screening the attribute word information to obtain target text word information.
In the embodiment of the present invention, the target text word information includes a plurality of target text words.
In the embodiment of the invention, the target text words are used for generating marketing texts.
Optionally, L is a positive integer which is an integer multiple of 3.
Therefore, the data processing method based on the graph attention network described in the embodiment of the invention can process the text generation request by using the information association model to obtain the attribute word information, and then perform comprehensive processing such as sequencing and screening on the attribute word information to obtain the target text word for generating the marketing text, thereby being beneficial to improving the information output quantity of the associated words and further meeting the marketing text generation requirements with different lengths.
In an optional embodiment, the processing the text generation request by using a preset information association model in step 102 to obtain attribute word information includes:
processing all input words by using a first information association model to obtain word vector information; the input word vector information comprises a plurality of word vector sub-information;
processing the word vector information by using a second information association model to obtain attribute word information; the attribute word information comprises first node word information, and/or second node word information, and/or third node word information; the first node word information, the second node word information and the third node word information respectively comprise T attribute word information; t is a positive integer of 1 or more.
Optionally, before the word vector information is processed by using the second information association model, an output threshold of the second information association model is set.
Optionally, the output threshold is consistent with T.
Optionally, the second information association model includes a first association submodel, and/or a second association submodel, and/or a third association submodel, which is not limited in the embodiment of the present invention.
Optionally, the first associated sub-model includes N graph attention layers.
Further, N is a positive integer of 2 or more.
In this optional embodiment, as an optional implementation manner, the first associated submodel is obtained based on the following training steps:
obtaining a model training set, and initializing a first training sub-model;
inputting the model training set into a first training sub-model, and calculating the multi-head attention scores of all neighbor nodes within one hop of each node in a first graph attention layer;
carrying out summation calculation and average calculation on the multi-head attention calculation score results, and updating the expression vector of each entity node;
performing multi-head attention scores of all neighbor nodes within one hop of each node in the next graph attention layer, performing summation calculation and average calculation, and updating the expression vector of each entity node;
judging whether the current graph attention layer is the last graph attention layer or not to obtain a layer judgment result;
when the layer judgment result is negative, triggering and executing the multi-head attention scores of all neighbor nodes within one hop of each node in the next graph attention layer, and performing summation calculation and average calculation and updating the expression vector of each entity node;
when the layer judgment result is yes, minimizing the sum of the entity vectors of the neighbor nodes within one hop of each node and the entity vector of the middle node, and updating the model parameters of the first training sub-model;
and determining the updated first training submodel as a first associated submodel.
Optionally, the one hop is a traversal from the current node to the directly associated node.
Optionally, the first association submodel is configured to process all nodes of a hop.
Optionally, the second association submodel is configured to process all nodes of a second hop.
Optionally, the third association submodel is configured to process all nodes of three hops.
Optionally, the two hops are a traversal from the current node to the first indirectly associated node separated by one node.
Optionally, the three hops are a traversal from the current node to a second indirectly associated node that is two nodes apart.
Therefore, the data processing method based on the graph attention network described in the embodiment of the invention can comprehensively process the input words by using the first information association model and the second information association model to obtain the attribute word information, and is beneficial to improving the information output quantity of the associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In another optional embodiment, the processing the word vector information by using the second information association model to obtain attribute word information includes:
inputting the word vector information into a first association submodel to obtain first node word information; the first node word information representation graph notices the incidence relation between the current node and the direct incidence node in the network; and/or the presence of a gas in the gas,
inputting the word vector information into a second association submodel to obtain second node word information; the second node word information represents the incidence relation between the current node and the first indirect incidence node in the network of the graph attention; the current node is separated from the first indirect association node by one node; and/or the presence of a gas in the gas,
inputting the word vector information into a third association submodel to obtain third node word information; the third node word information represents the incidence relation between the current node and the second indirect incidence node in the network of the graph attention; the current node is separated from the second indirectly associated node by two nodes.
Optionally, the node represents an entity word and/or a relation word, which is not limited in the embodiment of the present invention.
It can be seen that the data processing method based on the graph attention network described in the embodiment of the present invention can process word vector information by using the first association submodel, the second association submodel, and the third association submodel to obtain first node word information, second node word information, and third node word information, respectively, which is beneficial to improving the information output quantity of associated words, thereby satisfying the requirements of generating marketing texts with different lengths.
In another optional embodiment, the processing all the input words by using the first information association model to obtain the word vector information includes:
for any input word, judging whether a preset knowledge graph contains the input word or not to obtain an input judgment result;
when the input judgment result is yes, inputting the input word into a first information association model to obtain attribute word information corresponding to the input word;
when the input judgment result is negative, processing the input word by using a preset word threshold value and a first information association model to obtain threshold word information corresponding to the input word; the threshold word information comprises M attribute word information; m is matched with a word threshold value; m is a positive integer greater than or equal to 1.
Optionally, the knowledge graph is constructed based on the information points of the triples.
Optionally, the triplet is composed of 2 entity words and 1 relation word.
Optionally, the entity words include brand words, and/or category words, and/or common sense words, and/or high frequency words, and embodiments of the present invention are not limited.
Optionally, the relation term includes a component relation term, and/or an efficacy relation term, and/or a brand relation term, and/or a category relation term, and the embodiment of the present invention is not limited.
Therefore, by implementing the data processing method based on the graph attention network described in the embodiment of the invention, the attribute word information can be obtained by comprehensively processing the input words through the knowledge graph and the first information association model, and the information output quantity of the associated words can be improved, so that the marketing text generation requirements with different lengths can be met.
Example two
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another data processing method based on a graph attention network according to an embodiment of the present invention. The data processing method based on the graph attention network described in fig. 2 is applied to a data processing system, such as a local server or a cloud server for data processing management based on the graph attention network, and the embodiment of the present invention is not limited thereto. As shown in fig. 2, the data processing method based on the graph attention network may include the following operations:
201. and detecting whether a text generation request is received or not to obtain a detection result.
In this embodiment of the present invention, the text generation request further includes text length information.
202. And when the detection result is yes, processing the text generation request by using a preset information association model to obtain attribute word information.
203. And performing calculation sequencing processing on the attribute word information to obtain an attribute word sequence.
204. And processing the attribute word sequence and the text length information to obtain target text word information.
In the embodiment of the present invention, for specific technical details and technical noun explanations of step 201 to step 202, reference may be made to the detailed description of step 101 to step 102 in the first embodiment, and details are not repeated in the embodiment of the present invention.
Optionally, the number of the target text words in the target text word information is positively correlated with the text length information.
It can be seen that the data processing method based on the graph attention network described in the embodiment of the present invention can process a text generation request by using an information association model to obtain attribute word information, sequence the attribute word information to obtain an attribute word sequence, and process the attribute word sequence and text length information to obtain a target text word for generating a marketing text, which is beneficial to improving the information output of associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In an optional embodiment, the performing, in the step 203, a calculation sorting process on the attribute word information to obtain an attribute word sequence includes:
performing heat index calculation on the attribute word information by using a preset heat model to obtain word selection index information; the word selection index information comprises a plurality of word selection indexes; the heat model is used for processing at least 5 word selection indexes of any word vector sub-information in the attribute word information;
and sequencing all word selection indexes in the word selection index information from large to small to obtain an attribute word sequence.
Optionally, the popularity model is configured to process word co-occurrence times, associated advertisement numbers, associated material numbers, associated commodity numbers, and search numbers of attribute word information in the attribute word information.
Optionally, the word co-occurrence number corresponds to a word co-occurrence number weighting factor.
Optionally, the associated advertisement count corresponds to an associated advertisement count weighting factor.
Optionally, the associated material number has a corresponding associated material number weighting factor.
Optionally, the search number is associated with a search number weighting factor.
Optionally, the word selection index is obtained by processing word co-occurrence times, associated advertisement numbers, associated material numbers, associated commodity numbers, search numbers, word co-occurrence time weighting factors, associated advertisement number weighting factors, associated material number weighting factors and search number weighting factors by using the popularity model.
Therefore, by implementing the data processing method based on the graph attention network described in the embodiment of the invention, the word selection index information can be obtained through the calculation processing of the heat model on the attribute word information, and then the attribute word sequence is obtained through the sequencing of the word selection indexes, so that the information output quantity of related words can be improved, and the marketing text generation requirements with different lengths can be met.
In another optional embodiment, the word-direction quantum information includes first word-vector sub information and second word-vector sub information;
the first word vector sub-information comprises index identification information, a first word vector and a second word vector; the dimension of the second word vector is greater than or equal to 4;
the second word vector sub-information comprises first connection entity identification information and second connection entity identification information; the first connection entity identification information and the second connection entity identification information represent a link relationship.
Optionally, the index identification information is used to index the entities in the knowledge graph.
Optionally, the dimension of the first word vector may be variable.
Preferably, the dimension of the first word vector is 100.
Optionally, the dimension information in the second word vector is used to represent the number of associated advertisements, the number of associated materials, the number of associated commodities, and the number of searches.
Preferably, the dimension of the first word vector sub-information is 105.
Optionally, the first word vector is located between the index identification information and the second word vector.
Optionally, the direction of the above-mentioned link relation is from right to left.
Optionally, the first connection entity identifier information is an identifier of a connected entity.
Optionally, the second connection entity identifier information is an identifier of an entity sending a connection.
Optionally, the entities may characterize a node.
Therefore, the word vector sub-information in the data processing method based on the graph attention network described in the embodiment of the invention comprises the first word vector sub-information and the second word vector sub-information representing the link relation, which is more beneficial to improving the information output quantity of the related words, thereby meeting the generation requirements of marketing texts with different lengths.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data processing apparatus based on a graph attention network according to an embodiment of the present invention. The apparatus described in fig. 3 can be applied to a data processing system, such as a local server or a cloud server for data processing management based on a graph attention network, and the embodiment of the present invention is not limited thereto. As shown in fig. 3, the apparatus may include:
the detection module 301 is configured to detect whether a text generation request is received, and obtain a detection result; the text generation request comprises a plurality of input words;
the first processing module 302 is configured to, when the detection result is yes, process the text generation request by using a preset information association model to obtain attribute word information; the attribute word information comprises L attribute word information; l is a positive integer greater than or equal to 1; the information association model comprises a first information association model based on the graph attention network and/or a second information association model;
the second processing module 303 is configured to perform sorting, screening and processing on the attribute word information to obtain target text word information; the target text word information comprises a plurality of target text words; the target text word is used to generate marketing text.
It can be seen that, by implementing the data processing apparatus based on the graph attention network described in fig. 3, the text generation request can be processed by using the information association model to obtain the attribute word information, and then the target text word for generating the marketing text is obtained by performing comprehensive processing such as sorting and screening on the attribute word information, which is beneficial to improving the information output quantity of the associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In another alternative embodiment, as shown in fig. 4, the first processing module 302 includes a first processing sub-module 3021 and a second processing sub-module 3022, wherein:
the first processing submodule 3021 is configured to process all input words by using the first information association model to obtain word vector information; the input word vector information comprises a plurality of word vector sub-information;
the second processing submodule 3022 is configured to process the word vector information by using the second information association model to obtain attribute word information; the attribute word information comprises first node word information, and/or second node word information, and/or third node word information; the first node word information, the second node word information and the third node word information respectively comprise T attribute word information; t is a positive integer of 1 or more.
It can be seen that, by implementing the data processing apparatus based on the graph attention network described in fig. 4, the first information association model and the second information association model can be used to perform comprehensive processing on the input words to obtain attribute word information, which is beneficial to improving the information output quantity of the associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In yet another alternative embodiment, as shown in FIG. 4, the second information correlation model includes a first correlation submodel, and/or a second correlation submodel, and/or a third correlation submodel;
the second processing submodule 3022 processes the word vector information using the second information association model, and the specific manner of obtaining the attribute word information is as follows:
inputting the word vector information into a first association submodel to obtain first node word information; the first node word information representation graph notices the incidence relation between the current node and the direct incidence node in the network; and/or the presence of a gas in the gas,
inputting the word vector information into a second association submodel to obtain second node word information; the second node word information represents the incidence relation between the current node and the first indirect incidence node in the network of the graph attention; the current node is separated from the first indirect association node by one node; and/or the presence of a gas in the gas,
inputting the word vector information into a third association submodel to obtain third node word information; the third node word information represents the incidence relation between the current node and the second indirect incidence node in the network of the graph attention; the current node is separated from the second indirectly associated node by two nodes.
It can be seen that, by implementing the data processing apparatus based on the graph attention network described in fig. 4, the word vector information can be processed by using the first association submodel, the second association submodel, and the third association submodel to respectively obtain the first node word information, the second node word information, and the third node word information, which is beneficial to improving the information output quantity of associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In yet another alternative embodiment, as shown in fig. 4, the first processing sub-module 3021 processes all input words by using the first information association model, and the specific manner of obtaining the word vector information is as follows:
for any input word, judging whether a preset knowledge graph contains the input word or not to obtain an input judgment result;
when the input judgment result is yes, inputting the input word into a first information association model to obtain attribute word information corresponding to the input word;
when the input judgment result is negative, processing the input word by using a preset word threshold value and a first information association model to obtain threshold word information corresponding to the input word; the threshold word information comprises M attribute word information; m is matched with a word threshold value; m is a positive integer greater than or equal to 1.
Therefore, by implementing the data processing device based on the graph attention network described in fig. 4, the attribute word information can be obtained by comprehensively processing the input words through the knowledge graph and the first information association model, which is more beneficial to improving the information output quantity of the associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In yet another alternative embodiment, as shown in fig. 4, the text generation request further includes text length information;
the second processing module 303 performs sorting and screening processing on the attribute word information to obtain target text word information in a specific manner:
calculating and sequencing the attribute word information to obtain an attribute word sequence;
and processing the attribute word sequence and the text length information to obtain target text word information.
It can be seen that, by implementing the data processing apparatus based on the graph attention network described in fig. 4, the information association model can be used to process the text generation request to obtain the attribute word information, then the attribute word information is sequenced to obtain the attribute word sequence, and then the attribute word sequence and the text length information are processed to obtain the target text word for generating the marketing text, which is beneficial to improving the information output quantity of the associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In yet another alternative embodiment, as shown in fig. 4, the second processing module 303 performs calculation sorting processing on the attribute word information to obtain a specific manner of the attribute word sequence:
performing heat index calculation on the attribute word information by using a preset heat model to obtain word selection index information; the word selection index information comprises a plurality of word selection indexes; the heat model is used for processing at least 5 word selection indexes of any word vector sub-information in the attribute word information;
and sequencing all word selection indexes in the word selection index information from large to small to obtain an attribute word sequence.
It can be seen that, by implementing the data processing device based on the graph attention network described in fig. 4, the word selection index information can be obtained through the calculation processing of the heat model on the attribute word information, and then the attribute word sequence is obtained through the sequencing of the word selection indexes, which is more beneficial to improving the information output quantity of the associated words, thereby meeting the requirements of generating marketing texts with different lengths.
In yet another alternative embodiment, as shown in fig. 4, the word vector sub information includes first word vector sub information and second word vector sub information;
the first word vector sub-information comprises index identification information, a first word vector and a second word vector; the dimension of the second word vector is greater than or equal to 4;
the second word vector sub-information comprises first connection entity identification information and second connection entity identification information; the first connection entity identification information and the second connection entity identification information represent a link relationship.
It can be seen that the word vector sub-information in the data processing apparatus implementing the graph attention network described in fig. 4 includes the first word vector sub-information and the second word vector sub-information representing the link relationship, which is more favorable for improving the information output quantity of the related words, thereby meeting the requirements of generating marketing texts with different lengths.
Example four
Referring to fig. 5, fig. 5 is a schematic structural diagram of another data processing apparatus based on a graph attention network according to an embodiment of the present disclosure. The apparatus described in fig. 5 can be applied to a data processing system, such as a local server or a cloud server for data processing management based on a graph attention network, and the embodiment of the present invention is not limited thereto. As shown in fig. 5, the apparatus may include:
a memory 401 storing executable program code;
a processor 402 coupled with the memory 401;
the processor 402 calls the executable program code stored in the memory 401 for performing the steps in the graph attention network based data processing method described in the first embodiment or the second embodiment.
EXAMPLE five
The embodiment of the invention discloses a computer-readable storage medium which stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps in the data processing method based on the graph attention network described in the first embodiment or the second embodiment.
EXAMPLE six
The embodiment of the invention discloses a computer program product, which comprises a non-transitory computer readable storage medium storing a computer program, wherein the computer program is operable to make a computer execute the steps in the data processing method based on the graph attention network described in the first embodiment or the second embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, where the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM), or other disk memories, CD-ROMs, or other magnetic disks, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
Finally, it should be noted that: the data processing method and apparatus based on the attention-directed network disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, which are only used for illustrating the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for data processing based on a graph attention network, the method comprising:
detecting whether a text generation request is received or not to obtain a detection result; the text generation request comprises a plurality of input words;
when the detection result is yes, processing the text generation request by using a preset information association model to obtain attribute word information; the attribute word information comprises L pieces of attribute word information; l is a positive integer greater than or equal to 1; the information association model comprises a first information association model based on a graph attention network and/or a second information association model;
sorting and screening the attribute word information to obtain target text word information; the target text word information comprises a plurality of target text words; the target text word is used for generating marketing text.
2. The data processing method based on the graph attention network according to claim 1, wherein the processing the text generation request by using a preset information association model to obtain attribute word information comprises:
processing all the input words by using the first information correlation model to obtain word vector information; the input word vector information comprises a plurality of word vector sub-information;
processing the word vector information by using the second information association model to obtain attribute word information; the attribute word information comprises first node word information, and/or second node word information, and/or third node word information; the first node word information, the second node word information and the third node word information respectively comprise T pieces of attribute word information; and T is a positive integer greater than or equal to 1.
3. The graph attention network-based data processing method according to claim 2, wherein the second information correlation model comprises a first correlation submodel, and/or a second correlation submodel, and/or a third correlation submodel;
the processing the word vector information by using the second information association model to obtain attribute word information includes:
inputting the word vector information into the first association submodel to obtain the first node word information; the first node word information represents the incidence relation between the current node and the direct incidence node in the graph attention network; and/or the presence of a gas in the gas,
inputting the word vector information into the second association submodel to obtain second node word information; the second node word information represents the incidence relation between the current node and a first indirect incidence node in the graph attention network; the current node is separated from the first indirect association node by one node; and/or the presence of a gas in the gas,
inputting the word vector information into the third association submodel to obtain the third node word information; the third node word information represents the incidence relation between the current node and a second indirect incidence node in the graph attention network; the current node is separated from the second indirectly associated node by two of the nodes.
4. The method according to claim 2, wherein the processing all the input words by using the first information association model to obtain word vector information comprises:
for any input word, judging whether a preset knowledge graph contains the input word or not to obtain an input judgment result;
when the input judgment result is yes, inputting the input word into the first information association model to obtain attribute word information corresponding to the input word;
when the input judgment result is negative, processing the input word by using a preset word threshold value and the first information association model to obtain threshold word information corresponding to the input word; the threshold word information comprises M pieces of attribute word information; the M matches the word threshold; and M is a positive integer greater than or equal to 1.
5. The data processing method based on graph attention network of claim 1, wherein the text generation request further comprises text length information;
the sorting and screening processing of the attribute word information to obtain target text word information includes:
calculating and ordering the attribute word information to obtain an attribute word sequence;
and processing the attribute word sequence and the text length information to obtain target text word information.
6. The data processing method based on the graph attention network according to claim 5, wherein the performing the calculation ordering process on the attribute word information to obtain an attribute word sequence comprises:
performing heat index calculation on the attribute word information by using a preset heat model to obtain word selection index information; the word selection index information comprises a plurality of word selection indexes; the heat model is used for processing at least 5 word selection indexes of any word direction quantum information in the attribute word information;
and sequencing all the word selection indexes in the word selection index information from large to small to obtain an attribute word sequence.
7. The graph attention network-based data processing method according to any one of claims 1-6, wherein the word-direction quantum information includes first word-vector sub-information and second word-vector sub-information;
the first word vector sub-information comprises index identification information, a first word vector and a second word vector; the dimension of the second word vector is greater than or equal to 4;
the second word vector sub-information comprises first connection entity identification information and second connection entity identification information; the first connection entity identification information and the second connection entity identification information represent a link relationship.
8. An apparatus for data processing based on a graph attention network, the apparatus comprising:
the detection module is used for detecting whether a text generation request is received or not to obtain a detection result; the text generation request comprises a plurality of input words;
the first processing module is used for processing the text generation request by using a preset information association model to obtain attribute word information when the detection result is yes; the attribute word information comprises L pieces of attribute word information; l is a positive integer greater than or equal to 1; the information association model comprises a first information association model based on a graph attention network and/or a second information association model;
the second processing module is used for carrying out sequencing and screening processing on the attribute word information to obtain target text word information; the target text word information comprises a plurality of target text words; the target text word is used for generating marketing text.
9. An apparatus for data processing based on a graph attention network, the apparatus comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the graph attention network-based data processing method according to any one of claims 1 to 7.
10. A computer-storable medium that stores computer instructions that, when invoked, perform a graph attention network based data processing method according to any one of claims 1-7.
CN202111572546.0A 2021-12-21 2021-12-21 Data processing method and device based on graph attention network Pending CN114357969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111572546.0A CN114357969A (en) 2021-12-21 2021-12-21 Data processing method and device based on graph attention network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111572546.0A CN114357969A (en) 2021-12-21 2021-12-21 Data processing method and device based on graph attention network

Publications (1)

Publication Number Publication Date
CN114357969A true CN114357969A (en) 2022-04-15

Family

ID=81102088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111572546.0A Pending CN114357969A (en) 2021-12-21 2021-12-21 Data processing method and device based on graph attention network

Country Status (1)

Country Link
CN (1) CN114357969A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428015A (en) * 2020-03-20 2020-07-17 腾讯科技(深圳)有限公司 Information generation method, device, equipment and storage medium
CN112749253A (en) * 2020-12-28 2021-05-04 湖南大学 Multi-text abstract generation method based on text relation graph
US20210192201A1 (en) * 2019-12-23 2021-06-24 Insurance Services Office, Inc. Computer Vision Systems and Methods for Information Extraction from Text Images Using Evidence Grounding Techniques
CN113569056A (en) * 2021-07-27 2021-10-29 科大讯飞(苏州)科技有限公司 Knowledge graph complementing method and device, electronic equipment and storage medium
CN113569572A (en) * 2021-02-09 2021-10-29 腾讯科技(深圳)有限公司 Text entity generation method, model training method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210192201A1 (en) * 2019-12-23 2021-06-24 Insurance Services Office, Inc. Computer Vision Systems and Methods for Information Extraction from Text Images Using Evidence Grounding Techniques
CN111428015A (en) * 2020-03-20 2020-07-17 腾讯科技(深圳)有限公司 Information generation method, device, equipment and storage medium
CN112749253A (en) * 2020-12-28 2021-05-04 湖南大学 Multi-text abstract generation method based on text relation graph
CN113569572A (en) * 2021-02-09 2021-10-29 腾讯科技(深圳)有限公司 Text entity generation method, model training method and device
CN113569056A (en) * 2021-07-27 2021-10-29 科大讯飞(苏州)科技有限公司 Knowledge graph complementing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11983269B2 (en) Deep neural network system for similarity-based graph representations
CN110909182A (en) Multimedia resource searching method and device, computer equipment and storage medium
CN111522989B (en) Method, computing device, and computer storage medium for image retrieval
CN112487176B (en) Social robot detection method, system, storage medium and electronic device
WO2019019385A1 (en) Cross-platform data matching method and apparatus, computer device and storage medium
CN112036981B (en) Method, device, equipment and medium for providing target comparison commodities
CN111753158A (en) Live broadcast platform commodity searching method and device, computer equipment and storage medium
CN112036187A (en) Context-based video barrage text auditing method and system
CN111008335A (en) Information processing method, device, equipment and storage medium
CN111144936A (en) Similar population expansion method and device based on user tags
Bitarafan et al. Spgd_hin: Spammer group detection based on heterogeneous information network
CN110795558A (en) Label acquisition method and device, storage medium and electronic device
CN112200644B (en) Method and device for identifying fraudulent user, computer equipment and storage medium
CN116342228B (en) Related recommendation method based on directed graph neural network
CN114357969A (en) Data processing method and device based on graph attention network
CN112149407A (en) Title generation method, training method, device, electronic equipment and storage medium
CN106779899A (en) The recognition methods of malice order and device
Lê et al. A novel variable ordering heuristic for BDD-based K-terminal reliability
CN114580354B (en) Information coding method, device, equipment and storage medium based on synonym
CN115859121A (en) Text processing model training method and device
CN116049567A (en) Collaborative filtering-based fault inspection recommendation method and system
CN111291904B (en) Preference prediction method and device and computer equipment
CN109840790B (en) User loss prediction method and device and computer equipment
CN112183069A (en) Keyword construction method and system based on historical keyword release data
CN109213923B (en) Method and system for determining associated information of user and object

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination