Article generation method and device, equipment and medium

By constructing candidate literature maps and integrating node similarity, and generating articles in professional fields, the problem of insufficient accuracy and readability of article generation in the existing technology is solved, and high-quality article generation is achieved.

CN119179788APending Publication Date: 2024-12-24GUANGZHOU FANGZHOU INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411208540.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

When the prior art is automatically integrated into professional field articles in multiple literatures, the accuracy is low, the readability is poor, and it is difficult to generate high-quality professional field articles.

Method used

By obtaining the pending documents under the topic of the article to be generated, a candidate literature map is constructed, the node similarity between candidate literature nodes is determined, and the similarity is integrated according to the similarity, the article generation map is generated, the candidate article node weight is determined, and the professional field is finally generated article.

Benefits of technology

It improves the accuracy and readability of generated professional fields articles, avoids the impact of repeated nodes on article generation, and enhances the accuracy of article generation graphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179788A_ABST
    Figure CN119179788A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an article generation method and device, equipment and a medium. The method comprises the steps of obtaining at least one to-be-processed literature under a to-be-generated article theme, and constructing a candidate literature map corresponding to each to-be-processed literature; determining the node similarity between the candidate literature nodes of the same node level in each candidate literature map, and integrating each candidate literature map according to the node similarity to obtain an article generation map; and determining a candidate article node weight corresponding to each candidate article node in the article generation map, and generating an article corresponding to the article theme to be generated according to the candidate article node weight and the candidate article node. According to the scheme, the accuracy and readability of the generated professional field article are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to an article generation method, device, equipment and medium. Background Art

[0002] At present, the realization of automatically integrating multiple documents into professional field (such as medical field) articles is basically based on summarizing and summarizing single documents, and then combining and polishing them to achieve batch generation. This approach results in low accuracy and poor readability of professional field articles. Summary of the invention

[0003] The present invention provides an article generation method, device, equipment and medium to improve the accuracy and readability of generated professional field articles.

[0004] According to one aspect of the present invention, there is provided a method for generating an article, comprising:

[0005] Obtain at least one document to be processed under the topic of the article to be generated, and construct a candidate document map corresponding to each of the documents to be processed;

[0006] Determine the node similarity between the candidate document nodes at the same node level in each of the candidate document graphs, and integrate each of the candidate document graphs according to the node similarity to obtain an article generation graph;

[0007] Determine the candidate article node weight corresponding to each candidate article node in the article generation graph, and generate an article corresponding to the topic of the article to be generated based on the candidate article node weight and the candidate article node.

[0008] According to another aspect of the present invention, there is provided an article generating device, comprising:

[0009] A document map construction module is used to obtain at least one document to be processed under the subject of the article to be generated, and to construct a candidate document map corresponding to each of the documents to be processed;

[0010] An article generation graph construction module is used to determine the node similarity between candidate document nodes of the same node level in each candidate document graph, and integrate each candidate document graph according to the node similarity to obtain an article generation graph;

[0011] The article generation module is used to determine the candidate article node weight corresponding to each candidate article node in the article generation graph, and generate an article corresponding to the article theme to be generated based on the candidate article node weight and the candidate article node.

[0012] According to another aspect of the present invention, there is provided an electronic device, comprising:

[0013] one or more processors;

[0014] A memory for storing one or more programs;

[0015] When one or more programs are executed by one or more processors, the one or more processors can execute any one of the article generation methods provided by the embodiments of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any article generation method provided by an embodiment of the present invention when executed.

