CN111126006A - Method and device for exporting Word document with MathType formula, electronic equipment and storage medium - Google Patents

Method and device for exporting Word document with MathType formula, electronic equipment and storage medium Download PDF

Info

Publication number
CN111126006A
CN111126006A CN201911360647.4A CN201911360647A CN111126006A CN 111126006 A CN111126006 A CN 111126006A CN 201911360647 A CN201911360647 A CN 201911360647A CN 111126006 A CN111126006 A CN 111126006A
Authority
CN
China
Prior art keywords
formula
mathtype
latex
word document
export
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911360647.4A
Other languages
Chinese (zh)
Inventor
高超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaochuanchuhai Education Technology Beijing Co ltd
Original Assignee
Xiaochuanchuhai Education Technology Beijing 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 Xiaochuanchuhai Education Technology Beijing Co ltd filed Critical Xiaochuanchuhai Education Technology Beijing Co ltd
Priority to CN201911360647.4A priority Critical patent/CN111126006A/en
Publication of CN111126006A publication Critical patent/CN111126006A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion

Abstract

The embodiment of the invention discloses a method and a device for exporting a Word document with a MathType formula, electronic equipment and a storage medium, and relates to the technical field of document processing. The method comprises the following steps: receiving an export request for exporting data contents into a Word document; analyzing the data content to obtain analyzed content; judging whether a formula exists in the analysis content, if so, generating a Word basic document comprising a latex formula according to the analysis content; obtaining a latex formula, and obtaining a MathType formula corresponding to the latex formula according to the latex formula; and replacing the latex formula in the basic Word document with a MathType formula, and deriving the Word document with the MathType formula. The content produced by the original production system is efficiently and completely restored to the Word document, so that the efficiency of the link from production to typesetting and final delivery of the object is improved; automatically generating a Word document without performing secondary check on the Word document; the formula in the Word document supports MathType, OMML and latex formats, and meets the multi-scene support of the formula; the machine automatically converts the formula into MathType without using a MathType program for manual conversion.

Description

Method and device for exporting Word document with MathType formula, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of document processing, in particular to a method, a device, electronic equipment and a storage medium for exporting a Word document with a MathType formula.
Background
In the education industry of today, in order to realize the production of teaching contents by multiple persons in a coordinated and efficient manner, each education company develops its own content production system as a final product delivered by a production system to a typesetting company. In addition, in the process of publishing the teaching content, the teaching materials need to be delivered to a typesetting company in the form of word documents, and for the documents with formulas, the formulas need to be displayed in the word documents in a MathType mode. How to efficiently produce the word document with the formula becomes an extremely important ring, and no system can realize the requirement in the market at present.
For the content exported as word, there are many solutions on the network, but there is no good support case for the format and style reduction of the content; for the formulas in the word documents, the solutions in the market are all word documents with formulas generated based on the self-contained formula format OMML of the word, and no solution with the formula word document based on the generated mathType formula exists; the traditional mode is that a word document formula is generated by a latex code or an OMML formula, and then the formulas are converted into a mathttype formula through mathttype software, so that the efficiency is low and the method is unstable.
Disclosure of Invention
The present application relates to the noun interpretation:
(1) latex is a typesetting system language for generating mathematical formulas; unique labeling of the module for tracking data.
(2) MathType: MathType is a professional mathematical formula editor, is compatible with various 700 programs such as Office work, excel and the like, and is used for editing documents such as mathematical examination papers, books, newspapers, papers, slide show and the like and easily inputting various complex mathematical formulas and symbols.
(3) MathML an XML markup language for describing mathematical formulas and symbols.
(4) OMML: the abbreviation of Office MathML is an XML markup language for mathematical formula by Microsoft
(5) OOXML: the abbreviation of Office Open XML is a technical specification developed by Microsoft corporation for Office 2007 products, has become an international document format standard, and is compatible with the former international standard Open document format and the Chinese document standard ' Standard ' Union of Standard ' (foreign language: UOF for short). Becoming the ECMA standard at 2006, 12 months.
(6) Word: is a word processor application program from microsoft corporation.
(7) JSON: is a lightweight data exchange format. It stores and represents data in a text format that is completely independent of the programming language, based on a subset of ECMAScript (js specification set by the european computer association). The compact and clear hierarchy makes JSON an ideal data exchange language. The network transmission method is easy to read and write by people, is easy to analyze and generate by machines, and effectively improves the network transmission efficiency.
(8) API (Application Programming Interface) function: are some predefined functions.
(9) wmf is an abbreviation of Windows Metafile, abbreviated as Metafile, which is a graphics file format defined by Microsoft corporation under Windows platform.
(10) bins are binary files whose use depends on the system or application. An abbreviation of file format binary. A file with the suffix ". bin" simply indicates that it is in the binary format.
(11) The formula: the expression of the relationship between the quantities expressed by mathematical symbols or characters has universality and is suitable for all problems of the same kind of relationship.
(12) sdk: a software development kit is a collection of development tools used by software engineers to create application software for a specific software package, software framework, hardware platform, operating system, etc., and in general, an SDK is an SDK used to develop applications on a Windows platform. It may simply be a file that provides an application program interface API for a certain programming language, but may also include complex hardware that can communicate with a certain embedded system. Typical tools include utility tools for debugging and other purposes. SDKs also often include example code, supporting technical notes, or other supporting documentation to clarify suspicions for basic reference.
(12) hash: the general translation is hashing, or transliteration into a hash, which is to transform an input of arbitrary length (also called pre-mapped pre-image) into an output of fixed length by a hashing algorithm, where the output is a hash value. This transformation is a kind of compression mapping, i.e. the space of hash values is usually much smaller than the space of inputs, different inputs may hash to the same output, so it is not possible to determine a unique input value from a hash value. In short, it is a function of compressing a message of an arbitrary length to a message digest of a certain fixed length.
In view of this, in order to solve or partially solve the above technical problem, embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for exporting a Word document with a MathType formula, where data generated by various document visual editing platforms is efficiently and completely generated and exported in a standard data format (JSON).
According to one aspect of the present invention, there is provided a method for exporting a Word document with a MathType formula, comprising:
receiving an export request for exporting data contents into a Word document;
analyzing the data content to obtain analyzed content;
judging whether a formula exists in the analysis content, if so, generating a Word basic document comprising a latex formula according to the analysis content;
acquiring the latex formula, and acquiring a MathType formula corresponding to the latex formula according to the latex formula;
and replacing the latex formula in the basic Word document with the MathType formula, and deriving the Word document with the MathType formula.
Optionally, the obtaining, according to the latex formula, the MathType formula corresponding to the latex formula includes:
judging whether the MathType formula corresponding to the latex formula exists in a pre-stored formula library or not, if not, calling the MathType official sdk, and converting the latex formula into the MathType formula;
if yes, directly replacing the latex formula in the basic Word document with the MathType formula, and deriving the Word document with the MathType formula.
Optionally, the method further comprises:
calling a MathType official sdk, converting the latex formula into a MathType formula, and storing the MathType formula corresponding to the latex formula into a prestored formula library; converting the latex code of the latex formula into a hash value;
and storing the hash value serving as an index value of the latex formula into a prestored formula library, and judging whether the latex formula is converted into the MathType formula or not according to the hash value.
Optionally, the converting the latex formula into the MathType formula includes:
wmf files and bin files corresponding to MathType formulas are generated, and the contents of the wmf files and the bin files are put into a cache in a base64 coding mode.
Optionally, the method further comprises:
for a plurality of export requests, the export resources are distributed according to the export request time, the source and the export priority weight;
and/or the presence of a gas in the gas,
monitoring the export state in the whole process, if error information is monitored, capturing the error information, and alarming;
and/or the presence of a gas in the gas,
and managing the export request and the latex formula.
According to another aspect of the present invention, there is provided a Word document apparatus for deriving a Word document with a mathttype formula, comprising:
the export request receiving module is used for receiving an export request for exporting data contents into Word documents;
the analysis module is used for analyzing the data content to obtain analysis content;
the judging and processing module is used for judging whether a formula exists in the analysis content, and if so, generating a Word basic document comprising a latex formula according to the analysis content;
the target formula acquisition module is used for acquiring the latex formula and acquiring a MathType formula corresponding to the latex formula according to the latex formula;
and the derivation module is used for replacing the latex formula in the basic Word document with the MathType formula and deriving the Word document with the MathType formula.
Optionally, the target formula obtaining module is specifically configured to:
judging whether the MathType formula corresponding to the latex formula exists in a pre-stored formula library or not, if not, calling the MathType official sdk, and converting the latex formula into the MathType formula;
if yes, directly replacing the latex formula in the basic Word document with the MathType formula, and deriving the Word document with the MathType formula.
Optionally, the apparatus further includes a hash value obtaining module, configured to call a MathType official sdk, convert the latex formula into a MathType formula, and store the MathType formula corresponding to the latex formula in a pre-stored formula library;
converting the latex code of the latex formula into a hash value;
storing the hash value serving as an index value of the latex formula into a prestored formula library, and judging whether the latex formula is converted into a MathType formula or not according to the hash value;
optionally, the target formula obtaining module is further specifically configured to:
wmf files and bin files corresponding to MathType formulas are generated, and the contents of the wmf files and the bin files are put into a cache in a base64 coding mode.
Optionally, the apparatus further comprises:
the distribution module is used for distributing export resources for a plurality of export requests according to export request time, sources and export priority weights;
and/or the presence of a gas in the gas,
the monitoring module is used for monitoring the derived state in the whole process, capturing error information if the error information is monitored, and alarming;
and/or the presence of a gas in the gas,
and the management module is used for managing the export request and the latex formula.
According to still another aspect of the present invention, there is provided an electronic apparatus including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for performing the above-described method.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the above-described method.
The invention exports the data content to the export request of Word file through receiving; analyzing the data content to obtain analyzed content; judging whether a formula exists in the analysis content, if so, generating a Word basic document comprising a latex formula according to the analysis content; obtaining a latex formula, and obtaining a MathType formula corresponding to the latex formula according to the latex formula; and replacing the latex formula in the basic Word document with a MathType formula, and deriving the Word document with the MathType formula. Data generated by the content production system is transmitted in a set of unified data structure by adopting a JSON data format, and the content generated by the original production system is efficiently and completely restored to a word document through formula conversion and the like, so that the efficiency of the link from production to typesetting and final delivery is improved. According to the invention, the data produced by the production system automatically generates a word document according to a standard data structure and format, and the secondary checking of the word document is not required; the formula in the Word document supports mathType, OMML and latex formats, and meets the multi-scene support of the formula; the machine automatically converts the formula into mathttype without using a mathttype program for manual conversion.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for exporting a Word document with a MathType formula according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a Word document apparatus for exporting a MathType formula according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for exporting a Word document with a mathttype formula according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S11: receiving an export request for exporting data contents into a Word document;
and receiving export requests of each service system or external system, receiving export requirements of each service system or external system through an API (hyper text transport protocol), and putting the export requirements into a task queue. Wherein, each service system includes: a lecture system, a question bank system, a content generation system, etc., and the external system is a system of other companies.
Step S12: analyzing the data content to obtain analyzed content;
parsing the data content of the export request: and analyzing the content data to be exported, and converting the content data into a data format required by document export.
Step S13: judging whether a formula exists in the analysis content, if so, generating a Word basic document comprising a latex formula according to the analysis content;
a) generating a Word document by adopting OOXML according to the analyzed content, wherein the formats supported by the formula formats comprise latex, OMML and MathType; the expression of the formula in Word can be latex, omml and mathtypee, where latex is a text (wrapped with $ symbols) describing the formula, such as: and $ a + b $, omml is the formula representation of Word itself, and both forms do not need to be subjected to formula conversion.
b) Regardless of the derived formula format requested, a Word document with formula format latex is first generated as a base document using the OOXML standard published by microsoft officials.
And if no formula exists in the analysis content, directly exporting the Word document.
Step S14: obtaining a latex formula, and obtaining a MathType formula corresponding to the latex formula according to the latex formula;
the method specifically comprises the following steps: judging whether the MathType formula corresponding to the latex formula exists in a prestored formula library or not, if not, calling the MathType official sdk, and converting the latex formula into the MathType formula; if yes, directly replacing the latex formula in the basic Word document with the MathType formula, exporting the Word document with the MathType formula, and replacing the latex codes in the document with formula resources in a corresponding format by adopting an OOXML editing mode for the basic document. Because each Word document is stored by OOXML, when the MathType formula corresponding to the latex formula exists in the pre-stored formula library, the replacement operation can be performed on the latex code in the Word document generated in advance.
The specific syntax of the OOXML is not described in detail in the prior art.
In some embodiments of the invention, MathType official sdk is called, a latex formula is converted into a MathType formula, and then the MathType formula corresponding to the latex formula is stored in a pre-stored formula library; converting the latex code of the latex formula into a hash value; and storing the hash value serving as the index value of the latex formula into a prestored formula library, and judging whether the latex formula is converted into the MathType formula or not according to the hash value.
For example, the latex code of the latex code is converted into a 32-bit hash value by MD5, and the hash value is stored as an index into the pre-stored formula library, and the hash value is used as the unique index value of the formula, which can be understood as a unique name in the formula library, so that the 32-bit hash value of MD5 of the latex code of the formula can be quickly retrieved from the pre-stored formula library when confirming whether a certain formula is converted.
In some embodiments of the invention, converting the latex formula to the MathType formula comprises: wmf files and bin files corresponding to the MathType formula are generated, and the contents of the wmf files and the bin files are put into a cache in a base64 coding mode.
The MathType formula in Word is divided into two parts, wherein one part is a graphic display file of the formula, namely wmf file; the other part is a specific encryption description file of the MathType software to the formula, the content is stored in a bin file, and the content is in a special encryption mode of the MathType software and cannot be decoded.
The specific operation is as follows:
the MathType official provides sdk for calling a MathType conversion program, the latex code of the formula is converted into the MathType formula by calling sdk of the MathType by using a python language, the converted result is the wmf and bin files, and the conversion work depends on MathType software.
The purpose of putting the generated wmf file and bin file contents into cache in the form of base64 coding is to accelerate the extraction speed and reduce the disk IO.
In other words, a) when a request for converting a latex formula into a MathType formula is received, the pre-stored formula library is searched for the hash value of the latex code, and if the pre-stored formula library does not exist, the pre-stored formula library is placed into the conversion queue task.
b) Converting the latex into the MathType formula generates wmf and bin files corresponding to the MathType formula, and stores the hash value of the latex code as a unique index into a formula library to be used as a public resource for multiplexing.
c) The wmf corresponding to the MathType formula and the content of the bin file are put into a cache in a base64 coding mode, and the cache key value is the hash value of the latex code.
d) The related files of the formulas can be managed, and functions of replacing a single formula again, replacing an uploaded file and the like can be executed.
Step S15: and replacing the latex formula in the basic Word document with a MathType formula, and deriving the Word document with the MathType formula.
In some embodiments of the invention, the method further comprises: for a plurality of export requests, the export resources are distributed according to the export request time, the source and the export priority weight;
in some embodiments of the invention, the method further comprises: monitoring the export state in the whole process, if error information is monitored, capturing the error information, and alarming;
in some embodiments of the invention, the method further comprises: the export request and the latex formula are managed, and the management mode mainly comprises the following steps: the process of enqueuing and re-executing can be performed for a single export request, and functions of re-conversion, upload file replacement, etc. can be performed for a single formula.
In some embodiments of the invention, the method further comprises: when the business system or the external system requests, a callback address is generated, and the document address is transmitted back to the business system after the document conversion is successful.
The method for exporting the Word document with the MathType formula, provided by the invention, can use application scenes comprising the following steps:
1. a content production system: and (4) making a lecture export word document on line for typesetting by a typesetting company, and making a test paper export word document on line for printing.
2. Content download service: an editable word document for downloading the datalized content, such as: test questions, electronic books, treatises, etc.
The invention efficiently and completely restores the content produced by the original production system to the Word document, thereby improving the efficiency of the link from production to typesetting and final delivery of the object; automatically generating a Word document without performing secondary check on the Word document; the formula in the Word document supports MathType, OMML and latex formats, and meets the multi-scene support of the formula; the machine automatically converts the formula into MathType without using a MathType program for manual conversion.
Fig. 2 is a schematic diagram of a device for exporting a Word document with a mathttype formula according to an embodiment of the present invention, as shown in fig. 2, the device 20 includes:
an export request receiving module 201, configured to receive an export request for exporting data content into a Word document;
the analysis module 202 is configured to perform analysis processing on the data content to obtain analysis content;
the judgment processing module 203 is used for judging whether a formula exists in the analysis content, and if so, generating a Word basic document comprising a latex formula according to the analysis content;
the target formula obtaining module 204 is configured to obtain a latex formula, and obtain a MathType formula corresponding to the latex formula according to the latex formula;
and the export module 205 is used for replacing the latex formula in the basic Word document with the MathType formula and exporting the Word document with the MathType formula.
In some embodiments of the present invention, the target formula obtaining module 204 is specifically configured to:
judging whether the MathType formula corresponding to the latex formula exists in a prestored formula library or not, if not, calling the MathType official sdk, and converting the latex formula into the MathType formula;
if yes, directly replacing the latex formula in the basic Word document with the MathType formula, and deriving the Word document with the MathType formula.
In some embodiments of the present invention, the apparatus further includes a hash value obtaining module, configured to call a MathType official sdk, convert a latex formula into a MathType formula, and store the MathType formula corresponding to the latex formula into a pre-stored formula library; converting the latex code of the latex formula into a hash value; and storing the hash value serving as the index value of the latex formula into a prestored formula library, and judging whether the latex formula is converted into the MathType formula or not according to the hash value.
In some embodiments of the present invention, the target formula obtaining module 204 is further specifically configured to:
wmf files and bin files corresponding to the MathType formula are generated, and the contents of the wmf files and the bin files are put into a cache in a base64 coding mode.
In some embodiments of the invention, the apparatus further comprises:
the allocating module 206 is configured to allocate export resources to the multiple export requests according to export request time, a source, and an export priority weight;
and/or the presence of a gas in the gas,
the monitoring module 207 is used for monitoring the derived state in the whole process, capturing error information and giving an alarm if the error information is monitored;
and/or the presence of a gas in the gas,
and the management module 208 is configured to manage the export request and the latex formula.
Fig. 3 is a schematic structural diagram of an embodiment of an electronic device of the present invention, where the electronic device may include: the device comprises a shell 31, a processor 32, a memory 33, a circuit board 34 and a power circuit 33, wherein the circuit board 34 is arranged inside a space enclosed by the shell 31, and the processor 32 and the memory 33 are arranged on the circuit board 34; a power supply circuit 33 for supplying power to each circuit or device of the electronic apparatus; the memory 33 is used for storing executable program codes; the processor 32 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 33, for executing the method described in any of the foregoing embodiments.
The specific execution process of the above steps by the processor 32 and the steps further executed by the processor 32 by running the executable program code may refer to the description of the embodiment shown in fig. 1-2 of the present invention, and are not described herein again.
The electronic device exists in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement a method as described in any of the preceding implementations.
The application scenarios that can be used by the Word document device, the electronic device and the storage medium for exporting the MathType formula provided by the invention comprise:
1. a content production system: and (4) making a lecture export word document on line for typesetting by a typesetting company, and making a test paper export word document on line for printing.
2. Content download service: an editable word document for downloading the datalized content, such as: test questions, electronic books, treatises, etc.
The invention exports the data content to the export request of Word file through receiving; analyzing the data content to obtain analyzed content; judging whether a formula exists in the analysis content, if so, generating a Word basic document comprising a latex formula according to the analysis content; obtaining a latex formula, and obtaining a MathType formula corresponding to the latex formula according to the latex formula; and replacing the latex formula in the basic Word document with a MathType formula, and deriving the Word document with the MathType formula. Data generated by the content production system is transmitted in a set of unified data structure by adopting a JSON data format, and the content generated by the original production system is efficiently and completely restored to a word document through formula conversion and the like, so that the efficiency of the link from production to typesetting and final delivery is improved. According to the invention, the data produced by the production system automatically generates a word document according to a standard data structure and format, and the secondary checking of the word document is not required; the formula in the Word document supports mathType, OMML and latex formats, and meets the multi-scene support of the formula; the machine automatically converts the formula into mathttype without manually converting by using a mathttype program; the same formula is generated once, and the shared use can be realized without repeated conversion.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for exporting a Word document with a MathType formula is characterized by comprising the following steps:
receiving an export request for exporting data contents into a Word document;
analyzing the data content to obtain analyzed content;
judging whether a formula exists in the analysis content, if so, generating a Word basic document comprising a latex formula according to the analysis content;
acquiring the latex formula, and acquiring a MathType formula corresponding to the latex formula according to the latex formula;
and replacing the latex formula in the basic Word document with the MathType formula, and deriving the Word document with the MathType formula.
2. The method of claim 1, wherein obtaining the mathttype equation corresponding to the latex equation according to the latex equation comprises:
judging whether the MathType formula corresponding to the latex formula exists in a pre-stored formula library or not, if not, calling the MathType official sdk, and converting the latex formula into the MathType formula;
if yes, directly replacing the latex formula in the basic Word document with the MathType formula, and deriving the Word document with the MathType formula.
3. The method of claim 2, wherein the method further comprises:
calling a MathType official sdk, converting the latex formula into a MathType formula, and storing the MathType formula corresponding to the latex formula into a prestored formula library; converting the latex code of the latex formula into a hash value;
and storing the hash value serving as an index value of the latex formula into a prestored formula library, and judging whether the latex formula is converted into the MathType formula or not according to the hash value.
4. The method of claim 2 or 3, wherein said converting said latex formula to a MathType formula comprises:
wmf files and bin files corresponding to MathType formulas are generated, and the contents of the wmf files and the bin files are put into a cache in a base64 coding mode.
5. The method of claim 1, wherein the method further comprises:
for a plurality of export requests, the export resources are distributed according to the export request time, the source and the export priority weight;
and/or the presence of a gas in the gas,
monitoring the export state in the whole process, if error information is monitored, capturing the error information, and alarming;
and/or the presence of a gas in the gas,
and managing the export request and the latex formula.
6. A device for exporting a Word document with a MathType formula is characterized by comprising the following steps:
the export request receiving module is used for receiving an export request for exporting data contents into Word documents;
the analysis module is used for analyzing the data content to obtain analysis content;
the judging and processing module is used for judging whether a formula exists in the analysis content, and if so, generating a Word basic document comprising a latex formula according to the analysis content;
the target formula acquisition module is used for acquiring the latex formula and acquiring a MathType formula corresponding to the latex formula according to the latex formula;
and the derivation module is used for replacing the latex formula in the basic Word document with the MathType formula and deriving the Word document with the MathType formula.
The target formula obtaining module is specifically configured to:
judging whether the MathType formula corresponding to the latex formula exists in a pre-stored formula library or not, if not, calling the MathType official sdk, and converting the latex formula into the MathType formula;
if yes, directly replacing the latex formula in the basic Word document with the MathType formula, and deriving the Word document with the MathType formula.
7. The apparatus of claim 6, further comprising a hash value obtaining module, configured to call sdk MathType official, convert the latex formula into MathType formula, and store the MathType formula corresponding to the latex formula into a pre-stored formula library;
converting the latex code of the latex formula into a hash value;
storing the hash value serving as an index value of the latex formula into a prestored formula library, and judging whether the latex formula is converted into a MathType formula or not according to the hash value;
the target formula obtaining module is further specifically configured to:
wmf files and bin files corresponding to MathType formulas are generated, and the contents of the wmf files and the bin files are put into a cache in a base64 coding mode.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the distribution module is used for distributing export resources for a plurality of export requests according to export request time, sources and export priority weights;
and/or the presence of a gas in the gas,
the monitoring module is used for monitoring the derived state in the whole process, capturing error information if the error information is monitored, and alarming;
and/or the presence of a gas in the gas,
and the management module is used for managing the export request and the latex formula.
9. An electronic device, characterized in that the electronic device comprises: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the method of any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs which are executable by one or more processors to implement the method of any one of claims 1-5.
CN201911360647.4A 2019-12-25 2019-12-25 Method and device for exporting Word document with MathType formula, electronic equipment and storage medium Pending CN111126006A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911360647.4A CN111126006A (en) 2019-12-25 2019-12-25 Method and device for exporting Word document with MathType formula, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911360647.4A CN111126006A (en) 2019-12-25 2019-12-25 Method and device for exporting Word document with MathType formula, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111126006A true CN111126006A (en) 2020-05-08

Family

ID=70502540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911360647.4A Pending CN111126006A (en) 2019-12-25 2019-12-25 Method and device for exporting Word document with MathType formula, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111126006A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111046637A (en) * 2019-12-25 2020-04-21 小船出海教育科技(北京)有限公司 Scientific formula correctness checking method and device
CN112083909A (en) * 2020-08-07 2020-12-15 清华大学 Engineering structure design standard formula recognition and calculation program automatic generation method
CN112613279A (en) * 2020-12-24 2021-04-06 北京乐学帮网络技术有限公司 File conversion method and device, computer device and readable storage medium
CN112733491A (en) * 2020-12-31 2021-04-30 北京乐学帮网络技术有限公司 Data conversion method and device, computer equipment and storage medium
CN112800719A (en) * 2020-12-28 2021-05-14 北京思题科技有限公司 Electronic document structuring method
CN113326675A (en) * 2021-08-04 2021-08-31 江西风向标教育科技有限公司 Formula processing method and system for education resource library
CN116702712A (en) * 2023-08-09 2023-09-05 北京凯锐远景科技有限公司 Word task book conversion method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750796A (en) * 2014-11-13 2015-07-01 安徽四创电子股份有限公司 Method for leading out Word under BS system
CN108153717A (en) * 2017-12-29 2018-06-12 北京仁和汇智信息技术有限公司 A kind of structuring processing method and processing device of papers in sci-tech word document
CN108228777A (en) * 2017-12-28 2018-06-29 北京洪泰同创信息技术有限公司 Html text exports to the method and device of word document
CN108319724A (en) * 2018-02-28 2018-07-24 北京仁和汇智信息技术有限公司 A kind of Homepage Publishing method and device with formula file
CN110147534A (en) * 2019-02-27 2019-08-20 中国地质大学(武汉) A kind of method and system that LaTeX document is converted to Word document

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750796A (en) * 2014-11-13 2015-07-01 安徽四创电子股份有限公司 Method for leading out Word under BS system
CN108228777A (en) * 2017-12-28 2018-06-29 北京洪泰同创信息技术有限公司 Html text exports to the method and device of word document
CN108153717A (en) * 2017-12-29 2018-06-12 北京仁和汇智信息技术有限公司 A kind of structuring processing method and processing device of papers in sci-tech word document
CN108319724A (en) * 2018-02-28 2018-07-24 北京仁和汇智信息技术有限公司 A kind of Homepage Publishing method and device with formula file
CN110147534A (en) * 2019-02-27 2019-08-20 中国地质大学(武汉) A kind of method and system that LaTeX document is converted to Word document

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
窦盼英 等: "《现代教育技术实用教程》", 国防工业出版社, pages: 90 - 92 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111046637A (en) * 2019-12-25 2020-04-21 小船出海教育科技(北京)有限公司 Scientific formula correctness checking method and device
CN112083909A (en) * 2020-08-07 2020-12-15 清华大学 Engineering structure design standard formula recognition and calculation program automatic generation method
CN112613279A (en) * 2020-12-24 2021-04-06 北京乐学帮网络技术有限公司 File conversion method and device, computer device and readable storage medium
CN112800719A (en) * 2020-12-28 2021-05-14 北京思题科技有限公司 Electronic document structuring method
CN112733491A (en) * 2020-12-31 2021-04-30 北京乐学帮网络技术有限公司 Data conversion method and device, computer equipment and storage medium
CN113326675A (en) * 2021-08-04 2021-08-31 江西风向标教育科技有限公司 Formula processing method and system for education resource library
CN116702712A (en) * 2023-08-09 2023-09-05 北京凯锐远景科技有限公司 Word task book conversion method and device, electronic equipment and medium
CN116702712B (en) * 2023-08-09 2023-10-17 北京凯锐远景科技有限公司 Word task book conversion method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN111126006A (en) Method and device for exporting Word document with MathType formula, electronic equipment and storage medium
Sumaray et al. A comparison of data serialization formats for optimal efficiency on a mobile platform
CN112015430A (en) JavaScript code translation method and device, computer equipment and storage medium
US20160117291A1 (en) Conversion of a presentation to darwin information typing architecture (dita)
CN109978629B (en) Advertisement putting method and device, electronic equipment and storage medium
CN109495496B (en) Voice processing method and device, electronic equipment and computer readable medium
CN110020358B (en) Method and device for generating dynamic page
CN113407882A (en) Component generation method and device, computer-readable storage medium and electronic equipment
CN114020846A (en) Processing method and device capable of changing NFT (network File transfer) works
CN111241496B (en) Method and device for determining small program feature vector and electronic equipment
CN110855555B (en) Mail sending method, device, equipment and computer readable storage medium
CN107566090B (en) Fixed-length/variable-length text message processing method and device
CN114020718A (en) Processing method and device for unchangeable NFT (network File transfer) works
US20220182072A1 (en) Data Compression Method and Apparatus, Computer-Readable Storage Medium, and Electronic Device
CN111796727A (en) Interface data processing method and device
CN115759029A (en) Document template processing method and device, electronic equipment and storage medium
CN115841095A (en) Document establishing method, system, medium and equipment
CN115934093A (en) Applet cross-terminal application method, related device and computer storage medium
US20220284371A1 (en) Method, device and medium for a business function page
CN113342450B (en) Page processing method, device, electronic equipment and computer readable medium
CN115293123A (en) Document template generation method, report online generation method and device
CN115061785A (en) Information issuing method and device, storage medium and server
CN114866628A (en) Message processing method, device, equipment and storage medium
CN111475403A (en) Dynamic generation method of test script and related device
CN114036162A (en) Game NFT work processing method and device

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