CN110874522B - File format conversion method and device, electronic equipment and storage medium - Google Patents

File format conversion method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110874522B
CN110874522B CN201811022818.8A CN201811022818A CN110874522B CN 110874522 B CN110874522 B CN 110874522B CN 201811022818 A CN201811022818 A CN 201811022818A CN 110874522 B CN110874522 B CN 110874522B
Authority
CN
China
Prior art keywords
file
format
converting
document
format file
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.)
Active
Application number
CN201811022818.8A
Other languages
Chinese (zh)
Other versions
CN110874522A (en
Inventor
邓斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201811022818.8A priority Critical patent/CN110874522B/en
Publication of CN110874522A publication Critical patent/CN110874522A/en
Application granted granted Critical
Publication of CN110874522B publication Critical patent/CN110874522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Abstract

The embodiment of the invention provides a file format conversion method, a file format conversion device and electronic equipment, which can detect whether a second format file is dragged into an interface opened by first format file editing software when the first format file editing software is in an opened state, and convert the second format file into the first format file if the second format file is dragged into the interface opened by the first format file editing software. Therefore, when the method provided by the embodiment of the invention is used for converting the file format, the second format file can be converted into the first format file only by dragging the second format file into the interface opened by the first format file editing software; the method and the device have the advantages that the format conversion tool is not required to be downloaded and installed firstly, and then the conversion of the file format can be completed by means of the format conversion tool, so that the problems that the operation is complex and the use difficulty is high when the file format conversion is carried out in the prior art are solved.

Description

File format conversion method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of file format conversion technologies, and in particular, to a method and an apparatus for converting a file format, and an electronic device.
Background
With the development of computer technology, file formats are increasing. In daily life, users often encounter situations where it is necessary to convert one file format to another, for example: the Word document is converted into a PDF document.
Existing methods of converting a file format typically convert one file format to another file format by means of a format conversion tool, such as: the user needs to convert the Word document into the PDF document, and then the user needs to first download and install a format conversion tool for converting the Word document into the PDF document, and then find the Word document to be converted in the format conversion tool to convert it into the PDF document.
However, the inventors found that the prior art has at least the following problems: the method provided by the prior art is complex to operate, requires a certain expertise of the user, and can be skillfully used with professional format conversion tools. Thus, there is a certain difficulty for the general user.
Disclosure of Invention
The embodiment of the invention aims to provide a file format conversion method, a device, electronic equipment and a storage medium, so as to solve the problems of complex operation and great use difficulty in the process of converting a file format in the prior art. The specific technical scheme is as follows:
In order to achieve the above object, in a first aspect, an embodiment of the present invention provides a file format conversion method, including:
when the first format file editing software is in an open state, detecting whether a second format file is dragged into an interface opened by the first format file editing software; wherein the second format is a different file format than the first format;
if yes, converting the second format file into the first format file.
Optionally, the step of detecting whether the second format file is dragged into the interface opened by the first format file editing software includes:
Detecting whether a notification that a file sent by a system is dragged into an interface opened by first format file editing software is received;
When the notification is detected, reading the suffix name of the dragged file;
Judging whether the file format of the dragged file is different from the first format according to the suffix name;
And if the file format of the dragged file is different from the first format, determining that a file with a second format is dragged into an interface opened by the first format file editing software.
Optionally, the step of converting the second format file into the first format file includes:
And converting the second format file into the first format file according to a file conversion algorithm for converting the pre-stored second format file into the first format file.
Optionally, the step of converting the second format file into the first format file according to the file conversion algorithm of converting the pre-stored second format file into the first format file includes:
Determining a file conversion algorithm for converting the second format file into the first format file from a plurality of file conversion algorithms for converting the pre-stored files with different formats into the first format file according to the file format of the second format file;
And converting the second format file into the first format file according to a file conversion algorithm for converting the determined second format file into the first format file.
Optionally, the first format file editing software is PDF document editing software; the second format file is: one of a word document, an Excel document, a PPT document, or a TXT document;
The step of converting the second format document into the first format document according to the determined algorithm for converting the second format document into the first format document comprises the following steps:
Converting the word document into a PDF document according to a preset algorithm for converting the word document into the PDF document; or converting the Excel document into a PDF document according to a preset algorithm for converting the Excel document into the PDF document; or converting the PPT document into a PDF document according to a preset algorithm for converting the PPT document into the PDF document; or converting the TXT document into a PDF document according to a preset algorithm for converting the TXT document into the PDF document.
Optionally, the first format file editing software is PDF document editing software; the second format document is: an audio file containing speech;
The step of converting the second format document into the first format document according to the determined algorithm for converting the second format document into the first format document comprises the following steps:
and converting the audio file containing the voice into a PDF document according to a preset algorithm for converting the audio file containing the voice into the PDF document.
Optionally, before the step of converting the second format file into the first format file, the method further includes:
Outputting prompt information whether to convert the second format file into the first format file;
And after receiving the confirmation information input by the user, executing the step of converting the second format file into the first format file.
Optionally, after the step of converting the second format file into the first format file, the method further includes:
opening the converted file; or, storing the converted file;
After the step of opening the converted file, further comprising:
and receiving an instruction for saving the file triggered by the user, and saving the file according to the instruction.
In a second aspect, an embodiment of the present invention provides a file format conversion apparatus, including:
the detection module is used for detecting whether the second format file is dragged into an interface opened by the first format file editing software when the first format file editing software is in an opened state; wherein the second format is a different file format than the first format;
The conversion module is used for converting the second format file into the first format file.
Optionally, the detection module includes:
The receiving sub-module is used for detecting whether a notification that a file sent by the system is dragged to an interface opened by the first format file editing software is received or not;
the reading sub-module is used for reading the suffix name of the dragged file when the notification is detected;
the judging sub-module is used for judging whether the file format of the dragged file is different from the first format according to the suffix name;
and the determining submodule is used for determining that the file with the second format is dragged into the interface opened by the first format file editing software when the file format of the dragged file is different from the first format.
Optionally, the conversion module is specifically configured to:
And converting the second format file into the first format file according to a file conversion algorithm for converting the pre-stored second format file into the first format file.
Optionally, the conversion module includes:
The determining submodule is used for determining a file conversion algorithm for converting the second format file into the first format file from a plurality of file conversion algorithms for converting the pre-stored files with different formats into the first format file according to the file format of the second format file;
And the conversion sub-module is used for converting the second format file into the first format file according to a file conversion algorithm for converting the determined second format file into the first format file.
Optionally, the first format file editing software is PDF document editing software; the second format file is: one of a word document, an Excel document, a PPT document, or a TXT document;
The conversion submodule is specifically configured to:
Converting the word document into a PDF document according to a preset algorithm for converting the word document into the PDF document; or converting the Excel document into a PDF document according to a preset algorithm for converting the Excel document into the PDF document; or converting the PPT document into a PDF document according to a preset algorithm for converting the PPT document into the PDF document; or converting the TXT document into a PDF document according to a preset algorithm for converting the TXT document into the PDF document.
Optionally, the first format file editing software is PDF document editing software; the second format document is: an audio file containing speech;
The conversion submodule is specifically configured to:
and converting the audio file containing the voice into a PDF document according to a preset algorithm for converting the audio file containing the voice into the PDF document.
Optionally, the apparatus further includes:
The prompting module is used for outputting prompting information whether the second format file is converted into the first format file or not before the step of converting the second format file into the first format file;
The conversion module is specifically configured to execute the step of converting the second format file into the first format file after receiving the confirmation information input by the user.
Optionally, the apparatus further includes:
The opening module is used for opening the converted file;
The storage module is used for storing the converted file;
The storage module is also used for receiving an instruction triggered by a user to store the file after the converted file is opened, and storing the file according to the instruction.
In a third aspect, an embodiment of the present invention provides an electronic device, including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the following steps when executing the program stored in the memory:
when the first format file editing software is in an open state, detecting whether a second format file is dragged into an interface opened by the first format file editing software; wherein the second format is a different file format than the first format;
if yes, converting the second format file into the first format file.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having a computer program stored therein, which when executed by a processor, performs the steps of:
when the first format file editing software is in an open state, detecting whether a second format file is dragged into an interface opened by the first format file editing software; wherein the second format is a different file format than the first format;
if yes, converting the second format file into the first format file.
The embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the above-described file format conversion methods.
The file format conversion method, the device, the electronic equipment and the storage medium provided by the embodiment of the invention can detect whether the second format file is dragged into the interface opened by the first format file editing software when the first format file editing software is in an opened state, and if so, convert the second format file into the first format file. Therefore, when the method provided by the embodiment of the invention is used for converting the file format, the second format file can be converted into the first format file only by dragging the second format file into the interface opened by the first format file editing software; the method and the device have the advantages that the format conversion tool is not required to be downloaded and installed firstly, and then the conversion of the file format can be completed by means of the format conversion tool, so that the problems that the operation is complex and the use difficulty is high when the file format conversion is carried out in the prior art are solved.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a file format conversion method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another method for converting a file format according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a file format converting apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the structure of the detection module in the embodiment shown in FIG. 3;
FIG. 5 is a schematic diagram of the conversion module in the embodiment shown in FIG. 3;
FIG. 6 is a schematic diagram of another embodiment of a file format converting apparatus according to the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to solve the problems of complex operation and great use difficulty in the prior art when converting a file format, the invention provides a file format conversion method, a device, electronic equipment and a storage medium.
Fig. 1 is a flow chart of a file format conversion method according to an embodiment of the present invention, referring to fig. 1, the method includes:
S101: when the first format file editing software is in an open state, detecting whether a second format file is dragged into an interface opened by the first format file editing software; wherein the second format is a different file format than the first format.
Specifically, when the first format file editing software is in an open state, the step of detecting whether the second format file is dragged into the interface opened by the first format file editing software may be:
Detecting whether a notification that a file sent by a system is dragged into an interface opened by first format file editing software is received;
When the notification is detected, reading the suffix name of the dragged file;
Judging whether the file format of the dragged file is different from the first format according to the suffix name;
And if the file format of the dragged file is different from the first format, determining that a file with a second format is dragged into an interface opened by the first format file editing software.
S102: if yes, converting the second format file into the first format file.
Specifically, when it is detected that a second format file is dragged into an interface opened by the first format file editing software, converting the second format file into the first format file according to a file conversion algorithm for converting the pre-stored second format file into the first format file.
As can be seen from the embodiment shown in fig. 1, the method for converting a file format provided in the embodiment of the present invention can detect whether a second format file is dragged into an interface opened by a first format file editing software when the first format file editing software is in an opened state, and if so, convert the second format file into the first format file. Therefore, when the method provided by the embodiment of the invention is used for converting the file format, the second format file can be converted into the first format file only by dragging the second format file into the interface opened by the first format file editing software; the method and the device have the advantages that the format conversion tool is not required to be downloaded and installed firstly, and then the conversion of the file format can be completed by means of the format conversion tool, so that the problems that the operation is complex and the use difficulty is high when the file format conversion is carried out in the prior art are solved.
Hereinafter, a specific example is given to describe a format conversion method provided in the embodiment of the present invention in further detail. As shown in fig. 2, this example flow includes the steps of:
s201: when the first format file editing software is in an open state, detecting whether a notification that a file sent by a system is dragged into an interface opened by the first format file editing software is received.
S202: and when the notification is detected, reading the suffix name of the dragged file.
S203: judging whether the file format of the dragged file is different from the first format according to the suffix name.
S204: and if the file format of the dragged file is different from the first format, determining that a file with a second format is dragged into an interface opened by the first format file editing software.
S205: and determining a file conversion algorithm for converting the second format file into the first format file from a plurality of file conversion algorithms for converting the pre-stored different format files into the first format file according to the file format of the second format file.
S206: and converting the second format file into the first format file according to a file conversion algorithm for converting the determined second format file into the first format file.
Specifically, the first format file editing software may be PDF document editing software; the second format file may be: one of a word document, an Excel document, a PPT document, or a TXT document.
The step of converting the second format document into the first format document according to the determined algorithm for converting the second format document into the first format document may be:
Converting the word document into a PDF document according to a preset algorithm for converting the word document into the PDF document; or converting the Excel document into a PDF document according to a preset algorithm for converting the Excel document into the PDF document; or converting the PPT document into a PDF document according to a preset algorithm for converting the PPT document into the PDF document; or converting the TXT document into a PDF document according to a preset algorithm for converting the TXT document into the PDF document.
Specifically, the first format file editing software may be PDF document editing software; the second format document may further be: an audio file containing speech.
The step of converting the second format document into the first format document according to the determined algorithm for converting the second format document into the first format document may be:
and converting the audio file containing the voice into a PDF document according to a preset algorithm for converting the audio file containing the voice into the PDF document.
Optionally, before the step of converting the second format file into the first format file, the method may further include:
Outputting prompt information whether to convert the second format file into the first format file;
And after receiving the confirmation information input by the user, executing the step of converting the second format file into the first format file.
Specifically, the mode of outputting the prompt information about whether to convert the second format file into the first format file may be: and displaying a bullet frame containing prompt information and whether options are converted or inquiring whether the user performs format conversion in a voice prompt mode.
Specifically, the manner of receiving the confirmation information input by the user may be: receiving confirmation information input by a user through voice, receiving confirmation information input by a user through a keyboard, and receiving confirmation information input by the user through mouse clicking or touch clicking.
Optionally, after the step of converting the second format file into the first format file, the method may further include:
opening the converted file; or, storing the converted file;
after the step of opening the converted file, it may further include:
and receiving an instruction for saving the file triggered by the user, and saving the file according to the instruction.
In a specific embodiment, when the user opens the jinshan PDF software and drags the word document to be converted into the interface of the software, a conversion prompt is triggered at this time, a box containing prompt information and whether to convert options is displayed in the interface of the software, and the user is asked whether to perform file conversion, if the user selects to convert the document, for example: the user clicks the "yes" option in the bullet box, and at this time, the word document is converted into the PDF document according to the preset algorithm for converting the word document into the PDF document. If the user does not select to transform the document, for example: and clicking a No option in the bullet box by the user, and considering that the user does not drag the word document to be converted into the interface of the software, and not converting the word document into a PDF document.
Similarly, the embodiment of the invention can also be applied to word, excel, PPT or TXT and other file editing software, for example: when a user opens the word editing software, if a PDF file is dragged to the word editing interface, the PDF file can be converted into the word file.
As can be seen from the embodiment shown in fig. 2, the method for converting a file format provided in the embodiment of the present invention can detect whether a second format file is dragged into an interface opened by a first format file editing software when the first format file editing software is in an opened state, and if so, convert the second format file into the first format file. Therefore, when the method provided by the embodiment of the invention is used for converting the file format, the second format file can be converted into the first format file only by dragging the second format file into the interface opened by the first format file editing software; the method and the device have the advantages that the format conversion tool is not required to be downloaded and installed firstly, and then the conversion of the file format can be completed by means of the format conversion tool, so that the problems that the operation is complex and the use difficulty is high when the file format conversion is carried out in the prior art are solved.
In addition, in this embodiment, the file conversion algorithm for converting the second format file into the first format file may be determined from a plurality of file conversion algorithms for converting the pre-stored different format files into the first format file according to the file format of the second format file. Therefore, conversion of a plurality of different format files can be realized.
Corresponding to the embodiment shown in fig. 1, the embodiment of the invention further provides a file format conversion device.
Referring to fig. 3, the apparatus includes: a detection module 301, a conversion module 302;
The detecting module 301 is configured to detect, when the first format file editing software is in an open state, whether a second format file is dragged into an interface opened by the first format file editing software; wherein the second format is a different file format than the first format;
the conversion module 302 is configured to convert the second format file into a first format file.
Optionally, referring to fig. 4, the detection module 301 includes: a receiving sub-module 401, a reading sub-module 402, a judging sub-module 403 and a determining sub-module 404;
The receiving sub-module 401 is configured to detect whether a notification sent by the system is received that a file is dragged into an interface opened by the first format file editing software;
the reading sub-module 402 is configured to read a suffix name of the dragged file when the notification is detected;
The judging sub-module 403 is configured to judge whether a file format of the dragged file is different from the first format according to a suffix name;
The determining submodule 404 is configured to determine that a file with a second format is dragged into an interface opened by the first format file editing software when the file format of the dragged file is different from the first format.
Optionally, the conversion module 302 is specifically configured to:
And converting the second format file into the first format file according to a file conversion algorithm for converting the pre-stored second format file into the first format file.
Optionally, referring to fig. 5, the conversion module 302 includes: determining a submodule 501 and a conversion submodule 502;
the determining submodule 501 is configured to determine, according to a file format of the second format file, a file conversion algorithm for converting the second format file into the first format file from a plurality of file conversion algorithms for converting pre-stored files with different formats into the first format file;
The conversion sub-module 502 is configured to convert the second format file into the first format file according to a file conversion algorithm for converting the determined second format file into the first format file.
Optionally, the first format file editing software is PDF document editing software; the second format file is: one of a word document, an Excel document, a PPT document, or a TXT document;
the conversion submodule 502 is specifically configured to:
Converting the word document into a PDF document according to a preset algorithm for converting the word document into the PDF document; or converting the Excel document into a PDF document according to a preset algorithm for converting the Excel document into the PDF document; or converting the PPT document into a PDF document according to a preset algorithm for converting the PPT document into the PDF document; or converting the TXT document into a PDF document according to a preset algorithm for converting the TXT document into the PDF document.
Optionally, the first format file editing software is PDF document editing software; the second format document is: an audio file containing speech;
the conversion submodule 502 is specifically configured to:
and converting the audio file containing the voice into a PDF document according to a preset algorithm for converting the audio file containing the voice into the PDF document.
Optionally, referring to fig. 6, the apparatus further includes: a prompt module 601;
The prompt module 601 is configured to output, before the step of converting the second format file into the first format file, prompt information about whether to convert the second format file into the first format file;
The conversion module 302 is specifically configured to execute the step of converting the second format file into the first format file after receiving the confirmation information input by the user.
Optionally, referring to fig. 6, the apparatus further includes: an opening module 602 and a saving module 603;
the opening module 602 is configured to open the converted file;
the saving module 603 is configured to save the converted file;
the saving module 603 is further configured to receive an instruction triggered by a user to save the file after the converted file is opened, and save the file according to the instruction.
The file format conversion device provided by the embodiment of the invention can detect whether the second format file is dragged into the interface opened by the first format file editing software when the first format file editing software is in an opened state, and if so, convert the second format file into the first format file. Therefore, when the method provided by the embodiment of the invention is used for converting the file format, the second format file can be converted into the first format file only by dragging the second format file into the interface opened by the first format file editing software; the method and the device have the advantages that the format conversion tool is not required to be downloaded and installed firstly, and then the conversion of the file format can be completed by means of the format conversion tool, so that the problems that the operation is complex and the use difficulty is high when the file format conversion is carried out in the prior art are solved.
In addition, in this embodiment, the file conversion algorithm for converting the second format file into the first format file may be determined from a plurality of file conversion algorithms for converting the pre-stored different format files into the first format file according to the file format of the second format file. Therefore, conversion of a plurality of different format files can be realized.
Corresponding to the embodiment shown in fig. 1, the embodiment of the present invention further provides an electronic device, as shown in fig. 7, where the electronic device includes: a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, the memory 703 complete communication with each other through the communication bus 704,
A memory 703 for storing a computer program;
The processor 701 is configured to execute the program stored in the memory 703, and implement the following steps:
when the first format file editing software is in an open state, detecting whether a second format file is dragged into an interface opened by the first format file editing software; wherein the second format is a different file format than the first format;
if yes, converting the second format file into the first format file.
The electronic equipment provided by the embodiment of the invention can detect whether the second format file is dragged into the interface opened by the first format file editing software when the first format file editing software is in the opened state, and if so, the second format file is converted into the first format file. Therefore, when the method provided by the embodiment of the invention is used for converting the file format, the second format file can be converted into the first format file only by dragging the second format file into the interface opened by the first format file editing software; the method and the device have the advantages that the format conversion tool is not required to be downloaded and installed firstly, and then the conversion of the file format can be completed by means of the format conversion tool, so that the problems that the operation is complex and the use difficulty is high when the file format conversion is carried out in the prior art are solved.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the file format conversion methods described above.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the file format conversion methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (12)

1. A method of converting a file format, the method comprising:
when the first format file editing software is in an open state, detecting whether a second format file is dragged into an interface opened by the first format file editing software; wherein the second format is a different file format than the first format;
If so, converting the second format file into the first format file under the condition that the user selects to convert the document, or not converting the second format file into the first format file under the condition that the user selects not to convert the document;
The step of detecting whether the second format file is dragged into the interface opened by the first format file editing software comprises the following steps:
Detecting whether a notification that a file sent by a system is dragged into an interface opened by first format file editing software is received;
When the notification is detected, reading the suffix name of the dragged file;
Judging whether the file format of the dragged file is different from the first format according to the suffix name;
If the file format of the dragged file is different from the first format, determining that a file with a second format is dragged into an interface opened by the first format file editing software;
The step of converting the second format file into the first format file includes:
Determining a file conversion algorithm for converting the second format file into the first format file from a plurality of file conversion algorithms for converting the pre-stored files with different formats into the first format file according to the file format of the second format file;
And converting the second format file into the first format file according to a file conversion algorithm for converting the determined second format file into the first format file.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The first format file editing software is PDF file editing software; the second format file is: one of a word document, an Excel document, a PPT document, or a TXT document;
The step of converting the second format document into the first format document according to the determined algorithm for converting the second format document into the first format document comprises the following steps:
Converting the word document into a PDF document according to a preset algorithm for converting the word document into the PDF document; or converting the Excel document into a PDF document according to a preset algorithm for converting the Excel document into the PDF document; or converting the PPT document into a PDF document according to a preset algorithm for converting the PPT document into the PDF document; or converting the TXT document into a PDF document according to a preset algorithm for converting the TXT document into the PDF document.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The first format file editing software is PDF file editing software; the second format document is: an audio file containing speech;
The step of converting the second format document into the first format document according to the determined algorithm for converting the second format document into the first format document comprises the following steps:
and converting the audio file containing the voice into a PDF document according to a preset algorithm for converting the audio file containing the voice into the PDF document.
4. The method of claim 1, wherein the step of determining the position of the substrate comprises,
Before the step of converting the second format file into the first format file, the method further comprises:
Outputting prompt information whether to convert the second format file into the first format file;
And after receiving the confirmation information input by the user, executing the step of converting the second format file into the first format file.
5. The method of claim 1, wherein the step of determining the position of the substrate comprises,
After the step of converting the second format file into the first format file, the method further comprises:
opening the converted file; or, storing the converted file;
After the step of opening the converted file, further comprising:
and receiving an instruction for saving the file triggered by the user, and saving the file according to the instruction.
6. A file format conversion apparatus, the apparatus comprising:
the detection module is used for detecting whether the second format file is dragged into an interface opened by the first format file editing software when the first format file editing software is in an opened state; wherein the second format is a different file format than the first format;
The conversion module is used for detecting that the second format file is dragged into an interface opened by the first format file editing software, and converting the second format file into the first format file under the condition that a user selects to convert a document or not converting the second format file into the first format file under the condition that the user selects not to convert the document;
wherein, detection module includes:
The receiving sub-module is used for detecting whether a notification that a file sent by the system is dragged to an interface opened by the first format file editing software is received or not;
the reading sub-module is used for reading the suffix name of the dragged file when the notification is detected;
the judging sub-module is used for judging whether the file format of the dragged file is different from the first format according to the suffix name;
The determining submodule is used for determining that a file with a second format is dragged into an interface opened by the first format file editing software when the file format of the dragged file is different from the first format;
The conversion module comprises:
The determining submodule is used for determining a file conversion algorithm for converting the second format file into the first format file from a plurality of file conversion algorithms for converting the pre-stored files with different formats into the first format file according to the file format of the second format file;
And the conversion sub-module is used for converting the second format file into the first format file according to a file conversion algorithm for converting the determined second format file into the first format file.
7. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
The first format file editing software is PDF file editing software; the second format file is: one of a word document, an Excel document, a PPT document, or a TXT document;
The conversion submodule is specifically configured to:
Converting the word document into a PDF document according to a preset algorithm for converting the word document into the PDF document; or converting the Excel document into a PDF document according to a preset algorithm for converting the Excel document into the PDF document; or converting the PPT document into a PDF document according to a preset algorithm for converting the PPT document into the PDF document; or converting the TXT document into a PDF document according to a preset algorithm for converting the TXT document into the PDF document.
8. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
The first format file editing software is PDF file editing software; the second format document is: an audio file containing speech;
The conversion submodule is specifically configured to:
and converting the audio file containing the voice into a PDF document according to a preset algorithm for converting the audio file containing the voice into the PDF document.
9. The apparatus of claim 6, the apparatus further comprising:
The prompting module is used for outputting prompting information whether the second format file is converted into the first format file or not before the step of converting the second format file into the first format file;
The conversion module is specifically configured to execute the step of converting the second format file into the first format file after receiving the confirmation information input by the user.
10. The apparatus of claim 6, the apparatus further comprising:
The opening module is used for opening the converted file;
The storage module is used for storing the converted file;
The storage module is also used for receiving an instruction triggered by a user to store the file after the converted file is opened, and storing the file according to the instruction.
11. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
A processor for carrying out the method steps of any one of claims 1-5 when executing a program stored on a memory.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-5.
CN201811022818.8A 2018-09-03 2018-09-03 File format conversion method and device, electronic equipment and storage medium Active CN110874522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811022818.8A CN110874522B (en) 2018-09-03 2018-09-03 File format conversion method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811022818.8A CN110874522B (en) 2018-09-03 2018-09-03 File format conversion method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110874522A CN110874522A (en) 2020-03-10
CN110874522B true CN110874522B (en) 2024-04-30

Family

ID=69716185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811022818.8A Active CN110874522B (en) 2018-09-03 2018-09-03 File format conversion method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110874522B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862536A (en) * 2006-03-24 2006-11-15 珠海金山软件股份有限公司 Apparatus and method for generating PDF document
KR20080052855A (en) * 2006-12-08 2008-06-12 에스케이 텔레콤주식회사 Personalized service method for converting of multimedia file format and multimedia format conversion server
CN102053952A (en) * 2009-11-10 2011-05-11 英华达(上海)电子有限公司 Method and device for converting data format of electronic book and portable electronic book reader
CN105354254A (en) * 2015-10-21 2016-02-24 杭州施强网络科技有限公司 Method for converting document file format by using node server
CN106528744A (en) * 2016-10-28 2017-03-22 宁德时代新能源科技股份有限公司 Format conversion method and system
JP2018036972A (en) * 2016-09-01 2018-03-08 ポップコーンサー コー リミテッド File format converter and conversion method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3871210B2 (en) * 2002-09-19 2007-01-24 ソニー株式会社 CONVERTING APPARATUS, CONVERTING METHOD, PROGRAM, AND DATA STRUCTURE
US8259338B2 (en) * 2004-09-21 2012-09-04 Samsung Electronics Co., Ltd. Image forming apparatus and method of file conversion
CN100356372C (en) * 2005-12-31 2007-12-19 无锡永中科技有限公司 Generating method of computer format document and opening method
CN105224510B (en) * 2015-09-21 2021-07-09 杭州施强教育科技有限公司 Method for converting file in document format

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862536A (en) * 2006-03-24 2006-11-15 珠海金山软件股份有限公司 Apparatus and method for generating PDF document
KR20080052855A (en) * 2006-12-08 2008-06-12 에스케이 텔레콤주식회사 Personalized service method for converting of multimedia file format and multimedia format conversion server
CN102053952A (en) * 2009-11-10 2011-05-11 英华达(上海)电子有限公司 Method and device for converting data format of electronic book and portable electronic book reader
CN105354254A (en) * 2015-10-21 2016-02-24 杭州施强网络科技有限公司 Method for converting document file format by using node server
JP2018036972A (en) * 2016-09-01 2018-03-08 ポップコーンサー コー リミテッド File format converter and conversion method thereof
CN106528744A (en) * 2016-10-28 2017-03-22 宁德时代新能源科技股份有限公司 Format conversion method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陆芳 等.《数字化学习》.广州:华南理工大学出版社,2018,第124-134页. *

Also Published As

Publication number Publication date
CN110874522A (en) 2020-03-10

Similar Documents

Publication Publication Date Title
US10831703B2 (en) Displaying changes to versioned files
CA3059709A1 (en) Risk analysis method, device and computer readable medium
CN110865898B (en) Method, device, medium and equipment for converging crash call stack
US20130226925A1 (en) Intelligent product feedback analytics tool
CN107729452B (en) Webpage loading method and device, electronic equipment and computer readable storage medium
CN111444750B (en) PDF document identification method and device and electronic equipment
US10630399B2 (en) Testing distributed applications that have an established exchange in an advanced message queuing protocol (AMQP) message broker
CN110096590A (en) A kind of document classification method, apparatus, medium and electronic equipment
CN110445632B (en) Method and device for preventing client from crashing
CN110569924A (en) Icon processing method and device, readable storage medium and computer equipment
CN110347984B (en) Policy page changing method and device, computer equipment and storage medium
CN110874522B (en) File format conversion method and device, electronic equipment and storage medium
CN109976828B (en) Method and device for configuring file
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN111563364B (en) Chapter title style conversion method and device, electronic equipment and storage medium
CN109871361B (en) File uploading method and device, electronic equipment and readable storage medium
CN108845845B (en) Shortcut key creation method and device, electronic equipment and storage medium
CN111046635A (en) Method and device for manufacturing freemarker template, computer equipment and storage medium
CN110928470B (en) Signature box display method and device, electronic equipment and storage medium
CN111191427A (en) PDF document annotation method and device and electronic equipment
CN111414627A (en) File opening mode conversion method and device, electronic equipment and storage medium
CN115422131B (en) Business audit knowledge base retrieval method, device, equipment and computer readable medium
CN112016081B (en) Method, device, medium and electronic equipment for realizing identifier mapping
CN113780513B (en) Network model quantization and reasoning method and device, electronic equipment and storage medium
CN110888699A (en) Document name display method and device, electronic equipment and storage medium

Legal Events

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