[0017] The embodiment of the present invention provides an article generation scheme, which obtains at least one to-be-processed document under the subject of the to-be-generated article and constructs a candidate document graph corresponding to each to-be-processed document; determines the node similarity between candidate document nodes of the same node level in each candidate document graph, and integrates each candidate document graph according to the node similarity to obtain an article generation graph; determines the candidate article node weight corresponding to each candidate article node in the article generation graph, and generates an article corresponding to the subject of the to-be-generated article according to the candidate article node weight and the candidate article node. The above scheme generates articles by introducing the candidate document graph, the article generation graph and the candidate article node weight, thereby improving the accuracy and readability of the generated professional field articles; at the same time, according to the node similarity, each candidate document graph is integrated to obtain an article generation graph, thereby avoiding the influence of repeated nodes on article generation and improving the accuracy of the article generation graph.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1A is a flow chart of an article generation method provided by Embodiment 1 of the present invention;

[0021] Figure 1B is a schematic diagram of a candidate document map provided in Example 1 of the present invention;

[0022] Figure 1C It is a schematic diagram of an article generation graph provided in the first embodiment of the present invention;

[0023] Figure 2 is a flow chart of an article generation method provided by Embodiment 2 of the present invention;

[0024] Figure 3 It is a structural schematic diagram of an article generating device provided by Embodiment 3 of the present invention;

[0025] Figure 4 It is a structural schematic diagram of an electronic device for implementing an article generation method provided by a fourth embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0027] Embodiment 1

[0028] Figure 1A It is a flowchart of an article generation method provided in Example 1 of the present invention. This embodiment can be applied to the situation of generating corresponding professional field articles based on subject documents. The method can be executed by an article generation device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the article generation function.

[0029] See also Figure 1A The article generation method shown includes:

[0030] S110, obtaining at least one document to be processed under the topic of the article to be generated, and constructing a candidate document map corresponding to each document to be processed.

[0031] The subject of the article to be generated refers to the subject of the article to be generated. The embodiment of the present invention does not impose any limitation on the subject of the article to be generated, and it can be set by the technician based on experience. For example, the subject of the article to be generated can be a subject in a professional field, such as a subject in the medical field.

[0032] Among them, the document to be processed refers to the relevant documents required to generate the article. The number of documents to be processed can be multiple. The candidate document graph refers to the knowledge graph corresponding to a document to be processed. Each candidate document node in the candidate document graph includes part of the document content, such as the document text content and the knowledge point title. The candidate document node refers to the knowledge point that can be used to construct the candidate document graph.

[0033] Exemplarily, the document to be processed is vectorized to obtain a document vector to be processed; a knowledge point vector is extracted from the document vector to be processed, and a candidate document map corresponding to the document to be processed is constructed based on the knowledge point vector. The document vector to be processed refers to a vector obtained by vectorizing the document to be processed. The knowledge point vector refers to a knowledge point vector in the document vector to be processed.

[0034] For example, see Figure 1B The schematic diagram of the candidate document map shown in FIG. Among them, the first-level candidate document node is the largest knowledge point and the most extensive. Each level of candidate document node extracts more detailed content based on the previous level of candidate document node. Each candidate document node corresponds to part of the document content. The first-level candidate document node refers to the candidate document node at the first node level.

[0035] Specifically, a plurality of documents to be processed related to the subject of the article to be generated are obtained, and candidate document maps corresponding to each document to be processed are constructed respectively.

[0036] S120, determining the node similarity between the candidate document nodes at the same node level in each candidate document graph, and integrating each candidate document graph according to the node similarity to obtain an article generation graph.

[0037] Wherein, the node level refers to the node level to which each candidate document node in the candidate document map belongs. Exemplarily, the node level may include primary, secondary and tertiary levels, etc. Wherein, the information included in the partial document content in the candidate document node of the low-level node level is more extensive than the information included in the partial document content in the candidate document node of the high-level node level. For example, the information included in the partial document content in the primary candidate document node is more extensive than the information included in the partial document content in the secondary candidate document node; the information included in the partial document content in the secondary candidate document node is more extensive than the information included in the partial document content in the tertiary candidate document node.

[0038] Among them, node similarity refers to the similarity between two candidate document nodes of the same node level in different candidate document graphs. For example, the similarity between the first-level candidate document node 1 in candidate document graph A and the first-level candidate document node 1 in candidate document graph B is the node similarity; the similarity between the first-level candidate document node 1 in candidate document graph A and the first-level candidate document node 2 in candidate document graph B is the node similarity.

[0039] The article generation graph refers to a knowledge graph used to generate the article. Exemplarily, the article generation graph is obtained based on the integration of each candidate document graph.

[0040] Specifically, the node similarity between any two candidate document nodes at the same node level in each candidate document graph is determined; based on the node similarity, the candidate document nodes in each candidate document graph are merged to obtain an article generation graph.

[0041] S130, determining the candidate article node weight corresponding to each candidate article node in the article generation graph, and generating an article corresponding to the topic of the article to be generated according to the candidate article node weight and the candidate article node.

[0042] Among them, the candidate article node refers to any knowledge point in the article generation graph, that is, a knowledge point that can be used to construct the article generation graph. The candidate article node weight can be used to quantify the importance of any candidate article node among the candidate article nodes of the same level. It should be noted that the sum of the candidate article node weights corresponding to the candidate article nodes of the same level is 1.

[0043] The generated article is an article corresponding to the subject of the article to be generated. For example, the generated article can be an article in a professional field.

[0044] In an optional embodiment, the candidate article node weights corresponding to each candidate article node in the article generation graph are determined, including: taking any candidate article node with child nodes in the article generation graph as a reference parent node, and taking each candidate article node under the reference parent node as a reference child node; determining the node implicit features between the parent node vector corresponding to the reference parent node and the child node vector corresponding to each reference child node; normalizing the node implicit features to obtain the candidate article node weights of the corresponding reference child nodes.

[0045] The reference parent node refers to the parent node to which each child node for which the candidate article node weight needs to be determined belongs. The reference child node refers to the candidate article node for which the candidate article node weight needs to be determined under the reference parent node. For example, see Figure 1C The schematic diagram of the article generation graph is shown in FIG. If the reference parent node is the first-level candidate article node 1, the reference child nodes are the second-level candidate article node 1.1 and the second-level candidate article node 1.2.

[0046] The parent node vector refers to a text vector obtained by vectorizing the node content corresponding to the reference parent node. The node content may include part of the comprehensive document content, that is, the parent node vector is obtained by vectorizing the part of the comprehensive document content corresponding to the reference parent node.

[0047] The subnode vector refers to the text vector obtained by vectorizing the node content corresponding to the reference subnode. The subnode vector is obtained by vectorizing part of the comprehensive document content corresponding to the reference subnode.

[0048] Among them, the node implicit feature refers to the hidden feature between the parent node vector and any child node vector.

[0049] Exemplarily, the candidate article node weight can be determined by the following formula:

[0050]

[0051] Where αij represents the candidate article node weight of the reference child node j; j represents the identifier of the reference child node; i represents the identifier of the reference parent node; k represents the kth reference child node; N j Indicates the number of reference child nodes; e ij represents the implicit feature of the node between the reference parent node i and the reference child node j; e ik Represents the node hidden features between the reference parent node i and the kth reference child node; softmax represents normalization.

[0052] Exemplarily, normalizing the node implicit features to obtain the candidate article node weight of the corresponding reference child node includes: determining the feature and value of the node implicit features corresponding to each reference child node; based on the normalization process, determining the candidate article node weight of the reference child node according to the feature and value and the node implicit features of any reference child node. The feature and value refers to the sum of the node implicit features of each reference child node.

[0053] It can be understood that by introducing implicit features of nodes and normalizing the implicit features of nodes, the weights of candidate article nodes are obtained, the node content corresponding to each candidate article node is mined, and the weights are determined based on the mined features, thereby improving the accuracy of the determined candidate article node weights.

[0054] In an optional embodiment, node implicit features between the mother node vector corresponding to the reference mother node and the child node vectors corresponding to each reference child node are determined, including: for any reference child node, the child node vector corresponding to the reference child node and the mother node vector corresponding to the reference mother node are spliced ​​to obtain a node splicing vector, and a node mapping scalar of the node splicing vector is determined; based on a preset activation function, the node mapping scalar is processed to obtain the node implicit features between the reference child node and the reference mother node.

