CN115309888A - Method and device for generating chart abstract and method and device for training generated model - Google Patents

Method and device for generating chart abstract and method and device for training generated model Download PDF

Info

Publication number
CN115309888A
CN115309888A CN202211037048.0A CN202211037048A CN115309888A CN 115309888 A CN115309888 A CN 115309888A CN 202211037048 A CN202211037048 A CN 202211037048A CN 115309888 A CN115309888 A CN 115309888A
Authority
CN
China
Prior art keywords
information
target
data
type
chart
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.)
Granted
Application number
CN202211037048.0A
Other languages
Chinese (zh)
Other versions
CN115309888B (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211037048.0A priority Critical patent/CN115309888B/en
Publication of CN115309888A publication Critical patent/CN115309888A/en
Application granted granted Critical
Publication of CN115309888B publication Critical patent/CN115309888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • G06F16/345Summarisation for human users
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

The disclosure provides a method, a device, equipment and a medium for generating a chart abstract, and relates to the field of artificial intelligence, in particular to the technical fields of deep learning, natural language processing, knowledge maps and the like. The specific implementation scheme of the chart abstract generation method is as follows: extracting data from the target diagram by adopting an operation function to obtain target data and attribute information of the target data; fusing target data, attribute information and type information of an operation function to obtain key information of a target chart; coding the key information to obtain coding characteristics; and decoding the coding characteristics to obtain the abstract text of the target diagram.

Description

Method and device for generating chart abstract and method and device for training generated model
Technical Field
The disclosure relates to the field of artificial intelligence, in particular to the field of deep learning and knowledge maps, and particularly relates to a method for generating a chart abstract and a method, a device, equipment and a medium for training a generated model.
Background
With the development of computer technology and network technology, deep learning technology has been widely used in many fields. For example, deep learning techniques may be employed to generate summary text for a chart from data in the chart. If the abstract text is generated directly according to the data in the chart, the problems that the information expressed by the abstract text is less and the abstract text is inaccurate exist.
Disclosure of Invention
The present disclosure is directed to a method for generating a summary of a chart and a method, an apparatus, a device, and a medium for training a generative model to improve the expressive power of a summary text generated for a chart.
According to an aspect of the present disclosure, there is provided a method for generating a chart summary, including: extracting data from the target graph by adopting an operation function to obtain target data and attribute information of the target data; extracting data from the target graph by adopting an operation function to obtain target data and attribute information of the target data; coding the key information to obtain coding characteristics; and decoding the coding characteristics to obtain the abstract text of the target chart.
According to another aspect of the present disclosure, there is provided a training method of a generative model, wherein the generative model comprises an encoder and a decoder; the training method comprises the following steps: extracting data from a target graph included in the graph sample by adopting an operation function to obtain target data and attribute information of the target data; wherein, the chart sample also comprises an actual abstract text of the target chart; fusing target data, attribute information and type information of an operation function to obtain key information of a target chart; coding the key information by using a coder to obtain coding characteristics; decoding the coding characteristics by a decoder to obtain a prediction abstract text of the target diagram; and training the generation model according to the difference between the predicted abstract text and the actual abstract text.
According to another aspect of the present disclosure, there is provided a chart summary generation apparatus, including: the data extraction module is used for extracting data from the target diagram by adopting an operation function to obtain target data and attribute information of the target data; the information fusion module is used for fusing target data, attribute information and type information of an operation function to obtain key information of a target chart; the information coding module is used for coding the key information to obtain coding characteristics; and the text generation module is used for decoding the coding features to obtain the abstract text of the target chart.
According to another aspect of the present disclosure, there is provided a training apparatus for generating a model, wherein the generating the model includes an encoder and a decoder; the training device comprises: the data extraction module is used for extracting data from a target diagram included in the diagram sample by adopting an operation function to obtain the target data and the attribute information of the target data; wherein the chart sample further comprises an actual abstract text of the target chart; the information fusion module is used for fusing target data, attribute information and type information of an operation function to obtain key information of a target chart; the information coding module is used for coding the key information by adopting a coder to obtain coding characteristics; the text generation module is used for decoding the coding characteristics by adopting a decoder to obtain a prediction abstract text of the target chart; and the model training module is used for training the generation model according to the difference between the prediction abstract text and the actual abstract text.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of generating a summary of a chart and/or a method of training a generative model provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method of generating a graph summary and/or a method of training a generative model provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of generating a graph summary and/or the method of training a generative model provided by the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of an application scenario of a method for generating a graph abstract and a method and an apparatus for training a generative model according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram of a method of generating a graph summary according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of the principle of obtaining key information for a target graph according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of generating summary text of a chart in accordance with an embodiment of the present disclosure;
FIG. 5 is a flow diagram of a training method of generating a model according to an embodiment of the disclosure;
fig. 6 is a block diagram of a diagram summary generation apparatus according to an embodiment of the present disclosure;
FIG. 7 is a block diagram of a training apparatus for generating models according to an embodiment of the present disclosure; and
fig. 8 is a block diagram of an electronic device for implementing a method for generating a graph summary and/or a method for training a generative model according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The generation technology of the diagram abstract comprises the following steps: given Chart data, text describing the Chart data is generated, which may be referred to as Chart-to-Text for short. Wherein, the chart data can be embodied in the form of a table.
For example, in generating text describing chart data, a abstract text may be generated by extracting data from the chart data using a predefined operation function and then inputting the extracted data into a generation model together with original record data of a table. In the method of this embodiment, the generative model generally cannot learn the inference information according to the original recorded data and the extracted data of the table, and therefore, it is impossible to help a reader of the abstract text to quickly know hidden information in the chart data and to help the reader to comprehensively understand the meaning of the chart data.
Based on the method, the disclosure provides a method for generating a chart abstract and a method and a device for training a generating model. An application scenario of the method and apparatus provided by the present disclosure will be described below with reference to fig. 1.
Fig. 1 is a schematic application scenario diagram of a method for generating a graph abstract and a method and an apparatus for training a generative model according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 of this embodiment may include an electronic device 110, and the electronic device 110 may be various electronic devices with processing functionality, including but not limited to a smartphone, a tablet, a laptop, a desktop computer, a server, and so on.
The electronic device 110 may process the graph 120, for example, and may specifically extract data from the graph 120. Subsequently, the electronic device 110 may generate key information of the graph 120 according to the extracted data, corresponding row information and column information of the data in the graph 120, the type of the operation function employed when extracting the data, and the like. The summary text 130 of the chart 120 may then be generated from the key information.
In an embodiment, the electronic device 110 may use the pre-trained generative model 140 to encode and decode the key information, and obtain the abstract text 130 according to the decoding result.
In an embodiment, as shown in fig. 1, the application scenario 100 may further include a server 150, and the server 150 may be, for example, a background management server supporting the running of the client application in the electronic device 110. The electronic device 110 may be communicatively coupled to the server 150 via a network, which may include wired or wireless communication links.
For example, the server 150 may train a generative model based on a chart with abstract text and, in response to a request by the electronic device 110, send the trained generative model 140 to the electronic device 110 for the electronic device 110 to employ the generative model to generate the abstract text 130.
In one embodiment, the electronic device 110 may, for example, send the data extracted from the chart 120 or the generated key information to the server 150, and the server 150 generates the abstract text 130 of the chart 120. Alternatively, the electronic device 110 may directly send the chart 120 to the server 150, the server 150 extracts data from the chart 120, generates key information from the data, and encodes and decodes the key information using the generative model 140 to generate the abstract text 130 of the chart 120.
It should be noted that the training method for generating the model provided by the present disclosure may be executed by the server 150. Accordingly, the training apparatus for generating the model provided by the present disclosure may be provided in the server 150. The method for generating the chart abstract provided by the present disclosure may be executed by the electronic device 110, the server 150, or a part of the operations performed by the electronic device 110 and the server 150. Accordingly, the apparatus for generating the chart abstract provided by the present disclosure may be disposed in the electronic device 110, or may be disposed in the server 150, or some modules may be disposed in the electronic device 110, and some modules may be disposed in the server 150.
It should be understood that the number and type of electronic devices 110 and servers 150 in fig. 1 are merely illustrative. There may be any number and type of electronic devices 110 and servers 150, as desired for an implementation.
A method for generating a graph summary provided by the present disclosure will be described in detail below with reference to fig. 2 to 4.
Fig. 2 is a flowchart illustrating a method for generating a graph summary according to an embodiment of the disclosure.
As shown in fig. 2, the method 200 for generating a graph summary of this embodiment may include operations S210 to S240.
In operation S210, data is extracted from the target graph by using an operation function, and the target data and attribute information of the target data are obtained.
According to an embodiment of the present disclosure, the arithmetic function may include, for example, a function that extracts at least one of the following data: maximum, minimum, next largest, next smallest, median, mode, data that is the latest in time, data that is the earliest in time, etc., as the disclosure does not limit.
According to an embodiment of the present disclosure, the target graph may be any table, which may include several columns, which may include an Index column Index, a time column, and/or an Index column, etc. The index column may include values of any index at different time points. For example, any index may be a statistical index such as an annual average production amount and a warehouse-out amount, or may be any other index, which is not limited in the present disclosure.
In this embodiment, the attribute data of the target data may include, for example, a column name of a column where the target data is located, data other than the target data in a row where the target data is located, a column name of the other data, an index value of the row where the target data is located, and the like. The attribute information may be, for example, any information for reflecting the position of the target data in the target graph, or may be any data having a mapping relationship with the target data in the target graph, and the attribute information is any information extracted from the target graph according to the target data, which is not limited by the present disclosure.
It is to be understood that, when a plurality of index columns are included in the target graph, the operation S210 may further extract data from a specified column of the plurality of index columns using an operation function. The designated column may be determined according to an input column name, and the like, which is not limited in this disclosure.
In operation S220, the target data, the attribute information, and the type information of the operation function are fused to obtain key information of the target graph.
The type of the operation function may be a type of data extracted by the operation function, and may include: a maximum type, a minimum type, a next maximum type, a next minimum type, a median type, a mode type, a type of data that is latest in time, a type of data that is earliest in time, etc., which are not limited by this disclosure.
The embodiment can combine the target data, the attribute information and the type information of the operation function into a piece of multi-group information, and the multi-group information is used as the key information of the target chart.
In operation S230, the key information is encoded to obtain an encoding characteristic.
According to the embodiment of the disclosure, the encoder can be adopted to perform encoding processing on the key information to obtain the encoding characteristics. The encoder may be an encoder constructed based on a deep neural network, for example, an encoder constructed based on a sequence network, including an encoder in a transform architecture, or an encoder constructed based on a long-term and short-term memory network. It is understood that the encoder may be any encoder structure, for example, the encoder may be formed of convolutional layers, which is not limited by the present disclosure. The embodiment can input the key information into a pre-trained encoder, and the encoder outputs the encoding characteristics.
In an embodiment, for example, the following formula (1) may be adopted to perform encoding processing on the key information Z, so as to obtain the encoding characteristic h:
h = W [ Z ] + b formula (1).
Wherein, W and b are network parameters in the encoder, and the values of the network parameters are obtained through training.
In operation S240, the encoding features are decoded to obtain a summary text of the target graph.
According to the embodiment of the disclosure, a decoder can be adopted to perform decoding processing on the coding features, so as to obtain the abstract text. The decoder may be a decoder constructed based on a deep neural network, for example, a decoder constructed based on a sequence network, including a decoder in a transform architecture, or a decoder constructed based on a long-short term memory network, etc. It is to be understood that the decoder may be any structure of decoder, for example, the decoder may be a decoder constructed based on the attention mechanism, which is not limited by the present disclosure. The embodiment can input the coding characteristics into a decoder obtained by pre-training, and the decoder outputs a plurality of words forming the abstract text in a sequence form, and the abstract text can be obtained by combining the plurality of words.
When the abstract text of the target chart is generated, the key information includes not only the data extracted according to the operation function, but also the type information of the operation function, the attribute information of the extracted data and the like, so that the content of the key information can be enhanced, reasoning information can be provided for the encoding and decoding process of generating the abstract text, and the quality and the expression capacity of the generated abstract text can be improved.
The manner in which the key information is obtained in operation S220 described above will be further expanded and defined below.
According to the embodiment of the disclosure, at least two types of operation functions can be adopted to extract data from the target chart, and one piece of key information is obtained for each type of operation function. Specifically, for each function of the at least two types of operation functions, data may be extracted from the target graph by using the function, and the target data and the attribute information of the target data may be obtained. And then, fusing the target data extracted by each function, the attribute information of the target data and the function type of each function to obtain key information aiming at each function.
The embodiment can input at least two pieces of key information aiming at least two types of operation functions into the encoder in the form of information sequences, thereby obtaining the encoding characteristic sequences. For example, the setting is performed by pairing at least two classesCoding the key information of the ith operation function in the type of operation function to obtain a code characteristic h i Then the coding feature h of the encoder output can be expressed as
Figure BDA0003818555900000071
Wherein k is the number of at least two types of arithmetic functions.
In one embodiment, the decoder may generate the digest text based on the probability function in the following formula (2), for example, when performing the decoding process on the coded feature sequence:
Figure BDA0003818555900000072
wherein y is the word sequence of the abstract text, y t Is the t-th word in the word sequence, | y | is the total number of words in the word sequence, y <t Indicating that the decoder has output a word before the output of the t-th word, or may indicate a word in the sequence of words that is located before the position of the t-th word. p (y | h) is the conditional probability that y is generated when the coding feature is h.
The embodiment extracts the data by adopting at least two types of operation functions, so that the extracted data and the key information obtained by fusion are richer, richer reasoning information can be provided for the generation of the abstract text, and the quality and the expression capability of the generated abstract text can be improved.
In an embodiment, the target data, the attribute information, and the type information of the operation function may also be fused according to a predetermined information template. For example, a plurality of element positions may be set in the predetermined information template for at least one of the target data, the attribute information, and the type information of the operation function, so as to fill the at least one information into different positions of the plurality of element positions according to the requirements of different scenes. Therefore, the applicability of the principle of obtaining key information in a fusion mode can be improved, and the robustness of the method for generating the chart abstract provided by the disclosure is improved.
Specifically, when the key information is obtained, the target data, the attribute information, and the type information of the operation function may be combined into multi-tuple information according to a predetermined information template, and the multi-tuple information may be used as the key information of the target graph. It is to be understood that, when the operation function includes at least two types of functions, the embodiment may obtain one multi-element group information for each type of operation function. This embodiment will be described in detail below with reference to fig. 3.
FIG. 3 is a schematic diagram illustrating a principle of obtaining key information for a target graph according to an embodiment of the present disclosure.
As shown in fig. 3, in this embodiment 300, when data is extracted from the target graph 310 by using the maximum value type arithmetic function arg _ max () 320, the column to which the data is directed may be the index column "XXX", and the extraction result is the maximum value "41691" in the index column "XXX", so that the target data 330 is "41691". The attribute information of the target data 330 may include a column name "XXX" of a column in which the target data is located, a year 2019 having a mapping relation with the target data, and an index value "1" of a row in which the target data is located. The attribute information and the target data 330 may be represented by, for example, a six-tuple 340 (1, y, XXX,41691, none, 2019), where "1" in the six-tuple 340 is an index value, and "y, XXX" represents a column name of a column in which the target data is located, and it is understood that a relationship between "y" and "XXX" may be understood as a relationship between a key (key) and a value (value). Where "None" and "2019" are two different types of attribute values of the attribute having a mapping relationship with the target data. For example, in the target graph 310, the attribute value having a mapping relationship with the target data 330 is year "2019", and year "2019" is a data type. If the year column in target chart 310 is replaced by the entity column, the attribute value having a mapping relationship with target data 330 should be an entity, for example, entity a, then "None" in hexahydric group 340 is replaced by "entity a", and "2019" in hexahydric group 340 is replaced by "None". It can be understood that, the information having a mapping relationship with the target data is used as any attribute in the attribute information, and two elements are set for any attribute, so that the data format of the hexahydric group 340 can be used for representing target data and attribute information of multiple types of charts. It is understood that, according to actual requirements, three or more elements may be further provided for any attribute, so as to further expand the application scenario of the data format of the hexahydric group 340.
As shown in fig. 3, the type of the operation function 320 in this embodiment can be represented by a binary 350, for example, if the operation function 320 is of the maximum value type and the data targeted by the operation function 320 is a value in the column "XXX", that is, the type of the data targeted by the operation function 320 is a value type, the binary 350 can be represented by (max, none); if the operation function 320 is of the minimum type, the binary 350 is changed to (min, none). If the operation function 320 is of the maximum value type and the data targeted by the operation function 320 is the "year" column, the purpose of the operation function 320 is to obtain the latest value of "XXX", and the maximum value refers to the latest time in the "year" column, that is, the type of the data targeted by the operation function 320 is the time type, then the binary group can be represented as (none, late); if the operation function 320 is of the minimum type, the binary is changed to (none, old). It will be appreciated that the above description makes the data form of the doublet 350 usable to represent the type of arithmetic function that extracts data from columns of different types of data by providing two elements for the type of data for which the arithmetic function is intended. It can be understood that, according to actual requirements, three or more elements can be set for the type of data targeted by the operation function, so as to further extend the application scenario of the binary 350 in the form of data.
In the embodiment 300, the predetermined information template may be, for example, an octave information template, in which the first six-bit element corresponds to the six-bit element 340 and the last two-bit element corresponds to the two-bit element 350, and the embodiment may combine the six-bit element 340 and the two-bit element 350 into an octave (1, y, xxx,41691, none,2019, max, none) 360, and use the octave 360 as a piece of key information of the target chart.
It is to be understood that at least two elements may be provided for only any attribute, or may be provided for only the type of data for which the operation function is directed, which is not limited by the present disclosure. And it is understood that the binary, six-tuple and eight-tuple in the above embodiment 300 are only examples to facilitate understanding of the present disclosure, and the present disclosure does not limit this, and any number of multi-tuples may be set according to actual needs.
The principle of generating the abstract text of a diagram will be further expanded and defined below.
FIG. 4 is a schematic diagram of generating summary text of a chart in accordance with an embodiment of the present disclosure.
According to the embodiment of the disclosure, when the abstract text of the chart is generated, in addition to the target data extracted from the target chart, the attribute information of the target data and the type of the operation function called during extraction, for example, the title of the target chart can be considered, so that richer information is provided for the generation of the abstract text, and the quality and the expression capability of the generated abstract text are further improved.
As shown in fig. 4, in this embodiment 400, after the key information 410 of the target graph is obtained by the method described above, the key information 410 may be encoded by, for example, an encoder 420, so as to obtain an encoding characteristic 430. At the same time, the embodiment may also obtain the embedded features 450 of the header information 440 of the target chart. It will be appreciated that the embedded features 450 may be output by the text embedding layer by entering the header information 440 into the text embedding layer. Alternatively, the embedded features 450 may be generated in advance and stored in a storage space, and the embodiment may acquire the embedded features 450 of the header information 440 from the storage space when the method of generating the chart summary is performed.
After obtaining the embedded features 450 and the encoded features 430, the embodiment 400 may first fuse the two features to obtain fused features 460. For example, the fusion of the two features may be achieved by stitching the embedded features 450 and the encoded features 430. Alternatively, the encoding features 430 are set to the sequence of features described above
Figure BDA0003818555900000101
The embedded feature is denoted as h title The fused feature can be, for example, a sequence of features, represented as
Figure BDA0003818555900000102
Wherein,
Figure BDA0003818555900000103
can be expressed by the following formula (3):
Figure BDA0003818555900000104
wherein,
Figure BDA0003818555900000105
denotes a reaction of i Each element in (1) and h title The elements at the corresponding positions in the image are added.
Upon obtaining the fused features 460, the embodiment may input the fused features 460 into the decoder 470, and the decoder 470 outputs the abstract text 480 of the target chart.
In order to facilitate the implementation of the method for generating a diagram abstract, the present disclosure also provides a training method for generating a model, which will be described in detail below with reference to fig. 5.
FIG. 5 is a flow chart diagram of a training method of a generative model according to an embodiment of the present disclosure.
As shown in FIG. 5, the training method 500 for generating a model of this embodiment may include operations S510 to S550. The generative model may include, among other things, an encoder and a decoder.
In operation S510, data is extracted from the target graph included in the graph sample by using an operation function, and the target data and attribute information of the target data are obtained.
Wherein the chart sample further comprises actual abstract text of the target chart. The implementation principle of operation S510 is similar to that of operation S210, and is not described herein again.
In operation S520, the target data, the attribute information, and the type information of the operation function are fused to obtain key information of the target graph. The implementation principle of operation S520 is similar to that of operation S220, and is not described herein again.
In operation S530, the key information is encoded by using an encoder, so as to obtain an encoding characteristic. The implementation principle of operation S530 is similar to that of operation S230, and is not described herein again.
In operation S540, a decoder is used to decode the encoding features, so as to obtain a prediction abstract text of the target graph. The implementation principle of operation S540 is similar to that of operation S240, and is not described herein again.
In operation S550, the generation model is trained according to a difference between the prediction digest text and the actual digest text.
According to an embodiment of the present disclosure, for example, a value of a cross entropy loss function may be employed to represent a difference between a predicted digest text and an actual digest text. The embodiment may adjust network parameters in the generative model with the goal of minimizing the difference, thereby enabling training of the generative model. The network parameters may include, for example, W and b, etc., described above.
Based on the method for generating the chart abstract provided by the present disclosure, the present disclosure also provides a device for generating the chart abstract, which will be described in detail below with reference to fig. 6.
Fig. 6 is a block diagram of a diagram summary generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the generating apparatus 600 of the chart summary of the embodiment may include a data extracting module 610, an information fusing module 620, an information encoding module 630 and a text generating module 640.
The data extraction module 610 is configured to extract data from the target graph by using an operation function, so as to obtain the target data and attribute information of the target data. In an embodiment, the data extraction module 610 may be configured to perform the operation S210 described above, which is not described herein again.
The information fusion module 620 is configured to fuse the target data, the attribute information, and the type information of the operation function to obtain key information of the target graph. In an embodiment, the information fusion module 620 may be configured to perform the operation S220 described above, which is not described herein again.
The information encoding module 630 is configured to perform encoding processing on the key information to obtain encoding characteristics. In an embodiment, the information encoding module 630 may be configured to perform the operation S230 described above, which is not described herein again.
The text generating module 640 is configured to decode the encoding features to obtain a summary text of the target chart. In an embodiment, the text generating module 640 may be configured to perform the operation S240 described above, which is not described herein again.
According to an embodiment of the present disclosure, the arithmetic function includes at least two types of functions. The information fusion module 620 may be configured to: for each of at least two types of functions: and fusing the target data extracted by each function, the attribute information of the target data and the type information of each function to obtain key information aiming at each function. The encoding processing of the key information is carried out by adopting an encoder based on a sequence network structure, and the decoding processing of the encoding characteristics is carried out by adopting a decoder based on the sequence network structure.
According to an embodiment of the present disclosure, the apparatus 600 may further include an embedded feature obtaining module, configured to obtain an embedded feature of the header information of the target chart. The text generation module 640 may include a fusion sub-module and a decoding sub-module. And the fusion sub-module is used for fusing the embedding characteristics and the coding characteristics of the header information to obtain fusion characteristics. And the decoding submodule is used for decoding the fusion characteristics to obtain the abstract text of the target diagram.
According to an embodiment of the present disclosure, the information fusion module 620 may be configured to: and combining the target data, the attribute information and the type information of the operation function into multi-tuple information according to a preset information template to obtain the key information of the target diagram. The multi-group information comprises at least two elements aiming at any attribute in the attribute information so as to respectively correspond to at least two types of attribute values of any attribute; and/or the multi-element group information comprises at least two elements aiming at the operation function so as to respectively correspond to at least two types of data aiming at the operation function.
According to an embodiment of the present disclosure, the at least two types of attribute values of any one of the attributes described above include: a value type, an entity type; at least two types of data for which the arithmetic function is directed include: a value type, a time type.
According to an embodiment of the present disclosure, the operation function includes a function of at least one of the following types: a minimum type, a next minimum type, a maximum type, and a next maximum type.
Based on the training method for generating the model provided by the present disclosure, the present disclosure also provides a training device for generating the model, which will be described in detail below with reference to fig. 7.
Fig. 7 is a block diagram of a training apparatus for generating a model according to an embodiment of the present disclosure.
As shown in fig. 7, the training apparatus 700 for generating a model of this embodiment may include a data extraction module 710, an information fusion module 720, an information encoding module 730, a text generation module 740, and a model training module 750. The generative model may include, among other things, an encoder and a decoder.
The data extraction module 710 may be configured to extract data from a target graph included in the graph sample by using an operation function, so as to obtain the target data and attribute information of the target data. Wherein the chart sample further comprises actual abstract text of the target chart. In an embodiment, the data extraction module 710 may be configured to perform the operation S510 described above, which is not described herein again.
The information fusion module 720 may be configured to fuse the target data, the attribute information, and the type information of the operation function to obtain key information of the target graph. In an embodiment, the information fusion module 720 may be configured to perform the operation S520 described above, which is not described herein again.
The information encoding module 730 may be configured to perform encoding processing on the key information by using an encoder to obtain encoding characteristics. In an embodiment, the information encoding module 730 may be configured to perform the operation S530 described above, which is not described herein again.
The text generating module 740 may be configured to perform a decoding process on the encoding features by using a decoder to obtain a prediction abstract text of the target graph. In an embodiment, the text generating module 740 may be configured to perform the operation S540 described above, which is not described herein again.
The model training module 750 may be used to train the generation model based on the difference between the predicted digest text and the actual digest text. In an embodiment, the model training module 750 may be configured to perform the operation S550 described above, which is not described herein again.
In the technical scheme of the present disclosure, the processes of collecting, storing, using, processing, transmitting, providing, disclosing and applying the personal information of the related users all conform to the regulations of related laws and regulations, and necessary security measures are taken without violating the good customs of the public order. In the technical scheme of the disclosure, before the personal information of the user is obtained or collected, the authorization or the consent of the user is obtained.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 8 illustrates a schematic block diagram of an example electronic device 800 that may be used to implement a method of generating a graph summary and/or a method of training a generative model of embodiments of the disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 801 performs the respective methods and processes described above, such as a generation method of a graph summary and/or a training method of a generation model. For example, in some embodiments, the method of generating a graph summary and/or the method of training a generative model may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When loaded into RAM 803 and executed by computing unit 801, a computer program may perform one or more steps of the above described method of generating a summary of a chart and/or training method of generating a model. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the method of generating the graph summary and/or the method of training the generative model in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, which is also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a traditional physical host and a VPS service ("virtual privateserver", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A method for generating a diagram abstract comprises the following steps:
extracting data from a target chart by adopting an operation function to obtain target data and attribute information of the target data;
fusing the target data, the attribute information and the type information of the operation function to obtain key information of the target chart;
coding the key information to obtain coding characteristics; and
and decoding the coding features to obtain a summary text of the target diagram.
2. The method of claim 1, wherein the operational function comprises at least two types of functions; wherein the fusing the target data, the attribute information, and the type information of the operation function to obtain key information for the target graph includes:
for each of at least two types of functions: fusing the target data extracted by each function, the attribute information of the target data and the type information of each function to obtain key information aiming at each function,
the encoding processing of the key information is performed by an encoder based on a sequence network structure, and the decoding processing of the encoding characteristics is performed by a decoder based on the sequence network structure.
3. The method of claim 1, further comprising:
acquiring the embedded characteristics of the header information of the target chart;
wherein the decoding the coding features to obtain the graph abstract of the target graph comprises:
fusing the embedded features of the header information and the coding features to obtain fused features; and
and decoding the fusion characteristics to obtain the abstract text of the target chart.
4. The method of claim 1, wherein the fusing the target data, the attribute information, and the type information of the operation function to obtain key information of the target graph comprises:
combining the target data, the attribute information and the type information of the operation function into multi-tuple information according to a preset information template to obtain key information of the target diagram,
wherein, the tuple information comprises at least two elements aiming at any attribute in the attribute information so as to respectively correspond to at least two types of attribute values of the attribute; and/or, the multi-element group information includes at least two elements for the operation function, so as to respectively correspond to at least two types of data for which the operation function is directed.
5. The method of claim 4, wherein the at least two types of attribute values of any attribute comprise: a value type, an entity type; the at least two types of data for which the arithmetic function is directed include: a value type, a time type.
6. The method of claim 1, wherein the operational function comprises a function of at least one of the following types: a minimum type, a next minimum type, a maximum type, and a next maximum type.
7. A training method of a generative model, wherein the generative model comprises an encoder and a decoder; the method comprises the following steps:
extracting data from a target graph included in a graph sample by adopting an operation function to obtain target data and attribute information of the target data; wherein the chart sample further comprises actual summary text of the target chart;
fusing the target data, the attribute information and the type information of the operation function to obtain key information of the target chart;
the encoder is adopted to carry out encoding processing on the key information to obtain encoding characteristics;
decoding the coding features by adopting the decoder to obtain a prediction abstract text of the target diagram; and
and training the generation model according to the difference between the predicted abstract text and the actual abstract text.
8. An apparatus for generating a summary of a chart, comprising:
the data extraction module is used for extracting data from the target graph by adopting an operation function to obtain target data and attribute information of the target data;
the information fusion module is used for fusing the target data, the attribute information and the type information of the operation function to obtain key information of the target chart;
the information coding module is used for coding the key information to obtain coding characteristics; and
and the text generation module is used for decoding the coding features to obtain abstract texts of the target chart.
9. The apparatus of claim 8, wherein the operational function comprises at least two types of functions; the information fusion module is used for:
for each of at least two types of functions: fusing the target data extracted by each function, the attribute information of the target data and the type information of each function to obtain key information aiming at each function,
wherein, the encoding processing of the key information is performed by an encoder based on a sequence network structure, and the decoding processing of the encoding characteristics is performed by a decoder based on a sequence network structure.
10. The apparatus of claim 8, further comprising:
the embedded characteristic acquisition module is used for acquiring the embedded characteristic of the header information of the target chart;
wherein the text generation module comprises:
the fusion submodule is used for fusing the embedded characteristic of the header information and the coding characteristic to obtain a fusion characteristic; and
and the decoding submodule is used for decoding the fusion characteristics to obtain the abstract text of the target chart.
11. The apparatus of claim 8, wherein the information fusion module is to:
combining the target data, the attribute information and the type information of the operation function into multi-tuple information according to a preset information template to obtain key information of the target diagram,
wherein, the tuple information comprises at least two elements aiming at any attribute in the attribute information so as to respectively correspond to at least two types of attribute values of the attribute; and/or, the multi-element group information includes at least two elements for the operation function, so as to respectively correspond to at least two types of data for which the operation function is directed.
12. The apparatus of claim 11, wherein the at least two types of attribute values of any attribute comprise: a value type, an entity type; the at least two types of data for which the arithmetic function is directed include: a value type, a time type.
13. The apparatus of claim 8, wherein the arithmetic function comprises a function of at least one of the following types: a minimum type, a next minimum type, a maximum type, and a next maximum type.
14. A training apparatus that generates a model, wherein the generated model includes an encoder and a decoder; the device comprises:
the data extraction module is used for extracting data from a target diagram included in the diagram sample by adopting an operation function to obtain target data and attribute information of the target data; wherein the chart sample further comprises actual summary text of the target chart;
the information fusion module is used for fusing the target data, the attribute information and the type information of the operation function to obtain key information of the target chart;
the information coding module is used for coding the key information by adopting the coder to obtain coding characteristics;
the text generation module is used for decoding the coding features by adopting the decoder to obtain a prediction abstract text of the target chart; and
and the model training module is used for training the generated model according to the difference between the predicted abstract text and the actual abstract text.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to any one of claims 1 to 7.
17. A computer program product comprising computer program/instructions stored on at least one of a readable storage medium and an electronic device, which when executed by a processor implement the steps of the method according to any one of claims 1 to 7.
CN202211037048.0A 2022-08-26 2022-08-26 Method and device for generating chart abstract and training method and device for generating model Active CN115309888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211037048.0A CN115309888B (en) 2022-08-26 2022-08-26 Method and device for generating chart abstract and training method and device for generating model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211037048.0A CN115309888B (en) 2022-08-26 2022-08-26 Method and device for generating chart abstract and training method and device for generating model

Publications (2)

Publication Number Publication Date
CN115309888A true CN115309888A (en) 2022-11-08
CN115309888B CN115309888B (en) 2023-05-30

Family

ID=83864523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211037048.0A Active CN115309888B (en) 2022-08-26 2022-08-26 Method and device for generating chart abstract and training method and device for generating model

Country Status (1)

Country Link
CN (1) CN115309888B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104657375A (en) * 2013-11-20 2015-05-27 中国科学院深圳先进技术研究院 Image-text theme description method, device and system
CN105378732A (en) * 2013-07-18 2016-03-02 国际商业机器公司 Subject-matter analysis of tabular data
CN109508400A (en) * 2018-10-09 2019-03-22 中国科学院自动化研究所 Picture and text abstraction generating method
CN110704606A (en) * 2019-08-19 2020-01-17 中国科学院信息工程研究所 Generation type abstract generation method based on image-text fusion
CN111460135A (en) * 2020-03-31 2020-07-28 北京百度网讯科技有限公司 Method and device for generating text abstract
CN113434664A (en) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 Text abstract generation method, device, medium and electronic equipment
CN113806522A (en) * 2021-09-18 2021-12-17 北京百度网讯科技有限公司 Abstract generation method, device, equipment and storage medium
WO2021257195A1 (en) * 2020-06-18 2021-12-23 Microsoft Technology Licensing, Llc Topic graph-based comment generation
CN113961685A (en) * 2021-07-13 2022-01-21 北京金山数字娱乐科技有限公司 Information extraction method and device
CN114020900A (en) * 2021-11-16 2022-02-08 桂林电子科技大学 Chart English abstract generation method based on fusion space position attention mechanism
CN114818627A (en) * 2022-05-25 2022-07-29 中国建设银行股份有限公司 Form information extraction method, device, equipment and medium
CN114936279A (en) * 2022-03-07 2022-08-23 重庆中烟工业有限责任公司 Unstructured chart data analysis method for collaborative manufacturing enterprise

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105378732A (en) * 2013-07-18 2016-03-02 国际商业机器公司 Subject-matter analysis of tabular data
CN104657375A (en) * 2013-11-20 2015-05-27 中国科学院深圳先进技术研究院 Image-text theme description method, device and system
CN109508400A (en) * 2018-10-09 2019-03-22 中国科学院自动化研究所 Picture and text abstraction generating method
CN110704606A (en) * 2019-08-19 2020-01-17 中国科学院信息工程研究所 Generation type abstract generation method based on image-text fusion
CN111460135A (en) * 2020-03-31 2020-07-28 北京百度网讯科技有限公司 Method and device for generating text abstract
WO2021257195A1 (en) * 2020-06-18 2021-12-23 Microsoft Technology Licensing, Llc Topic graph-based comment generation
CN113434664A (en) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 Text abstract generation method, device, medium and electronic equipment
CN113961685A (en) * 2021-07-13 2022-01-21 北京金山数字娱乐科技有限公司 Information extraction method and device
CN113806522A (en) * 2021-09-18 2021-12-17 北京百度网讯科技有限公司 Abstract generation method, device, equipment and storage medium
CN114020900A (en) * 2021-11-16 2022-02-08 桂林电子科技大学 Chart English abstract generation method based on fusion space position attention mechanism
CN114936279A (en) * 2022-03-07 2022-08-23 重庆中烟工业有限责任公司 Unstructured chart data analysis method for collaborative manufacturing enterprise
CN114818627A (en) * 2022-05-25 2022-07-29 中国建设银行股份有限公司 Form information extraction method, device, equipment and medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ADITYA ALIF NUGRAHA等: "Generating Image Description on Indonesian Language using Convolutional Neural Network and Gated Recurrent Unit", 《IEEE》 *
万璋等: "融合物体空间关系机制的图像摘要生成方法", 《北京大学学报(自然科学版)》, vol. 57, no. 1 *
何丽: "基于多模态神经网络的图文摘要生成方法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 1 *
荣飞豪: "基于深度学习的图像摘要生成方法的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 5 *

Also Published As

Publication number Publication date
CN115309888B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
CN113313022B (en) Training method of character recognition model and method for recognizing characters in image
JP7346788B2 (en) Speech recognition model training methods, devices, equipment, and storage media
CN112597753A (en) Text error correction processing method and device, electronic equipment and storage medium
CN113792854B (en) Model training and word stock building method, device, equipment and storage medium
CN112528655B (en) Keyword generation method, device, equipment and storage medium
CN108959388B (en) Information generation method and device
CN114820871B (en) Font generation method, model training method, device, equipment and medium
US20220108684A1 (en) Method of recognizing speech offline, electronic device, and storage medium
CN113656613A (en) Method for training image-text retrieval model, multi-mode image retrieval method and device
CN113792855A (en) Model training and word stock establishing method, device, equipment and storage medium
CN113963359B (en) Text recognition model training method, text recognition device and electronic equipment
CN114724168A (en) Training method of deep learning model, text recognition method, text recognition device and text recognition equipment
US20230215203A1 (en) Character recognition model training method and apparatus, character recognition method and apparatus, device and storage medium
CN113239157A (en) Method, device, equipment and storage medium for training conversation model
CN115810068A (en) Image description generation method and device, storage medium and electronic equipment
CN114861637A (en) Method and device for generating spelling error correction model and method and device for spelling error correction
CN114863182A (en) Image classification method, and training method and device of image classification model
CN113360683A (en) Method for training cross-modal retrieval model and cross-modal retrieval method and device
CN113963358B (en) Text recognition model training method, text recognition device and electronic equipment
CN115270719A (en) Text abstract generating method, training method and device based on multi-mode information
CN115309888B (en) Method and device for generating chart abstract and training method and device for generating model
CN115357710A (en) Training method and device for table description text generation model and electronic equipment
CN114254028A (en) Event attribute extraction method and device, electronic equipment and storage medium
CN114841175A (en) Machine translation method, device, equipment and storage medium
CN113553863B (en) Text generation method, device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant