CN112966469A - Method, device and equipment for processing chart in document and storage medium - Google Patents
Method, device and equipment for processing chart in document and storage medium Download PDFInfo
- Publication number
- CN112966469A CN112966469A CN202110251446.1A CN202110251446A CN112966469A CN 112966469 A CN112966469 A CN 112966469A CN 202110251446 A CN202110251446 A CN 202110251446A CN 112966469 A CN112966469 A CN 112966469A
- Authority
- CN
- China
- Prior art keywords
- chart
- document
- description information
- target
- format
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000012545 processing Methods 0.000 title claims abstract description 38
- 238000004458 analytical method Methods 0.000 claims abstract description 73
- 238000009877 rendering Methods 0.000 claims abstract description 61
- 238000004590 computer program Methods 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 42
- 230000008569 process Effects 0.000 description 19
- 230000000694 effects Effects 0.000 description 14
- 238000004891 communication Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 10
- 238000003672 processing method Methods 0.000 description 7
- 230000003993 interaction Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008520 organization Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Document Processing Apparatus (AREA)
Abstract
The application discloses a method, a device, equipment and a storage medium for processing a chart in a document, and relates to the technical field of computers, in particular to an online document and cloud platform technology in the field of data processing. The specific implementation scheme is as follows: the method comprises the steps of receiving a display request of a first document, obtaining description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document, wherein the description information comprises a plurality of target attributes of the first chart and values of the target attributes, and the description information is used for rendering and displaying the first chart. And the description information of the charts in the documents with different formats meets the preset data structure. According to the scheme, the realization complexity of the graph rendering display in the document can be reduced.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to an online document and cloud platform technology in the field of data processing, and in particular, to a method, an apparatus, a device, and a storage medium for processing a graph in a document.
Background
More and more documents support charting functions, such as word documents, excel documents, PowerPoint documents, and the like. The chart is a means for visually and vividly displaying data. The chart is of a wide variety including, but not limited to, bar charts, line charts, pie charts, bar charts, area charts, and the like.
When the document is used, corresponding text editing software is usually required to be installed. For example, when a user uses a word document, word software needs to be installed. In practical applications, some terminal devices may not have the text editing software installed. In this case, the document may be displayed by a document class application in the terminal device for reading or editing by the user. Specifically, for a document in a certain format, a chart parsing engine and a chart rendering engine corresponding to the format are developed. When the terminal equipment needs to display the document in the format, the chart in the document is analyzed by using the chart analysis engine corresponding to the format, and the analysis result is rendered by using the chart rendering engine corresponding to the format, so that the chart is rendered and displayed in the document display interface.
However, when a chart display function of a document supporting multiple formats is required, a chart parsing engine and a chart rendering engine corresponding to each format need to be developed respectively, which results in high implementation complexity.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for processing a chart in a document.
According to a first aspect of the present application, there is provided a method of chart processing in a document, including:
receiving a display request of a first document, wherein the first document comprises a first chart;
acquiring description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document;
the description information of the first chart comprises a plurality of target attributes of the first chart and values of the target attributes, the description information of the first chart is used for rendering and displaying the first chart, and the description information of the charts in the documents with different formats meets the preset data structure.
According to a second aspect of the present application, there is provided a chart processing apparatus in a document, including:
a receiving module, configured to receive a display request of a first document, where the first document includes a first chart;
the processing module is used for acquiring description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document;
the description information of the first chart comprises a plurality of target attributes of the first chart and values of the target attributes, the description information of the first chart is used for rendering and displaying the first chart, and the description information of the charts in the documents with different formats meets the preset data structure.
According to a third aspect of the present application, there is provided 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 the first aspects.
According to a fourth aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any of the first aspects.
According to a fifth aspect of the present application, there is provided a computer program product comprising: a computer program, stored in a readable storage medium, from which at least one processor of an electronic device can read the computer program, execution of the computer program by the at least one processor causing the electronic device to perform the method of the first aspect.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIGS. 1A and 1B are schematic diagrams of a diagram in a word document;
FIG. 2 is a schematic diagram of a process for rendering a display of a graph in a document;
FIG. 3 is a block diagram of a system architecture to which the present invention may be applied;
FIG. 4 is a flowchart illustrating a method for processing a diagram in a document according to an embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating a diagram processing method in another document according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a process of rendering and displaying a chart in a document according to the present embodiment;
fig. 7 is a schematic flowchart of a method for acquiring description information of a chart according to an embodiment of the present application;
FIG. 8 is a diagram illustrating a process of parsing a graph in a word document in a docx format according to an embodiment of the present application;
FIG. 9 is a diagram illustrating a process of parsing a graph in a word document in doc format according to an embodiment of the present application;
FIG. 10A is a schematic structural diagram of a chart processing apparatus in a document according to an embodiment of the present application;
FIG. 10B is a schematic structural diagram of a chart processing apparatus in another document according to an embodiment of the present application;
FIG. 10C is a schematic structural diagram of a chart processing apparatus in another document according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. 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 application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
More and more documents support charting functions, such as word documents, excel documents, PowerPoint documents, and the like. The chart is a means for visually and vividly displaying data. The chart is of a wide variety including, but not limited to, bar charts, line charts, pie charts, bar charts, area charts, and the like. Taking a word document as an example, fig. 1A and 1B are schematic diagrams of diagrams in the word document. FIG. 1A illustrates a bar graph and FIG. 1B illustrates a pie graph.
When the document is used, corresponding text editing software is usually required to be installed. For example, when a user uses a word document, word software needs to be installed. In practical applications, some terminal devices may not have the text editing software installed. For example, because the word software is large and limited by the storage space of the terminal device such as the mobile phone, the word software cannot be installed generally.
In this case, in some possible implementations, the document may be displayed through a document type application on a web side or a mobile side in the terminal device, so as to be read or edited by the user. Specifically, for a document in a certain format, a chart parsing engine and a chart rendering engine corresponding to the format are developed. When the terminal equipment needs to display the document in the format, the chart in the document is analyzed by using the chart analysis engine corresponding to the format, and the analysis result is rendered by using the chart rendering engine corresponding to the format, so that the chart is rendered and displayed in the document display interface.
FIG. 2 is a schematic diagram illustrating a process of rendering and displaying a graph in a document. As shown in fig. 2, when a diagram display function of a document supporting multiple formats is required, a diagram parsing engine and a diagram rendering engine corresponding to each format need to be developed, which results in high implementation complexity. In the related art, some document class applications support only a chart display function in a document in a partial format in order to avoid excessive complexity.
In addition, in the implementation manner, since the charts in the documents in different formats are rendered and displayed by using different chart rendering engines, the chart display effects in the documents in different formats are different.
The application provides a method, a device, equipment and a storage medium for processing a chart in a document, which are applied to the technical field of computers, in particular to an online document and cloud platform technology in the field of data processing.
Fig. 3 is a schematic diagram of a system architecture to which the present invention may be applied. As shown in fig. 3, the system architecture 300 may include: terminal device 301, network 302, and server 303. Network 302 is used to provide a communication link between terminal device 301 and server 303. Network 302 may include various connection types, such as: wired, wireless communication links, etc.
The server 303 may be a server that provides various services, such as: a document parsing server or a storage server. The Server 303 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 conventional physical host and VPS service ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that the number of terminal devices, networks, servers in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired.
In order to solve at least one of the above technical problems, the present application provides a technical solution including: the method comprises the steps of receiving a display request of a first document, obtaining description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document, wherein the description information comprises a plurality of target attributes of the first chart and values of the target attributes, and the description information is used for rendering and displaying the first chart. And the description information of the charts in the documents with different formats meets the preset data structure.
In this way, because the description information of the graphs in the documents with different formats adopts a uniform preset data structure, the graphs in the documents with different formats can be rendered and displayed only by developing one graph rendering engine, and the graph rendering engine does not need to be developed for each format of document, so that the implementation complexity is reduced.
Furthermore, because the description information of the charts in the documents in different formats adopts a uniform preset data structure, and the charts in the documents in different formats are rendered and displayed by the same chart rendering engine, the display effects of the charts in the documents in different formats are consistent, and the difference between the display effects of the charts in the documents in different formats is avoided.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 4 is a flowchart illustrating a method for processing a diagram in a document according to an embodiment of the present application. The method of the present embodiment may be performed by a terminal device. Alternatively, it may be performed by a server. As shown in fig. 4, the method of the present embodiment includes:
s401: a display request is received for a first document, the first document including a first chart.
S402: acquiring description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document; the description information comprises a plurality of target attributes of the first chart and values of the target attributes, and is used for rendering and displaying the first chart; and the description information of the charts in the documents with different formats meets the preset data structure.
The application scenario of this embodiment is that a document application is installed in the terminal device, and includes but is not limited to: the terminal device requests to display the first document through the document application. The first document is a document that supports a chart function, for example, the first document may be a word document, an excel document, a PowerPoint document, or the like.
In this embodiment, the display request of the first document may be a request for displaying all the content of the first document, or a request for displaying a part of the content of the first document. Optionally, the display request may include indication information, where the indication information is used to indicate the content to be displayed of the first document. For example, the display request may include the page number of the target page to be displayed.
The first chart may refer to all charts included in the first document. The first chart may also refer to a certain chart or charts in the first document. For example, when the display request indicates to display a part of the content of the first document, the first chart may refer to a chart in the content to be displayed.
The description information of the first chart refers to information for describing the first chart, such as: information for describing the presentation elements and the layout positions in the first chart, information for describing the color of the first chart, information for describing the style of the first chart, and the like. The description information of the first chart includes a plurality of target attributes of the first chart and values of the target attributes. The description information of the first chart can be used for rendering and displaying the first chart.
The documents in the embodiment may include multiple formats, and the storage modes of the documents in different formats are different, so that the chart parsing modes corresponding to the documents in different formats are also different. For example, taking a word document as an example, the word document includes a doc format and a docx format. The doc format adopts a binary data format, so that for the diagram in the doc-formatted document, a diagram analysis mode corresponding to the binary data format needs to be adopted to analyze the diagram. The docx format is an Open Extensible Markup Language (OOXML) File format, and thus, for a graph in a docx-format document, a graph analysis mode corresponding to the OOXML is required to be adopted to analyze the graph.
In this embodiment, for diagrams in documents of different formats, the diagram is analyzed in a diagram analysis manner corresponding to the document format, and description information of the diagram satisfying a preset data structure is obtained. The description information of the charts in the documents with different formats meets the preset data structure. That is, the description information of the charts in the documents of different formats employs a uniform preset data structure.
The preset data structure indicates a plurality of target attributes included in the description information and an organization relationship between the target attributes. It should be noted that the present embodiment does not limit the form of the preset data structure.
It should be noted that, in this embodiment, a manner of obtaining the description information of the first chart is not limited, and several possible implementation manners may be referred to in the detailed description of the subsequent embodiments.
It should be understood that since the description information of the graphs in the documents in different formats adopts a uniform preset data structure, the graphs in the documents in different formats can be rendered and displayed only by developing one graph rendering engine for rendering the description information of the preset data structure, and the graph rendering engine does not need to be separately developed for the documents in each format, thereby reducing the implementation complexity. Furthermore, because the description information of the charts in the documents in different formats adopts a uniform preset data structure, and the charts in the documents in different formats are rendered and displayed by the same chart rendering engine, the display effects of the charts in the documents in different formats are consistent, and the difference between the display effects of the charts in the documents in different formats is avoided.
The method of the present embodiment may be performed by a terminal device. For example, when the terminal device detects that the user requests opening of the first document, the terminal device receives a display request of the first document. For another example, in a case where the terminal device has displayed the first document, when the terminal device detects a browsing operation of the first document by the user (for example, the user slides the screen to turn a page, or the user inputs a target page number to be browsed, or the like), the terminal device receives a display request of the first document.
After the terminal equipment receives the display request of the first document, the terminal equipment acquires the description information of the first chart meeting the preset data structure by adopting a chart analysis mode corresponding to the format of the first document. Furthermore, the terminal device may render and display the first chart in the display interface corresponding to the first document according to the description information of the first chart.
The method of the present embodiment may also be performed by a server. For example, when the terminal device detects that the user requests to open the first document, the terminal device sends a display request of the first document to the server, and accordingly, the server receives the display request of the first document. For another example, in a case where the terminal device has displayed the first document, when the terminal device detects a browsing operation of the first document by the user (for example, the user slides the screen to turn a page, or the user inputs a target page number to be browsed, or the like), the terminal device sends a display request of the first document to the server according to the browsing operation, and accordingly, the server receives the display request of the first document.
After the server receives the display request of the first document, the server acquires the description information of the first chart meeting the preset data structure by adopting a chart analysis mode corresponding to the format of the first document. Furthermore, the server may send the description information of the first chart to the terminal device, so that the terminal device may render and display the first chart in the display interface corresponding to the first document according to the description information of the first chart.
The chart processing method in the document provided by the embodiment comprises the following steps: the method comprises the steps of receiving a display request of a first document, wherein the first document comprises a first chart, acquiring description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document, wherein the description information is used for rendering and displaying the first chart, and the description information of the charts in the documents with different formats meets the preset data structure. Through the process, since the description information of the graphs in the documents with different formats adopts the uniform preset data structure, the graphs in the documents with different formats can be rendered and displayed only by developing one graph rendering engine for rendering the description information of the preset data structure, and the graph rendering engine does not need to be developed for each format of document, so that the implementation complexity is reduced. Furthermore, because the description information of the charts in the documents in different formats adopts a uniform preset data structure, and the charts in the documents in different formats are rendered and displayed by the same chart rendering engine, the display effects of the charts in the documents in different formats are consistent, and the difference between the display effects of the charts in the documents in different formats is avoided.
Fig. 5 is a flowchart illustrating a diagram processing method in another document according to an embodiment of the present application. The method of the embodiment can be realized by the interaction of the terminal equipment and the server. As shown in fig. 5, the method of the present embodiment includes:
s501: when detecting the preset operation input by the user aiming at the first document, the terminal equipment sends a display request of the first document to the server, wherein the first document comprises a first chart.
Accordingly, the server receives a display request of the first document from the terminal device.
In one example, when the terminal device detects that a user requests to open a first document, a display request of the first document is sent to the server. The display request is for indicating that the first document is displayed.
In another example, in a case where the terminal device has displayed the first document, when the terminal device detects a browsing operation (for example, an operation of sliding a screen with a finger of a user, or the like) input to the first document by the user, a display request of the first document is transmitted to the server.
In a possible implementation manner, the terminal device may determine the content to be displayed of the first document according to a preset operation. Illustratively, for the first example, when the terminal device detects that the user requests to open the first document, it may be determined that the content to be displayed is the entire content of the first document or the first pages of the first document. For a second example, the terminal device may determine the content to be displayed according to a browsing operation of the user. For example, when the user slides to page 10 of the first document, the content of page 10 to be displayed is determined.
Optionally, the terminal device may further generate indication information according to the content to be displayed of the first document, that is, the indication information is used to indicate the content to be displayed of the first document. The terminal device may carry the indication information in the display request. In this way, the server can determine which content in the first document needs to be parsed according to the indication information.
Optionally, after receiving the display request of the first document, the server may further determine whether the content to be displayed of the first document includes the first chart. When it is determined that the first chart is included in the content to be displayed of the first document, subsequent S502 to S504 are continuously performed. When it is determined that the content to be displayed of the first document does not include the first chart, the content to be displayed of the first document may be parsed by using the prior art.
It should be noted that the first document in this embodiment may be a document located in a server, or may be a document located locally in a terminal device. When the first document is located in the local terminal device, the terminal device can also carry the first document in the display request and send the first document to the server when sending the display request to the server.
S502: the server acquires description information of the first chart meeting a preset data format by adopting a chart analysis mode corresponding to the format of the first document.
It should be noted that, in this embodiment, a manner of obtaining the description information of the first chart is not limited, and several possible implementation manners may be referred to in the detailed description of the subsequent embodiments.
S503: and the server sends the description information of the first chart to the terminal equipment.
Accordingly, the terminal device receives the description information of the first chart from the server.
S504: and the terminal equipment renders and displays the first chart in a display interface corresponding to the first document according to the description information of the first chart.
Specifically, the terminal device performs layout and rendering on the first chart according to the values of the target attributes included in the description information of the first chart, so that the first chart is displayed in the display interface corresponding to the first document.
In a possible implementation manner, the description information of the first chart is used for indicating the display content of the first chart and the position relationship between the first chart and other elements in the first document. Wherein, the display content of the first chart includes but is not limited to: the display elements and the typesetting position information in the first chart, the style information of the first chart, the color information of the first chart and the like.
The terminal device may determine the typesetting position of the first diagram in the first document according to the position relationship between the first diagram and other elements in the first document. And then, rendering and displaying the first chart in a display interface corresponding to the first document according to the display content and the typesetting position of the first chart.
FIG. 6 is a schematic diagram of a process of rendering and displaying a chart in a document according to this embodiment. As shown in FIG. 6, each format of document corresponds to a schema parsing engine. And aiming at the document of each format, generating description information of the chart meeting a preset data structure by adopting a chart analysis engine corresponding to the format. Furthermore, the chart in the documents with different formats can be rendered and displayed by adopting the unified chart rendering engine.
As can be seen from fig. 6, in the embodiment, only one graph rendering engine needs to be developed, so that the graphs in the documents of different formats can be rendered and displayed, and the graph rendering engine does not need to be separately developed for the documents of each format, thereby reducing the implementation complexity. Furthermore, because the description information of the charts in the documents in different formats adopts a uniform preset data structure, and the charts in the documents in different formats are rendered and displayed by the same chart rendering engine, the display effects of the charts in the documents in different formats are consistent, and the difference between the display effects of the charts in the documents in different formats is avoided.
On the basis of any of the above embodiments, how to obtain the description information of the first chart satisfying the preset data structure is described below with reference to a specific embodiment. The method of this embodiment may be used as a possible implementation manner of S402 or S502 in the above embodiment.
Fig. 7 is a flowchart illustrating a method for acquiring description information of a chart according to an embodiment of the present application. As shown in fig. 7, the method of this embodiment includes:
s701: and analyzing the first chart in the first document by adopting a chart analysis mode corresponding to the format of the first document to obtain an analysis result.
In this embodiment, since the graph storage modes and the graph support capabilities corresponding to the documents in different formats may be different, after the graphs in the documents in different formats are analyzed, the data structures of the analysis results obtained are also different. Taking a word document as an example, analyzing a chart in the word document in the doc format to obtain a first analysis result, and analyzing a chart in the word document in the docx format to obtain a second analysis result. The first analysis result and the second analysis result have different data structures and different chart attributes. For example, the first parsing result may not include attribute information such as line width and color, and the second parsing result includes attribute information such as line width and color.
S702: and determining the value of the target attribute according to the analysis result aiming at any target attribute in a plurality of target attributes specified by a preset data structure.
S703: organizing the plurality of target attributes and the values of the target attributes according to the preset data structure, and generating description information of the first chart.
In a specific application, a plurality of target attributes used for rendering the chart can be determined in advance according to the rendering requirements of the chart, and the plurality of target attributes and the organization relationship among the values of the target attributes are defined according to the rendering logic of the chart, so that the data structure is preset in a form. That is, the preset data structure specifies a plurality of target attributes, and specifies an organizational relationship between the plurality of target attributes and values thereof.
Optionally, the preset data structure may be in a JSON Object Notation (JavaScript Object Notation) format. JSON is a lightweight data exchange format that stores and represents data in a text format that is completely independent of the programming language. By adopting the description information in the JSON format, the convenience of chart rendering can be improved, and the chart rendering cost is simplified. In addition, the JSON format description information is adopted, so that the target attribute can be conveniently expanded subsequently, and the rendering effect of the chart is continuously improved.
In this way, after the analysis result of the first graph is obtained, for any target attribute of the plurality of target attributes specified in the preset data structure, the value of the target attribute may be determined according to the analysis result. Further, after obtaining values of a plurality of target attributes, the plurality of target attributes and the values of each target attribute may be organized according to a preset data structure, so as to generate the description information of the first chart. The descriptive information of the first chart thus generated satisfies the preset data structure.
Taking a word document as an example, the word document includes two formats, which are doc format and docx format respectively. The word document in doc format adopts binary data format, and the suffix of the document name is doc. doc format is the default save format for word95, word97, and word 2003. The word document in the docx format adopts an OOXML data format, and the suffix of the document name is Docx. The docx format is a new data format published with word 2007, and is also the default save format after word 2007.
doc format and docx are two completely different format standards, from the definition of elements in a document to the organization of data. Therefore, for the word documents in the two formats, the parsing process of the graph, the data structure of the parsing result, and the process of determining the value of the target attribute according to the parsing result are different. The following describes the generation process of the description information of the chart in the word document in the above two formats, with reference to two specific examples.
Example one, the generation process of the description information of the diagram in the word document in the docx format. Fig. 8 is a schematic diagram of a graph parsing process in a word document in a docx format according to an embodiment of the present application. Described below in conjunction with fig. 8.
The graph in the word document in the docx format is stored in a compressed file form, as shown in fig. 8, the graph may be parsed in the following feasible manner: decompressing the word document in the docx format to obtain a plurality of decompressed files, and acquiring a target file corresponding to the graph from the plurality of decompressed files.
The target files corresponding to the chart usually include 4 types of target files for recording original attribute information of the chart.
(1) And the chart1.xml file is used for storing information such as data, typesetting positions and the like in the chart and the sub-object.
(2) color 1.xml file for storing color information of charts and sub-objects.
(3) style1.xml file for storing the style information of the chart and the sub-object.
(4) Microsoft Excel xlsx file for storing raw data in a storage chart.
Further, with continued reference to fig. 8, the target file is analyzed to obtain an analysis result. The analysis result comprises the following steps: a plurality of original attributes of a chart and a value of each of the original attributes.
Further, with continued reference to fig. 8, the values of the target attributes of the chart may be obtained by performing analysis conversion processing on the original attributes and the values thereof of the chart. And organizing a plurality of target attributes and values thereof in a JSON file according to a pre-defined JSON file format, wherein the JSON file can be used as description information of the chart.
In some possible implementations, for any target attribute in the plurality of target attributes specified by the preset data structure, the value of the target attribute may be determined as follows:
and if a first original attribute matched with the target attribute exists in the plurality of original attributes, taking the value of the first original attribute as the value of the target attribute. That is, the value of the target attribute may be extracted from the original attribute.
And if the original attributes matched with the target attributes do not exist in the plurality of original attributes, taking a preset default value as the value of the target attributes.
And if a plurality of second original attributes related to the target attribute exist in the plurality of original attributes, taking the calculation result of the values of the plurality of second original attributes as the value of the target attribute.
As can be seen from the above process, the target attribute in this embodiment may be extracted from the original attribute, may be supplemented on the basis of the original attribute, and may also be obtained by calculating the original attribute, so that, in practical application, the target attribute may be flexibly designed according to the rendering requirement, so as to improve the rendering efficiency.
Example two, the generation process of the description information of the diagram in the doc-formatted word document. Fig. 9 is a schematic diagram of a graph parsing process in a word document in doc format according to an embodiment of the present application. Described below in conjunction with fig. 9.
Some word documents in doc format are in binary data format, where the graphs are stored in bitmap form. As shown in fig. 9, the graph may be parsed in the following feasible manner: analyzing a binary code stream corresponding to the chart from a data stream corresponding to the word document in the doc format; and analyzing the binary code stream according to a storage data structure adopted by the chart to obtain an analysis result, wherein the analysis result comprises a bitmap corresponding to the chart.
Further, with continued reference to fig. 9, by performing analysis conversion processing on the analysis result, a value of the target attribute of the graph can be obtained. And organizing a plurality of target attributes and values thereof in a JSON file according to a pre-defined JSON file format, wherein the JSON file can be used as description information of the chart.
In the data stream of the word document in doc format, data is stored in the form of records (Record). The recording includes a fixed-length recording head (recorddheader) and an indefinite-length Data (Data). The recording head stores the type of the recording data and the length of the recording data.
Specifically, in the data stream corresponding to the first document, the OfficeArtDggContainer record is found. The officeArtDggContainer record indicates a container for all Drawing element Binary File Format (officeDrawing Binary File Format) records in the first document. Drawing elements include, for example, pictures, shapes, artistic words, etc., which may be contained in charts, relational diagrams, tables, controls.
The chart is stored in a binary large image or picture storage structure (BLIP) format. The BLIP corresponds to the OfficeArtBStoreContainer record in the top level drawing set. The recording header of each record in the OfficeArtDggContainer is checked until the officeartbisttorecontainer record is found or the end of OfficeArtDggContainer is reached. If the recording head of a certain record is 0xF001, the record is an officearbethasecontainer record. If no OfficeArtStoreContainer record is found, it indicates that there is no chart in the document.
OfficeArtStoreContainer stores the chart bitmap in an OfficeArtStoreContainerFileBlock record array. For each officeArtBSeContainenerFileBlock record in the array, the following operations are performed to obtain the chart bitmap in each record:
(a) the recording type is acquired from the recording head.
(b) If the record type is 0xF018-0xF117, it is indicated that the record is an OfficeArtBlip record, which stores a chart bitmap (i.e., BLIP data). And then continuing to perform step (c).
If the record type is 0xF007, the record is declared to be an OfficeArtFBSE record, and the OfficeArtFBSE record is packaged with an OfficeArtBlip record. Thus, the OfficeArtBlip record may be parsed from the officearotfbse record before step (c) is performed.
Wherein, the officeArtBlip record can be parsed from the officeArtFBSE record by adopting the following mode: the first 20 bytes are skipped and the next 4 bytes are read, the 4 bytes representing the size of the chart bitmap. The next 12 bytes are skipped. The name field, which is a variable-length Unicode string ending in a null, is read to specify the name of the chart bitmap. The next field is embeddedBlip, which is an OfficeArtBlip record.
(c) The recording head of the OfficeArtBlip recording is read. The type of the chart bitmap and the length of the recording data are acquired from the recording head.
(d) And reading the data part in the officeArtBlip record into a memory according to the length of the record data, and storing according to the type of the obtained chart bitmap to obtain a bitmap corresponding to the chart.
Through the above process, the analysis result of the first chart analyzed from the first document includes the bitmap corresponding to the first chart.
Further, the value of the target attribute of the first chart can be determined according to the bitmap corresponding to the first chart. Specifically, for any target attribute in the plurality of target attributes specified by the preset data structure, the value of the target attribute may be determined as follows: and determining a bitmap corresponding to the first chart as the value of the target attribute. Or analyzing the bitmap corresponding to the first chart, and determining the value of the target attribute according to the analysis result.
As can be seen from the above process, in this embodiment, the bitmap can be directly stored in the description information as a value of a certain target attribute, and the bitmap can be analyzed, and the value of the target attribute can be determined based on the result of the bitmap analysis. Therefore, in practical application, chart rendering can be preferentially carried out according to the value of the target attribute determined based on the bitmap analysis result, and the consistency of chart display effects in documents of different formats can be ensured. If the target attribute determined according to the bitmap analysis result is less, the bitmap can be directly used for chart rendering during rendering, and therefore the rendering success rate is guaranteed.
It can be seen from the above two examples that although the storage manners of the word documents in doc format and doc format are different, and the graph parsing manners are also different, with the scheme of this embodiment, the description information including the same target attribute may be extracted from the graph parsing results of the documents in the two formats, and the data formats adopted by the description information are also the same. Therefore, when the chart is rendered and displayed according to the description information, the same chart rendering engine can be adopted for rendering and displaying the chart aiming at the documents with different formats, and therefore the implementation complexity is reduced. Furthermore, because the description information of the charts in the documents in different formats adopts a uniform preset data structure, and the charts in the documents in different formats are rendered and displayed by the same chart rendering engine, the display effects of the charts in the documents in different formats are consistent, and the difference between the display effects of the charts in the documents in different formats is avoided.
Fig. 10A is a schematic structural diagram of a chart processing apparatus in a document according to an embodiment of the present application. The apparatus of the present embodiment may be in the form of software and/or hardware. The apparatus may be a terminal device or integrated in a terminal device. The device may also be a server or integrated into a server. As illustrated in fig. 10A, the present embodiment provides a chart processing apparatus 1000 in a document, including: a receiving module 1001 and a processing module 1002.
The receiving module 1001 is configured to receive a display request of a first document, where the first document includes a first chart;
the processing module 1002 is configured to acquire description information of the first chart that meets a preset data structure in a chart parsing manner corresponding to the format of the first document;
the description information of the first chart comprises a plurality of target attributes of the first chart and values of the target attributes, the description information of the first chart is used for rendering and displaying the first chart, and the description information of the charts in the documents with different formats meets the preset data structure.
Fig. 10B is a schematic structural diagram of a chart processing apparatus in another document according to an embodiment of the present application. Fig. 10C is a schematic structural diagram of a chart processing apparatus in another document according to an embodiment of the present application. The apparatus shown in fig. 10B may be used as a terminal device or integrated in a terminal device. The apparatus shown in fig. 10C may be implemented as a server or integrated in a server.
On the basis of the embodiment shown in fig. 10A, as shown in fig. 10B and 10C, the processing module 1002 may include: analysis unit 10021, determination unit 10022, and generation unit 10023.
The parsing unit 10021 is configured to parse the first graph in a graph parsing manner corresponding to the format of the first document to obtain a parsing result;
a determining unit 10022, configured to determine, according to the parsing result, a value of the target attribute for any target attribute of the plurality of target attributes specified by the preset data structure;
the generating unit 10023 is configured to organize the multiple target attributes and the values of the target attributes according to the preset data structure, and generate the description information of the first chart.
In one possible implementation, the format of the first document indicates that the first chart is stored in a bitmap form; the parsing unit 10021 is specifically configured to:
analyzing the data stream corresponding to the first document to obtain a binary code stream corresponding to the first chart;
and analyzing the binary code stream according to a storage data structure adopted by the first chart to obtain an analysis result, wherein the analysis result comprises a bitmap corresponding to the first chart.
In a possible implementation manner, the determining unit 10022 is specifically configured to:
determining a bitmap corresponding to the first chart as a value of the target attribute; or,
analyzing the bitmap corresponding to the first chart, and determining the value of the target attribute according to the analysis result.
In one possible implementation, the format of the first document indicates that the first chart is stored in a compressed file; the parsing unit 10021 is specifically configured to:
decompressing the first document to obtain a plurality of decompressed files;
acquiring a target file corresponding to the first chart from the plurality of decompressed files;
analyzing the target file to obtain an analysis result, wherein the analysis result comprises: a plurality of original attributes of the first chart and a value of each of the original attributes.
In a possible implementation manner, the determining unit 10022 is specifically configured to:
if a first original attribute matched with the target attribute exists in the plurality of original attributes, taking the value of the first original attribute as the value of the target attribute; or,
if the original attribute matched with the target attribute does not exist in the plurality of original attributes, taking a preset default value as the value of the target attribute; or,
and if a plurality of second original attributes related to the target attribute exist in the plurality of original attributes, taking the calculation result of the values of the plurality of second original attributes as the value of the target attribute.
In a possible implementation manner, the display request includes indication information, where the indication information is used to indicate content to be displayed of the first document; the processing module 1002 is further configured to: determining that the first chart is included in the content to be displayed of the first document.
In a possible implementation manner, as shown in fig. 10B, the apparatus of this embodiment may further include: the display module 1003 is configured to render and display the first chart in a display interface corresponding to the first document according to the description information of the first chart.
In a possible implementation manner, the description information of the first chart is used for indicating the display content of the first chart and the position relationship between the first chart and other elements in the first document; the display module 1003 is specifically configured to:
determining the typesetting position of the first chart in the first document according to the position relation;
and rendering and displaying the first chart in a display interface corresponding to the first document according to the display content and the typesetting position.
In a possible implementation manner, as shown in fig. 10C, the apparatus of this embodiment may further include: a sending module 1004, configured to send description information of the first chart to a terminal device.
The apparatus of this embodiment may be used to implement the technical solutions in the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
There is also provided, in accordance with an embodiment of the present application, a computer program product, including: a computer program, stored in a readable storage medium, from which at least one processor of the electronic device can read the computer program, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any of the embodiments described above.
FIG. 11 shows a schematic block diagram of an example electronic device 1100 that may be used to implement embodiments of the present application. 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 present application that are described and/or claimed herein.
As shown in fig. 11, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)1102 or a computer program loaded from a storage unit 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for the operation of the device 1100 may also be stored. The calculation unit 1101, the ROM 1102, and the RAM 1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
A number of components in device 1100 connect to I/O interface 1105, including: an input unit 1106 such as a keyboard, a mouse, and the like; an output unit 1107 such as various types of displays, speakers, and the like; a storage unit 1108 such as a magnetic disk, optical disk, or the like; and a communication unit 1109 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 1109 allows the device 1100 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 1101 can be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1101 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 1101 performs the respective methods and processes described above, such as a graph processing method in a document. For example, in some embodiments, the graph processing methods in the document may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1100 via ROM 1102 and/or communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the graph processing method in the document described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the graph processing method in the document by any other suitable means (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), load 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 application 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 application, 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 portable 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 can 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 can be a cloud Server, 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 expansibility in the traditional physical host and VPS service ("Virtual Private Server", 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 application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. 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 application shall be included in the protection scope of the present application.
Claims (23)
1. A method of graph processing in a document, comprising:
receiving a display request of a first document, wherein the first document comprises a first chart;
acquiring description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document;
the description information of the first chart comprises a plurality of target attributes of the first chart and values of the target attributes, the description information of the first chart is used for rendering and displaying the first chart, and the description information of the charts in the documents with different formats meets the preset data structure.
2. The method according to claim 1, wherein obtaining description information of the first chart that satisfies a preset data structure in a chart parsing manner corresponding to a format of the first document includes:
analyzing the first chart by adopting a chart analysis mode corresponding to the format of the first document to obtain an analysis result;
determining the value of the target attribute according to the analysis result aiming at any target attribute in the plurality of target attributes specified by the preset data structure;
organizing the plurality of target attributes and the values of the target attributes according to the preset data structure, and generating description information of the first chart.
3. The method of claim 2, wherein the format of the first document indicates that the first chart is stored in bitmap form; analyzing the first chart by adopting a chart analysis mode corresponding to the format of the first document to obtain an analysis result, wherein the chart analysis mode comprises the following steps:
analyzing the data stream corresponding to the first document to obtain a binary code stream corresponding to the first chart;
and analyzing the binary code stream according to a storage data structure adopted by the first chart to obtain an analysis result, wherein the analysis result comprises a bitmap corresponding to the first chart.
4. The method of claim 3, wherein determining the value of the target attribute from the parsed result comprises:
determining a bitmap corresponding to the first chart as a value of the target attribute; or,
analyzing the bitmap corresponding to the first chart, and determining the value of the target attribute according to the analysis result.
5. The method of claim 2, wherein the format of the first document indicates that the first chart is stored in a compressed file; analyzing the first chart by adopting a chart analysis mode corresponding to the format of the first document to obtain an analysis result, wherein the chart analysis mode comprises the following steps:
decompressing the first document to obtain a plurality of decompressed files;
acquiring a target file corresponding to the first chart from the plurality of decompressed files;
analyzing the target file to obtain an analysis result, wherein the analysis result comprises: a plurality of original attributes of the first chart and a value of each of the original attributes.
6. The method of claim 5, wherein determining the value of the target attribute from the parsed result comprises:
if a first original attribute matched with the target attribute exists in the plurality of original attributes, taking the value of the first original attribute as the value of the target attribute; or,
if the original attribute matched with the target attribute does not exist in the plurality of original attributes, taking a preset default value as the value of the target attribute; or,
and if a plurality of second original attributes related to the target attribute exist in the plurality of original attributes, taking the calculation result of the values of the plurality of second original attributes as the value of the target attribute.
7. The method according to any one of claims 1 to 6, wherein the display request includes indication information indicating content to be displayed of the first document;
before obtaining the description information of the first chart which meets a preset data structure by adopting a chart analysis mode corresponding to the format of the first document, the method further comprises the following steps:
determining that the first chart is included in the content to be displayed of the first document.
8. The method according to any one of claims 1 to 6, after obtaining the description information of the first chart that satisfies a preset data structure in a chart parsing manner corresponding to the format of the first document, further comprising:
and rendering and displaying the first chart in a display interface corresponding to the first document according to the description information of the first chart.
9. The method according to claim 8, wherein the description information of the first chart is used for indicating the presentation content of the first chart and the position relationship between the first chart and other elements in the first document;
according to the description information of the first chart, rendering and displaying the first chart in a display interface corresponding to the first document, wherein the rendering and displaying of the first chart comprises the following steps:
determining the typesetting position of the first chart in the first document according to the position relation;
and rendering and displaying the first chart in a display interface corresponding to the first document according to the display content and the typesetting position.
10. The method according to any one of claims 1 to 6, after obtaining the description information of the first chart that satisfies a preset data structure in a chart parsing manner corresponding to the format of the first document, further comprising:
and sending the description information of the first chart to the terminal equipment.
11. A chart processing apparatus in a document, comprising:
a receiving module, configured to receive a display request of a first document, where the first document includes a first chart;
the processing module is used for acquiring description information of the first chart meeting a preset data structure by adopting a chart analysis mode corresponding to the format of the first document;
the description information of the first chart comprises a plurality of target attributes of the first chart and values of the target attributes, the description information of the first chart is used for rendering and displaying the first chart, and the description information of the charts in the documents with different formats meets the preset data structure.
12. The apparatus of claim 11, wherein the processing module comprises:
the analysis unit is used for analyzing the first chart by adopting a chart analysis mode corresponding to the format of the first document to obtain an analysis result;
a determining unit, configured to determine, according to the analysis result, a value of the target attribute for any target attribute of the plurality of target attributes specified by the preset data structure;
and the generating unit is used for organizing the plurality of target attributes and the values of the target attributes according to the preset data structure and generating the description information of the first chart.
13. The apparatus of claim 12, wherein the format of the first document indicates that the first chart is stored in bitmap form; the analysis unit is specifically configured to:
analyzing the data stream corresponding to the first document to obtain a binary code stream corresponding to the first chart;
and analyzing the binary code stream according to a storage data structure adopted by the first chart to obtain an analysis result, wherein the analysis result comprises a bitmap corresponding to the first chart.
14. The apparatus according to claim 13, wherein the determining unit is specifically configured to:
determining a bitmap corresponding to the first chart as a value of the target attribute; or,
analyzing the bitmap corresponding to the first chart, and determining the value of the target attribute according to the analysis result.
15. The apparatus of claim 12, wherein the format of the first document indicates that the first chart is stored in a compressed file; the analysis unit is specifically configured to:
decompressing the first document to obtain a plurality of decompressed files;
acquiring a target file corresponding to the first chart from the plurality of decompressed files;
analyzing the target file to obtain an analysis result, wherein the analysis result comprises: a plurality of original attributes of the first chart and a value of each of the original attributes.
16. The apparatus according to claim 15, wherein the determining unit is specifically configured to:
if a first original attribute matched with the target attribute exists in the plurality of original attributes, taking the value of the first original attribute as the value of the target attribute; or,
if the original attribute matched with the target attribute does not exist in the plurality of original attributes, taking a preset default value as the value of the target attribute; or,
and if a plurality of second original attributes related to the target attribute exist in the plurality of original attributes, taking the calculation result of the values of the plurality of second original attributes as the value of the target attribute.
17. The apparatus according to any one of claims 11 to 16, wherein the display request includes indication information indicating content to be displayed of the first document; the processing module is further configured to:
determining that the first chart is included in the content to be displayed of the first document.
18. The apparatus of any of claims 11 to 16, further comprising:
and the display module is used for rendering and displaying the first chart in a display interface corresponding to the first document according to the description information of the first chart.
19. The apparatus according to claim 18, wherein the description information of the first chart is used for indicating the presentation content of the first chart and the position relationship between the first chart and other elements in the first document; the display module is specifically configured to:
determining the typesetting position of the first chart in the first document according to the position relation;
and rendering and displaying the first chart in a display interface corresponding to the first document according to the display content and the typesetting position.
20. The apparatus of any of claims 11 to 16, further comprising:
and the sending module is used for sending the description information of the first chart to the terminal equipment.
21. 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 10.
22. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1 to 10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110251446.1A CN112966469B (en) | 2021-03-08 | 2021-03-08 | Method, device, equipment and storage medium for processing charts in document |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110251446.1A CN112966469B (en) | 2021-03-08 | 2021-03-08 | Method, device, equipment and storage medium for processing charts in document |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112966469A true CN112966469A (en) | 2021-06-15 |
CN112966469B CN112966469B (en) | 2023-08-01 |
Family
ID=76277437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110251446.1A Active CN112966469B (en) | 2021-03-08 | 2021-03-08 | Method, device, equipment and storage medium for processing charts in document |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112966469B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113362428A (en) * | 2021-06-30 | 2021-09-07 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium and product for configuring color |
CN113641885A (en) * | 2021-07-08 | 2021-11-12 | 北京百度网讯科技有限公司 | Document detection method, device, equipment and storage medium |
CN113688616A (en) * | 2021-10-27 | 2021-11-23 | 深圳市明源云科技有限公司 | Method, device and equipment for detecting chart report difference and storage medium |
CN114372445A (en) * | 2022-03-21 | 2022-04-19 | 奇安信科技集团股份有限公司 | Document generation method and device, electronic equipment and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060136819A1 (en) * | 2004-12-20 | 2006-06-22 | Microsoft Corporation | Method, system, ane computer-readable medium for applying a global formatting scheme to a chart in an electronic document |
US20180189988A1 (en) * | 2016-12-30 | 2018-07-05 | Microsoft Technology Licensing, Llc | Chart-type agnostic scene graph for defining a chart |
CN112115693A (en) * | 2020-09-25 | 2020-12-22 | 平安国际智慧城市科技股份有限公司 | Method and device for exporting Word document with dynamic rendering chart and computer equipment |
-
2021
- 2021-03-08 CN CN202110251446.1A patent/CN112966469B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060136819A1 (en) * | 2004-12-20 | 2006-06-22 | Microsoft Corporation | Method, system, ane computer-readable medium for applying a global formatting scheme to a chart in an electronic document |
US20180189988A1 (en) * | 2016-12-30 | 2018-07-05 | Microsoft Technology Licensing, Llc | Chart-type agnostic scene graph for defining a chart |
CN112115693A (en) * | 2020-09-25 | 2020-12-22 | 平安国际智慧城市科技股份有限公司 | Method and device for exporting Word document with dynamic rendering chart and computer equipment |
Non-Patent Citations (1)
Title |
---|
陈伟平;金炳尧;: "EXCEL文档中图表类对象的分析与自动阅卷的实现", 中小学电教, no. 10 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113362428A (en) * | 2021-06-30 | 2021-09-07 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium and product for configuring color |
CN113362428B (en) * | 2021-06-30 | 2023-09-15 | 北京百度网讯科技有限公司 | Methods, apparatus, equipment, media and products for dispensing color |
US12327301B2 (en) | 2021-06-30 | 2025-06-10 | Beijing Baidu Netcom Science Technology Co., Ltd. | Method and apparatus for configuring color, device, medium and product |
CN113641885A (en) * | 2021-07-08 | 2021-11-12 | 北京百度网讯科技有限公司 | Document detection method, device, equipment and storage medium |
CN113688616A (en) * | 2021-10-27 | 2021-11-23 | 深圳市明源云科技有限公司 | Method, device and equipment for detecting chart report difference and storage medium |
CN114372445A (en) * | 2022-03-21 | 2022-04-19 | 奇安信科技集团股份有限公司 | Document generation method and device, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN112966469B (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112966469B (en) | Method, device, equipment and storage medium for processing charts in document | |
CN112507666B (en) | Document conversion method, device, electronic equipment and storage medium | |
CN113360490B (en) | Data processing method, device, apparatus, medium and program product | |
JP2023036681A (en) | Task processing method, processing device, electronic equipment, storage medium, and computer program | |
CN113642295B (en) | Page typesetting method, device and computer program product | |
CN113836462B (en) | Method, device, equipment and storage medium for generating page description file | |
CN113382083A (en) | Webpage screenshot method and device | |
CN111651552A (en) | Structured information determination method and device and electronic equipment | |
CN107609175A (en) | Dom tree generation method and relevant device | |
CN117407468A (en) | Method and device for displaying generated content, electronic equipment and storage medium | |
CN112818656B (en) | Data difference comparison method, device, equipment, medium and computer program product | |
KR20200103133A (en) | Method and apparatus for performing extract-transfrom-load procedures in a hadoop-based big data processing system | |
CN117828102A (en) | Ship domain knowledge graph construction method, equipment and medium based on large model | |
JP7309811B2 (en) | Data annotation method, apparatus, electronics and storage medium | |
CN112528593B (en) | Document processing method, device, electronic equipment and storage medium | |
CN114492331A (en) | Rich text editing method and device, electronic equipment, storage medium and product | |
CN113378524A (en) | Method, device, equipment and storage medium for updating storage information of document | |
WO2018208412A1 (en) | Detection of caption elements in documents | |
CN118013944A (en) | Method, device, electronic equipment and storage medium for generating demonstration document | |
CN118170378A (en) | Page generation method, device, electronic device, storage medium and program product | |
CN113361249B (en) | Document weight judging method, device, electronic equipment and storage medium | |
CN119493564A (en) | A method, device, equipment and medium for generating a page | |
CN116594709A (en) | Method, apparatus and computer program product for acquiring data | |
CN113051504B (en) | Document preview method, device, apparatus, storage medium and program product | |
CN116225902A (en) | Method, device and equipment for generating test cases |
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 |