[0055] The node concatenation vector refers to a vector obtained by concatenating a child node vector and a parent node vector. The node mapping scalar refers to a scalar obtained by mapping the node concatenation vector. For example, the mapping can be performed through a neural network.

[0056] The embodiment of the present invention does not impose any limitation on the type of the preset activation function, which can be set by a technician according to experience or needs. Exemplarily, the preset activation function can be a nonlinear activation function. The advantage of using a nonlinear activation function is that more information can be extracted.

[0057] Exemplarily, the node implicit feature can be determined by the following formula:

[0058]

[0059] Among them, e ij represents the implicit feature of the node between the reference parent node i and the reference child node j; LeakyReLu represents the nonlinear activation function; Represents the parent node vector of the reference parent node i; Represents the child node vector of the reference child node j; Indicates mapping to node mapping scalar; || indicates concatenation.

[0060] Furthermore, based on the above formula for determining the implicit features of nodes, a complete formula for determining the weight of candidate article nodes can be obtained:

[0061]

[0062] in, The child node vector representing the k-th reference child node.

[0063] In the embodiment of the present invention, the parent node vector and the child node vector need to be preprocessed, such as mapping the n-dimensional parent node vector into an m-dimensional parent node vector. Correspondingly, the child node vector also needs to be dimensionally transformed; based on the preprocessed parent node vector and child node vector, the implicit features of the node are determined. Exemplarily, the dimension transformation can be dimension upgrading. The benefit of dimension transformation is to obtain more information. Exemplarily, the parent node vector and the child node vector can be preprocessed by a neural network.

[0064] It can be understood that by introducing the node concatenation vector and the preset activation function to determine the node implicit features, the accuracy and comprehensiveness of the determined node implicit features are improved.

[0065] It should be noted that when determining the candidate article node weight of the first-level candidate article node, the document vectors corresponding to all the documents to be processed can be used as the parent node vector, and the first-level candidate article node can be used as the reference child node to determine the node implicit features between the parent node vector and the child node vectors corresponding to each reference child node, thereby determining the candidate article node weight of each first-level candidate article node.

[0066] In an optional embodiment, an article corresponding to the topic of the article to be generated is generated based on the candidate article node weights and the candidate article nodes, including: determining the node generation order when each candidate article node generates an article based on the node level and the candidate article node weights; generating an article corresponding to the topic of the article to be generated based on the node generation order and the node content in the candidate article nodes.

[0067] The node generation order refers to the order in which the candidate article nodes participate in the article generation. For example, for candidate article nodes of the same level, the candidate article nodes corresponding to the larger candidate article node weights are ranked before the candidate article nodes corresponding to the smaller candidate article node weights; for candidate article nodes of different levels, after all the child nodes under the first-level candidate article node corresponding to a larger candidate article node weight are ranked, all the child nodes under the first-level candidate article node corresponding to the smaller candidate article node weights are ranked.

[0068] Exemplarily, according to the node generation order, the node content corresponding to the corresponding candidate article node in the article generation graph and / or at least part of the article content output by the previous model can be input into the trained article generation model, and at least part of the article content of this time can be output, until the node content corresponding to all candidate article nodes is input into the article generation model, and the article corresponding to the article theme to be generated is obtained. Exemplarily, when the model is used for the first time, only the node content corresponding to the candidate article node needs to be input into the article generation model.

[0069] Among them, the article generation model refers to a model that can be used to generate articles.

[0070] It can be understood that by generating articles in order through node generation, the orderliness and accuracy of the generated articles are improved.

[0071] It should be noted that after determining the article node weight of each candidate article node, the article generation graph can be updated so that the node content corresponding to each candidate article node in the article generation graph can include the candidate article node weight and part of the comprehensive literature content; according to the node generation order, the node content corresponding to the corresponding candidate article node in the article generation graph and / or at least part of the article content output by the previous model are input into the trained article generation model, and at least part of the article content this time is output.

[0072] The embodiment of the present invention provides an article generation scheme, which obtains at least one to-be-processed document under the subject of the to-be-generated article and constructs a candidate document graph corresponding to each to-be-processed document; determines the node similarity between candidate document nodes of the same node level in each candidate document graph, and integrates each candidate document graph according to the node similarity to obtain an article generation graph; determines the candidate article node weight corresponding to each candidate article node in the article generation graph, and generates an article corresponding to the subject of the to-be-generated article according to the candidate article node weight and the candidate article node. The above scheme generates articles by introducing the candidate document graph, the article generation graph and the candidate article node weight, thereby improving the accuracy and readability of the generated professional field articles; at the same time, according to the node similarity, each candidate document graph is integrated to obtain an article generation graph, thereby avoiding the influence of repeated nodes on article generation and improving the accuracy of the article generation graph.

[0073] Embodiment 2

[0074] Figure 2 It is a flow chart of an article generation method provided by the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the operation of "determining the node similarity between candidate document nodes of the same node level in each candidate document graph, and integrating each candidate document graph according to the node similarity to obtain an article generation graph" into "for any node level, taking the candidate document node at the node level in each candidate document graph as the current document node; determining the node similarity between any current document node in any candidate document graph and any current document node in other candidate document graphs; merging the current document nodes in each candidate document graph according to the node similarity, and obtaining an article generation graph after all the candidate document nodes of all node levels in each candidate document graph have been node merged" to improve the construction mechanism of the article generation graph. It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the descriptions of other embodiments.

[0075] See also Figure 2 The article generation method shown includes:

[0076] S210, obtaining at least one document to be processed under the topic of the article to be generated, and constructing a candidate document map corresponding to each document to be processed.

[0077] S220. For any node level, the candidate document node at the node level in each candidate document graph is used as the current document node.

[0078] The current document node refers to a candidate document node of a certain node level that is currently being merged in each candidate document graph.

[0079] S230, determining the node similarity between any current document node in any candidate document graph and any current document node in other candidate document graphs.

[0080] Specifically, the node similarities between each current document node in any candidate document graph and each current document node in other candidate document graphs are determined.

[0081] S240, merging the current document nodes in each candidate document graph according to the node similarity, and after all the candidate document nodes at all node levels in each candidate document graph have been merged, an article generation graph is obtained.

[0082] In an optional embodiment, nodes are merged for the current document nodes in each candidate document graph based on node similarity, including: determining a candidate merging method between any two current document nodes corresponding to the node similarity based on the node similarity and a preset similarity threshold; determining a target merging method for the current document node based on the candidate merging method corresponding to the current document node; and merging the current document nodes in each candidate document graph based on the target merging method.

[0083] Among them, the embodiment of the present invention does not impose any limitation on the size of the preset similarity threshold, which can be set by a technician based on experience, or determined repeatedly through a large number of experiments. Candidate merging methods refer to node merging methods that can be used by the current document node. Exemplarily, the number of candidate merging methods can be multiple. The target merging method refers to the node merging method ultimately used by the current document node. Exemplarily, the target merging method can be one.

[0084] In an optional embodiment, based on the node similarity and a preset similarity threshold, a candidate merging method between any two current document nodes corresponding to the node similarity is determined, including: if the node similarity is greater than or equal to the preset similarity threshold, then the candidate merging method between any two current document nodes corresponding to the node similarity is determined to be node incorporation; if the node similarity is less than the preset similarity threshold, then the candidate merging method between any two current document nodes corresponding to the node similarity is determined to be node addition.

[0085] Among them, node merging refers to merging two candidate document nodes and adding the merged node to the article generation graph to be generated. Node addition refers to directly adding the candidate document node to the article generation graph to be generated. It should be noted that the essence of node merging is to merge part of the document content in the candidate document node.

[0086] It can be understood that by comparing the node similarity with the preset similarity threshold to determine the candidate merging mode, the accuracy of the determined candidate merging mode is improved.

[0087] Exemplarily, the target merge mode of the current document node is determined based on the candidate merge modes corresponding to the current document node, including: for any current document node, if the candidate merge modes corresponding to the current document node are all node addition, then the target merge mode of the current document node is node addition; if there is node incorporation among the candidate merge modes corresponding to the current document node, then the target merge mode of the current document node is node incorporation.

[0088] Exemplarily, according to the target merging mode, the current document nodes in each candidate document map are node-merged, including: for any current document node, if the target merging mode of the current document node is node addition, it indicates that there are no other current document nodes in other candidate document maps that are identical or similar to the partial document content in the current document node, and the current document node is directly added to the article generation map to be generated; if the target merging mode of the current document node is node incorporation, it indicates that there are other current document nodes in other candidate document maps that are identical or similar to the partial document content in the current document node, and the current document node is node-merged with other current document nodes corresponding to the node incorporation, that is, partial document content is merged. Among them, other current document nodes refer to current document nodes in other candidate document maps.

[0089] It can be understood that by introducing a preset similarity threshold to determine the candidate merging method, the accuracy of the determined candidate merging method is improved; at the same time, according to the candidate merging method, the target merging method is determined, the accuracy of the determined target merging method is improved.

[0090] It should be noted that the node merging process in the embodiment of the present invention starts from the candidate document node of the higher node level. For example, if the candidate document graph includes the first-level candidate document node, the second-level candidate document node and the third-level candidate document node, the node merging starts from the third-level candidate document node.

[0091] S250, determining the candidate article node weight corresponding to each candidate article node in the article generation graph, and generating an article corresponding to the topic of the article to be generated according to the candidate article node weight and the candidate article node.

[0092] The embodiment of the present invention provides an article generation scheme, which determines the node similarity between candidate document nodes of the same node level in each candidate document map, and integrates each candidate document map according to the node similarity to obtain an article generation map operation, which is refined into taking the candidate document node at the node level in each candidate document map as the current document node for any node level; determining the node similarity between any current document node in any candidate document map and any current document node in other candidate document maps respectively; merging the current document nodes in each candidate document map according to the node similarity, and obtaining an article generation map after all the candidate document nodes of all node levels in each candidate document map have been node merged, thereby improving the construction mechanism of the article generation map. The above scheme obtains an article generation map after all the candidate document nodes of all node levels in each candidate document map have been node merged, thereby avoiding the existence of candidate document nodes that have not been node merged, thereby improving the accuracy and comprehensiveness of the generated article generation map.

[0093] Embodiment 3

[0094] Figure 3 This is a schematic diagram of the structure of an article generation device provided in Embodiment 3 of the present invention. This embodiment is applicable to the case where corresponding professional field articles are generated based on subject documents. The method can be executed by an article generation device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the article generation function.

[0095] like Figure 3 As shown, the device includes: a document map construction module 310, an article generation map construction module 320 and an article generation module 330. Among them,

[0096] The document graph construction module 310 is used to obtain at least one document to be processed under the subject of the article to be generated, and to construct a candidate document graph corresponding to each document to be processed;

[0097] The article generation graph construction module 320 is used to determine the node similarity between the candidate document nodes of the same node level in each of the candidate document graphs, and integrate each of the candidate document graphs according to the node similarity to obtain an article generation graph;

[0098] The article generation module 330 is used to determine the candidate article node weight corresponding to each candidate article node in the article generation graph, and generate an article corresponding to the topic of the article to be generated based on the candidate article node weight and the candidate article node.

[0099] The embodiment of the present invention provides an article generation scheme, which obtains at least one to-be-processed document under the subject of the to-be-generated article and constructs a candidate document graph corresponding to each to-be-processed document; determines the node similarity between candidate document nodes of the same node level in each candidate document graph, and integrates each candidate document graph according to the node similarity to obtain an article generation graph; determines the candidate article node weight corresponding to each candidate article node in the article generation graph, and generates an article corresponding to the subject of the to-be-generated article according to the candidate article node weight and the candidate article node. The above scheme generates articles by introducing the candidate document graph, the article generation graph and the candidate article node weight, thereby improving the accuracy and readability of the generated professional field articles; at the same time, according to the node similarity, each candidate document graph is integrated to obtain an article generation graph, thereby avoiding the influence of repeated nodes on article generation and improving the accuracy of the article generation graph.

[0100] Optionally, the article generation graph construction module 320 includes:

[0101] A current document node determination unit, for determining, for any node level, a candidate document node at the node level in each of the candidate document graphs as a current document node;

[0102] A node similarity determination unit, used to determine the node similarity between any current document node in any candidate document graph and any current document node in other candidate document graphs;

[0103] The article generation graph determination unit is used to merge the current document nodes in each of the candidate document graphs according to the node similarity, and obtain an article generation graph after all the candidate document nodes of all node levels in each of the candidate document graphs have been merged.

[0104] Optionally, the article generation graph determination unit includes:

[0105] A candidate merging mode determining subunit, used to determine a candidate merging mode between any two current document nodes corresponding to the node similarity according to the node similarity and a preset similarity threshold;

[0106] A target merging mode determining subunit, configured to determine a target merging mode of the current document node according to the candidate merging modes corresponding to the current document node;

[0107] The node merging subunit is used to merge the current document nodes in each of the candidate document graphs according to the target merging method.

[0108] Optionally, the candidate merging method determines the subunit, specifically for:

[0109] If the node similarity is greater than or equal to a preset similarity threshold, determining that the candidate merging method between any two current document nodes corresponding to the node similarity is node merging;

[0110] If the node similarity is less than a preset similarity threshold, it is determined that the candidate merging mode between any two current document nodes corresponding to the node similarity is node addition.

[0111] Optionally, the article generation module 330 includes:

[0112] A parent-child node determination unit, used to take any candidate article node with child nodes in the article generation graph as a reference parent node, and take each candidate article node under the reference parent node as a reference child node;

[0113] A node implicit feature determination unit, used to determine the node implicit features between the parent node vector corresponding to the reference parent node and the child node vectors corresponding to each of the reference child nodes;

[0114] The node weight determination unit is used to normalize the implicit features of the node to obtain the candidate article node weight of the corresponding reference child node.

[0115] Optionally, the node implicit feature determination unit is specifically used to:

[0116] For any reference child node, concatenate the child node vector corresponding to the reference child node and the parent node vector corresponding to the reference parent node to obtain a node concatenation vector, and determine a node mapping scalar of the node concatenation vector;

[0117] Based on a preset activation function, the node mapping scalar is processed to obtain the node implicit feature between the reference child node and the reference parent node.

[0118] Optionally, the article generation module 330 includes:

[0119] A node generation order determination unit, used to determine the node generation order when each candidate article node generates an article according to the node level and the candidate article node weight;

[0120] The article generating unit is used to generate an article corresponding to the topic of the article to be generated according to the node generating order and the node content corresponding to the candidate article node.

[0121] The article generation device provided in the embodiment of the present invention can execute the article generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each article generation method.

[0122] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the documents to be processed and the preset similarity thresholds are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0123] Embodiment 4

[0124] Figure 4 It is a structural diagram of an electronic device for implementing an article generation method provided by Embodiment 4 of the present invention. Electronic device 410 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0125] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0126] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0127] Processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. Processor 411 performs the various methods and processes described above, such as an article generation method.

[0128] In some embodiments, the article generation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the article generation method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to perform the article generation method in any other suitable manner (e.g., by means of firmware).

[0129] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0130] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0131] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0132] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0133] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0134] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0135] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating an article, characterized in that: include: Obtain at least one document to be processed under the topic of the article to be generated, and construct a candidate document map corresponding to each of the documents to be processed; Determine the node similarity between the candidate document nodes at the same node level in each of the candidate document graphs, and integrate each of the candidate document graphs according to the node similarity to obtain an article generation graph; Determine the candidate article node weight corresponding to each candidate article node in the article generation graph, and generate an article corresponding to the topic of the article to be generated based on the candidate article node weight and the candidate article node.

2. The method according to claim 1, characterized in that The determining of the node similarity between the candidate document nodes at the same node level in each of the candidate document graphs, and integrating each of the candidate document graphs according to the node similarity to obtain an article generation graph, includes: For any node level, the candidate document node at the node level in each of the candidate document graphs is used as the current document node; Determine the node similarity between any current document node in any candidate document graph and any current document node in other candidate document graphs; According to the node similarity, the current document nodes in each of the candidate document graphs are node-merged, and after the candidate document nodes of all node levels in each of the candidate document graphs are node-merged, an article generation graph is obtained.

3. The method according to claim 2, characterized in that The step of merging the current document nodes in each of the candidate document graphs according to the node similarity comprises: Determine, according to the node similarity and a preset similarity threshold, a candidate merging method between any two current document nodes corresponding to the node similarity; Determining a target merging mode of the current document node according to the candidate merging modes corresponding to the current document node; According to the target merging method, nodes are merged for the current document nodes in each of the candidate document graphs.

4. The method according to claim 3, characterized in that The determining, according to the node similarity and a preset similarity threshold, a candidate merging method between any two current document nodes corresponding to the node similarity includes: If the node similarity is greater than or equal to a preset similarity threshold, determining that the candidate merging method between any two current document nodes corresponding to the node similarity is node merging; If the node similarity is less than a preset similarity threshold, it is determined that the candidate merging mode between any two current document nodes corresponding to the node similarity is node addition.

5. The method according to claim 1, characterized in that The determining of the candidate article node weight corresponding to each candidate article node in the article generation graph includes: Taking any candidate article node with child nodes in the article generation graph as a reference parent node, and taking each candidate article node under the reference parent node as a reference child node; Determine node implicit features between the parent node vector corresponding to the reference parent node and the child node vectors corresponding to each of the reference child nodes; The node implicit features are normalized to obtain the candidate article node weights of the corresponding reference child nodes.

6. The method according to claim 5, characterized in that The determining of node implicit features between the parent node vector corresponding to the reference parent node and the child node vectors corresponding to each of the reference child nodes includes: For any reference child node, concatenate the child node vector corresponding to the reference child node and the parent node vector corresponding to the reference parent node to obtain a node concatenation vector, and determine a node mapping scalar of the node concatenation vector; Based on a preset activation function, the node mapping scalar is processed to obtain the node implicit feature between the reference child node and the reference parent node.

7. The method according to any one of claims 1 to 6, characterized in that The step of generating an article corresponding to the topic of the article to be generated according to the candidate article node weight and the candidate article node comprises: Determining the node generation order when each of the candidate article nodes generates an article according to the node level and the candidate article node weight; An article corresponding to the topic of the article to be generated is generated according to the node generation order and the node content corresponding to the candidate article node.

8. An article generating device, characterized in that: include: A document map construction module is used to obtain at least one document to be processed under the subject of the article to be generated, and to construct a candidate document map corresponding to each of the documents to be processed; An article generation graph construction module is used to determine the node similarity between candidate document nodes at the same node level in each candidate document graph, and integrate each candidate document graph according to the node similarity to obtain an article generation graph; The article generation module is used to determine the candidate article node weight corresponding to each candidate article node in the article generation graph, and generate an article corresponding to the article theme to be generated based on the candidate article node weight and the candidate article node.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement an article generating method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, an article generation method as described in any one of claims 1 to 7 is implemented.