CN116089362A - Document conversion method and system, live broadcast system, storage medium and electronic device - Google Patents

Document conversion method and system, live broadcast system, storage medium and electronic device Download PDF

Info

Publication number
CN116089362A
CN116089362A CN202310200630.2A CN202310200630A CN116089362A CN 116089362 A CN116089362 A CN 116089362A CN 202310200630 A CN202310200630 A CN 202310200630A CN 116089362 A CN116089362 A CN 116089362A
Authority
CN
China
Prior art keywords
conversion
document
state
file
user side
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310200630.2A
Other languages
Chinese (zh)
Other versions
CN116089362B (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 Vhall Time Technology Co ltd
Original Assignee
Beijing Vhall Time 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 Vhall Time Technology Co ltd filed Critical Beijing Vhall Time Technology Co ltd
Priority to CN202310200630.2A priority Critical patent/CN116089362B/en
Publication of CN116089362A publication Critical patent/CN116089362A/en
Application granted granted Critical
Publication of CN116089362B publication Critical patent/CN116089362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a document conversion method and system, a live broadcast system, a storage medium and electronic equipment. The document conversion method comprises the steps of judging the conversion state of a document uploaded by a user side; based on the conversion state of the document, a conversion file corresponding to the conversion state is acquired, or synchronous type conversion is performed on the document, or type conversion is performed on the document.

Description

Document conversion method and system, live broadcast system, storage medium and electronic device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a document conversion method and system, a live broadcast system, a storage medium, and an electronic device.
Background
With the development of internet technology and new media technology, live broadcast has become more and more widely used. In some specific live broadcast scenes, such as enterprise live broadcast training, online live broadcast teaching, government and enterprise video live broadcast conference and the like, a document display requirement exists at a talkback end in live broadcast.
The speaker can convert the PPT, word, PDF documents uploaded by the user into an HTML page format or a picture format (such as JPG, NPG format, etc.) friendly to the front-end display page and convenient for editing processing, so as to perform front-end display.
However, the inventor of the present application found that, in the conventional document conversion method at present, after receiving the document uploaded by the user, the document is converted one by one according to the number of pages of the document, and in the case that the current document is a repeated document, the document still needs to be converted again.
Therefore, the inventor of the application considers that the current document conversion method has the problems of low conversion efficiency, low conversion speed and incapability of meeting the requirement of instant conversion of users, and the current document conversion method needs to be optimized.
Disclosure of Invention
The application discloses a document conversion method and system, a live broadcast system, a storage medium and electronic equipment.
According to one aspect of the present application, a document conversion method is provided. The document conversion method comprises the steps of judging the conversion state of a document uploaded by a user side; based on the conversion state of the document, a conversion file corresponding to the conversion state is acquired, or synchronous type conversion is performed on the document, or type conversion is performed on the document.
According to some embodiments of the present application, determining a conversion state of a document uploaded by a user side includes: judging whether a state file corresponding to the document exists in the database; if not, determining that the conversion state of the document is an unconverted state; if yes, determining whether the document is consistent with the state file based on a message digest algorithm; if the two states are inconsistent, determining that the conversion state of the document is an unconverted state; if the state file is consistent and the state file is the conversion completion state, determining that the conversion state of the document is the conversion completion state; if the state files are consistent and the state files are in the conversion state, determining that the conversion state of the document is in the conversion state.
According to some embodiments of the present application, based on a conversion state of a document, obtaining a conversion file corresponding to the conversion state includes: under the condition that the conversion state is a conversion success state, obtaining a conversion file corresponding to the conversion success state from a database; and sending the conversion file to the user side.
According to some embodiments of the present application, performing a sync type conversion on a document based on a conversion state of the document includes: under the condition that the conversion state is the conversion state, acquiring a first conversion file of the converted part in the document from a database, and transmitting the first conversion file to a user side; and synchronously uploading a second conversion file of the unconverted part in the document to the user side.
According to some embodiments of the present application, performing a type conversion on a document based on a conversion state of the document includes: preprocessing the document to obtain a split document under the condition that the conversion state is an unconverted state; carrying out static conversion on the split document according to the file type of the document to obtain a static conversion file, or carrying out dynamic conversion to obtain a dynamic conversion file; and sending the static conversion file or the dynamic conversion file to the user side.
According to one aspect of the present application, a document conversion system is provided. The document conversion system comprises a document state judging unit and a document conversion processing unit, wherein the document state judging unit judges the conversion state of a document uploaded by a user side; and a document conversion processing unit that acquires a conversion file corresponding to the conversion state based on the conversion state of the document, or performs synchronous type conversion on the document, or performs type conversion on the document.
According to some embodiments of the present application, the document state judging unit judges whether a state file corresponding to a document exists in the database; in the case that it is judged that the state file corresponding to the document does not exist in the database, the document state judgment unit determines that the conversion state of the document is an unconverted state; in the case that the state file corresponding to the document exists in the database, the document state judging unit determines whether the document is completely consistent with the state file based on the information summarization algorithm; if the two states are inconsistent, the document state judging unit determines that the conversion state of the document is an unconverted state; if the state file is completely consistent and the state file is the conversion completion state, the document state judging unit determines that the conversion state of the document is the conversion completion state; if the state file is completely identical and the state file is in the transition state, the document state judging unit determines that the transition state of the document is in the transition state.
According to some embodiments of the present application, when the conversion status is a conversion success status, the document conversion processing unit obtains a conversion file corresponding to the conversion success status from the database, and sends the conversion file to the user side.
According to some embodiments of the present application, in a case where the conversion state is in the converting state, the document conversion processing unit obtains a first converted document of the converted portion in the document from the database, and sends the first converted document to the user side; the document conversion processing unit also synchronously uploads a second conversion file of the unconverted part of the document to the user side.
According to some embodiments of the present application, the document conversion processing unit further includes a preprocessing unit, a static conversion unit, and a dynamic conversion unit. The preprocessing unit preprocesses the document under the condition that the conversion state is an unconverted state so as to obtain a split document; the preprocessing unit distributes the split document to one or more static conversion units or to one or more dynamic conversion units according to the file type of the document; the static conversion unit performs static conversion on the split document to obtain a static conversion file, and sends the static conversion file to the user side; the dynamic conversion unit dynamically converts the split document to obtain a dynamic conversion file, and sends the dynamic conversion file to the user side.
According to yet another aspect of the present application, the present application further provides a live broadcast system. The live system includes a document conversion system as described above.
According to yet another aspect of the present application, there is also provided a non-transitory computer readable storage medium. The storage medium has stored thereon a computer program which can implement the document conversion method as described above.
According to yet another aspect of the present application, an electronic device is also provided. The electronic device comprises one or more processors and storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the document conversion method as described above.
According to the technical scheme, the conversion state of the document uploaded by the user side is judged, and the conversion file corresponding to the conversion state is acquired based on the conversion state of the document, or the synchronous type conversion is carried out on the document, or the type conversion is carried out on the document. So that different file conversion schedules are executed according to the conversion state of the document, repeated conversion of the document can be avoided and the document conversion efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a flow diagram of a document conversion method according to an example embodiment of the present application;
FIG. 2 shows a decision flow chart of a transition state according to an example embodiment of the present application;
FIG. 3 shows yet another flow diagram of a document conversion method of an example embodiment of the present application;
FIG. 4 shows yet another flow diagram of a document conversion method of an example embodiment of the present application;
FIG. 5 shows yet another flow diagram of a document conversion method of an example embodiment of the present application;
FIG. 6 shows a conversion flow diagram of a static conversion side according to an example embodiment of the present application;
FIG. 7 shows a conversion flow diagram of a dynamic conversion side according to an example embodiment of the present application;
fig. 8 shows a schematic structural diagram of a document conversion system according to an exemplary embodiment of the present application.
Reference numerals illustrate:
a document conversion system 1; a document state judging unit 10; a document conversion processing unit 20; a preprocessing unit 21; a static conversion unit 22; a dynamic conversion unit 23.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the disclosed aspects may be practiced without one or more of the specific details, or with other methods, components, materials, apparatus, etc. In these instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail.
Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order.
The following description of the embodiments of the present application, taken in conjunction with the accompanying drawings, will clearly and fully describe the technical aspects of the present application, and it will be apparent that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
According to the document conversion method, different file conversion schedules can be executed according to the conversion state of the document, repeated conversion of the document can be avoided, and the document conversion efficiency can be improved.
The technical scheme of the application will be described in detail below with reference to the accompanying drawings.
Fig. 1 shows a flow diagram of a document conversion method according to an exemplary embodiment of the present application. As shown in FIG. 1, the document conversion method includes steps S100 to S200. According to an example embodiment, the document conversion method is performed by a document conversion system. For example, the document conversion system is a subsystem of a live terminal in the live system and is used for performing document conversion processing.
In step S100, the document conversion system determines the conversion status of the document uploaded by the user side.
For example, in the live field, the user side may be a live side in a live system. When the document display requirement exists in the live broadcast, the live broadcast terminal uploads a document of a certain type (such as PPT, word, PDF document of the type). The document conversion system acquires the document from the server in a pulling way and performs type conversion on the document to obtain files of the types such as HTML page format or picture format (such as JPG, NPG format and the like) which are friendly to front-end display pages and convenient to edit.
According to an example embodiment, after the document conversion system completes the document conversion for a specified document, a state file corresponding to the converted file is generated in a database such as Redis (Remote Dictionary Server: remote dictionary service).
Fig. 2 shows a flowchart of determination of a transition state according to an exemplary embodiment of the present application.
Optionally, as shown in fig. 2, step S100 includes steps S110 to S115.
In step S110, the document conversion system determines whether or not a status file corresponding to the document exists in the database. If the state file corresponding to the document does not exist in the database, the step S111 is entered; if a status file corresponding to the document exists in the database, the process proceeds to step S112.
In step S111, the document conversion system determines that the conversion state of the document is an unconverted state.
In step S112, the document conversion system determines whether the document is completely identical to the status file based on the information digest algorithm (MD 5). If the document does not coincide with the status file, the process proceeds to step S111, where the document conversion system determines that the conversion status of the document is an unconverted status.
If the document is completely identical to the status file, it proceeds to S113. In step S113, the document conversion system determines whether the state of the state file is a conversion completed state or a conversion-in state. If the state of the state file is the transition completion state, the process proceeds to step S114, otherwise, the process proceeds to step S115.
In step S114, the document conversion system determines that the conversion state of the document is the conversion completion state.
In step S115, the document conversion system determines that the conversion state of the document is in the conversion state.
Through the above example embodiment, the technical solution of the present application determines whether the current document is a repeated conversion task by determining whether a state file corresponding to the document is stored in the database and determining whether the document is completely consistent with the state file based on the information abstraction algorithm (MD 5), so as to obtain a conversion state of the document in the document conversion system, so as to facilitate scheduling of subsequent document conversion.
In step S200, the document conversion system acquires a conversion file corresponding to the conversion state based on the conversion state of the document, or performs synchronous type conversion on the document, or performs type conversion on the document.
According to an example embodiment, after a document conversion system determines a conversion state of a document, different file type conversion schedules are executed based on the conversion state of the document.
Fig. 3 shows still another flow diagram of a document conversion method according to an exemplary embodiment of the present application.
Optionally, as shown in fig. 3, in step S200, the document conversion system obtains a conversion file corresponding to the conversion state based on the conversion state of the document, including steps S210 to S211.
In step S210, the document conversion system acquires a conversion file corresponding to the conversion success state from the database in the case where the document is in the conversion success state.
In step S211, the document conversion system transmits the conversion file to the user side.
For example, after the document conversion system determines that the conversion state of the document is a conversion success state, a document path (such as an HTML path and a JPG path) that the document has been converted successfully is obtained from the Redis, and the conversion file that has been converted successfully is directly returned to the front end through the document path.
Through the above example embodiment, in the case that the document uploaded by the user terminal is the previously converted document, the corresponding conversion file can be displayed on the user terminal in real time, so that the user does not need to wait, repeated conversion of the document can be avoided, and the conversion efficiency is improved.
Fig. 4 shows still another flow diagram of a document conversion method according to an exemplary embodiment of the present application.
Alternatively, as shown in FIG. 4, in step S200, the document conversion system performs synchronous type conversion on the document based on the conversion state of the document, including steps S220 to S221.
In step S220, the document conversion system acquires a first converted document of the converted portion of the document from the database and transmits the first converted document to the user side in the case where the document is in the conversion state.
For example, after the document conversion system determines that the document is in a conversion state, the document path (such as an HTML path and a JPG path) of the successfully converted part of the document is obtained from the Redis, and the first converted file (such as the number of pages in the document that have been converted) of which the part has been successfully converted is directly returned to the front end through the document path.
In step S221, the document conversion system synchronously uploads the second converted file of the unconverted portion in the document to the user side.
For example, the document conversion system determines that the conversion state of the document uploaded by the current user side is in the conversion state, that is, the document is a duplicate document with the documents uploaded by other user sides, and the documents uploaded by other user sides are in the conversion state. The document conversion system sends the converted file of the part (for example, the first 50 pages of the document) which has been successfully converted (for example, the number of pages of the document is 100 pages) as a first converted file to the user side, so that after the current user side uploads the file, at least part of conversion results can be obtained, and the waiting time of the user is reduced.
The document conversion system also writes document conversion information of the first conversion file (for example, the number of converted pages of the first conversion file) into the database, and pushes the conversion status of the document to the user side.
In the process that the documents uploaded by other clients continue to be converted, the unconverted part (such as the last 50 pages of the document) in the documents can continue to form a conversion file, the document conversion system takes the conversion file as a second conversion file, and synchronously uploads the second conversion file to the clients while the documents uploaded by other clients continue to be converted.
Through the above example embodiments, according to the technical solution of the present application, when a document uploaded by a user terminal is in a converting state, the document conversion system may directly display a converted partial conversion file before the front end. And the document conversion system also carries out synchronous type conversion on the rest unconverted part of files so as to enable document display and document conversion to be carried out simultaneously, thereby avoiding repeated conversion and improving the document conversion efficiency.
Fig. 5 shows still another flow diagram of a document conversion method according to an exemplary embodiment of the present application.
Alternatively, as shown in FIG. 5, in step S200, the document conversion system performs type conversion on the document based on the conversion state of the document, including steps S230 to S232.
In step S230, the document conversion system pre-processes the document to obtain a split document in the case where the document is in an unconverted state.
For example, the document conversion system pre-processes a document, splits the document (e.g., PPT, word, PDF, etc.) into single page documents based on page number information of the document, and generates split document information.
Taking a PPT document as an example, the document conversion system calls a document segmentation command to segment the PPT document based on a callback function, saves the total page number of the PPT document into a Redis state file, and saves the segmented single page document to a server.
In step S231, the split document is statically converted according to the file type of the document to obtain a static conversion file, or dynamically converted to obtain a dynamic conversion file.
For example, the document conversion system judges the file type of the document, and the document conversion system performs static conversion on the document suitable for conversion into a static conversion file, such as a WORD document and a PDF document; the document conversion system dynamically converts documents, such as PPT documents, that are adapted to be converted into dynamic conversion files.
In step S232, the document conversion system sends the static conversion file or the dynamic conversion file to the user terminal, and performs task reporting.
For example, the document conversion system returns the user side ID, the document ID, the number of successfully converted document pages and the conversion state of a certain page of a specified document through a call-back interface appointed by the call-back interface according to the user side ID and the document ID so as to facilitate interaction with the user side.
According to an example embodiment, a document conversion system includes a plurality of static conversion ends and a plurality of dynamic conversion ends. The document conversion system also obtains the resource use conditions in the static conversion end and the dynamic conversion end, and distributes the single page documents obtained by splitting to the conversion end with less idle or conversion tasks uniformly according to the resource use conditions of the conversion end so as to perform static conversion or dynamic conversion. Therefore, the simultaneous conversion of each single page document can be realized, the resource utilization rate of a conversion end is improved, and the cost of hardware configuration is reduced.
Fig. 6 shows a conversion flow diagram of a static conversion side according to an example embodiment of the present application. As shown in FIG. 6, the conversion flow chart of the static conversion end includes steps S310 to S315.
In step S310, the static conversion terminal receives split documents of a plurality of individual pages.
In step S311, the static conversion terminal converts the document of the corresponding number of pages into a picture.
In step S312, the static conversion end stores the picture to the server.
In step S313, the static conversion terminal sets and stores the dis data of the hash type of the current document.
In step S314, the static conversion end acquires the current document conversion report queue.
In step S315, the static conversion end reports the current conversion result through an interface callback according to the document report queue.
Fig. 7 shows a conversion flowchart of a dynamic conversion side according to an exemplary embodiment of the present application. As shown in FIG. 7, the conversion flow chart of the dynamic conversion end includes steps S410 to S415.
In step S410, the dynamic switching end receives split documents of a plurality of individual pages.
In step S411, the dynamic conversion side converts the document of the corresponding number of pages into an HTML page.
In step S412, the dynamic conversion terminal stores the HTML page to the server.
In step S413, the dynamic conversion side sets and stores the dis data of the hash type of the current document.
In step S414, the dynamic conversion end acquires the current document conversion report queue.
In step S415, the dynamic conversion end reports the current conversion result through the interface callback according to the document report queue.
Through the above example embodiments, according to the technical solution of the present application, different file conversion schedules are executed based on the conversion states of the documents uploaded by the user side, so that repeated conversion of the documents can be avoided. By preprocessing the document to obtain a single-page split document, and converting the document based on the single-page split document, the successfully converted document content can be directly displayed at the user side without waiting for the completion of the whole document conversion, so that the waiting time of the user is saved, and the document conversion efficiency is improved.
Another aspect of the present application provides a document conversion system that can perform different file conversion schedules according to a conversion state of a document, can avoid repeated conversion of the document, and can improve document conversion efficiency.
Fig. 8 shows a schematic structural diagram of a document conversion system according to an exemplary embodiment of the present application. As shown in fig. 8, the document conversion system 1 includes a document state judging unit 10 and a document conversion processing unit 20.
According to an exemplary embodiment, the document state judging unit 10 judges the transition state of the document uploaded by the user side.
For example, in the live field, the user side may be a live side in a live system. When the document display requirement exists in the live broadcast, the live broadcast terminal uploads a document of a certain type (such as PPT, word, PDF document of the type). The document status judging unit 10 acquires the document from the server pull stream and performs type conversion on the document to obtain a file of a type such as an HTML page format or a picture format (e.g., JPG, NPG format, etc.) which is friendly to the front-end display page and facilitates editing processing.
According to an example embodiment, after the document conversion system completes the document conversion for a specified document, a state file corresponding to the converted file is generated in a database such as Redis (Remote Dictionary Server: remote dictionary service).
Alternatively, the document state judging unit 10 judges whether or not a state file corresponding to a document exists in the database. In the case where it is determined that the state file corresponding to the document does not exist in the database, the document state determination unit 10 determines that the converted state of the document is the unconverted state.
In the case where it is judged that the status file corresponding to the document exists in the database, the document status judging unit 10 determines whether the document coincides with the status file based on the information digest algorithm (MD 5).
If it is judged that the document is not consistent with the state file, the document state judgment unit 10 determines that the converted state of the document is an unconverted state; if it is judged that the document is identical to the state file and the state file is the conversion completion state, the document state judgment unit 10 determines that the conversion state of the document is the conversion completion state; if it is determined that the document is consistent with the state file and the state file is in the converting state, the document state determining unit 10 determines that the converting state of the document is in the converting state.
Through the above example embodiment, the technical solution of the present application determines whether the current document is a repeated conversion task by determining whether a state file corresponding to the document is stored in the database and determining whether the document is completely consistent with the state file based on the information abstraction algorithm (MD 5), so as to obtain a conversion state of the document in the document conversion system, so as to facilitate scheduling of subsequent document conversion.
According to an exemplary embodiment, the document conversion processing unit 20 acquires a conversion file corresponding to a conversion state based on the conversion state of a document, or performs synchronous type conversion on the document, or performs type conversion on the document.
For example, after the document conversion system determines the conversion state of the document, different file type conversion schedules are executed based on the conversion state of the document.
Alternatively, in the case where the conversion state is the conversion success state, the document conversion processing unit 20 acquires a conversion file corresponding to the conversion success state from the database, and transmits the conversion file to the user side.
For example, after the document state judgment unit 10 judges that the conversion state of the document is the conversion success state, the document conversion processing unit 20 acquires a document path (such as an HTML path and a JPG path) in which the document has been converted successfully from the dis, and returns the converted file of the conversion success directly to the front end through the document path.
Through the above example embodiment, in the case that the document uploaded by the user terminal is the previously converted document, the corresponding conversion file can be displayed on the user terminal in real time, so that the user does not need to wait, repeated conversion of the document can be avoided, and the conversion efficiency is improved.
Alternatively, in the case where the conversion state is the in-conversion state, the document conversion processing unit 20 acquires the first converted document of the converted completed portion in the document from the database, and sends the first converted document to the user side.
For example, after the document state judgment unit 10 judges that the document is in the conversion state, the document conversion processing unit 20 acquires a document path (e.g., HTML path and JPG path) in which the document has been partially converted from the dis, and returns the first converted file (e.g., the number of pages in the document that have been converted) in which the partial conversion has been successful directly to the front end through the document path.
The document conversion processing unit 20 also synchronously uploads the second converted file of the unconverted portion in the document to the user side.
For example, the document conversion processing unit 20 determines that the conversion state of the document uploaded by the current user side is in the conversion state, that is, the document is a duplicate document with the documents uploaded by other user sides, and the documents uploaded by other user sides are in the conversion state. The document conversion processing unit 20 transmits the converted file of the portion (for example, the first 50 pages of the document) of the document (for example, the number of pages of the document is 100 pages) that has been converted successfully as the first converted file to the user side, so that the current user side can obtain at least part of the conversion result after uploading the file, thereby reducing the waiting time of the user.
The document conversion processing unit 20 also writes document conversion information of the first conversion file (for example, the number of converted pages of the first conversion file) in the database, and pushes the conversion status of the document to the user side.
In the process that the document uploaded by the other user side continues to be converted, the unconverted part (for example, the last 50 pages of the document) in the document will continue to form a conversion file, the document conversion processing unit 20 takes the conversion file as a second conversion file, and synchronously uploads the second conversion file to the user side while the document uploaded by the other user side continues to be converted.
Through the above-mentioned example embodiments, in the case that the document uploaded by the user terminal is in the converting state, the technical solution of the present application may enable the document conversion processing unit 20 to directly display the converted partial conversion file before the front end. And the document conversion processing unit 20 also performs synchronous type conversion on the remaining unconverted portion of the document so that document display and document conversion are performed simultaneously, thereby reducing waiting time of a user and improving document conversion efficiency.
Alternatively, as shown in fig. 8, the document conversion processing unit 20 further includes a preprocessing unit 21, a static conversion unit 22, and a dynamic conversion unit 23.
According to an example embodiment, the document conversion processing unit 20 may include a plurality of static conversion terminals 22 and a plurality of dynamic conversion terminals 23.
The preprocessing unit 21 performs preprocessing on the document to obtain a split document in the case where the conversion state is the unconverted state.
For example, the preprocessing unit 21 preprocesses a document, splits the document (e.g., PPT, word, PDF, etc.) into single-page documents based on page number information of the document, and generates split document information.
Taking a PPT document as an example, the preprocessing unit 21 calls a document splitting command to split the PPT document based on a callback function, saves the total page number of the PPT document in a Redis state file, and saves the split single page document to a server.
The preprocessing unit 21 also distributes the split document to one or more static conversion units 22 or to one or more dynamic conversion units 23 according to the file type of the document.
For example, the preprocessing unit 21 judges the file type of the document, and the preprocessing unit 21 dispatches split pages of the document suitable for conversion into a static conversion file to one or more static conversion units 22, such as a WORD document and a PDF document; the preprocessing unit 21 dispatches split pages of a document suitable for conversion into a dynamic conversion file to one or more dynamic conversion units 23, such as PPT documents.
According to an example embodiment, the static conversion unit 22 performs static conversion on the split document to obtain a static conversion file, and transmits the static conversion file to the user side.
For example, the static conversion unit 22 receives split documents of a plurality of individual pages, converts the documents of the corresponding pages into pictures, and stores the pictures to the server. The static conversion unit 22 also stores the Redis data of the hash type of the current document, acquires the current document conversion report queue, reports the current conversion result through an interface callback according to the document report queue.
According to an example embodiment, the dynamic conversion unit 23 dynamically converts the split document to obtain a dynamic conversion file, and transmits the dynamic conversion file to the user side.
For example, the dynamic conversion unit 23 receives split documents of a plurality of individual pages, converts the document of the corresponding number of pages into HTML pages, and stores the HTML pages to the server. The static conversion unit 22 also stores the Redis data of the hash type of the current document, acquires the current document conversion report queue, reports the current conversion result through an interface callback according to the document report queue.
For example, the static conversion unit 22 or the dynamic conversion unit returns the user ID, the document ID, the number of pages of the document that are successfully converted at present, and the conversion status of a certain page of the specified document through the call-back interface agreed according to the user ID and the document ID, so as to facilitate interaction with the user.
According to an exemplary embodiment, the preprocessing unit 21 also acquires resource usage of the static conversion unit 22 and the dynamic conversion unit 23. The preprocessing unit 21 uniformly distributes the single page documents obtained by splitting to the conversion end with less idle or conversion tasks according to the resource use condition of the conversion end so as to perform static conversion or dynamic conversion. Therefore, the simultaneous conversion of each single page document can be realized, the resource utilization rate of a conversion end is improved, and the cost of hardware configuration is reduced.
Through the above example embodiments, according to the technical solution of the present application, different file conversion schedules are executed based on the conversion states of the documents uploaded by the user side, so that repeated conversion of the documents can be avoided. By preprocessing the document to obtain a single-page split document, and converting the document based on the single-page split document, the successfully converted document content can be directly displayed at the user side without waiting for the completion of the whole document conversion, so that the waiting time of the user is saved, and the document conversion efficiency is improved.
According to yet another aspect of the present application, the present application further provides a live broadcast system. The live system includes a document conversion system as described above.
According to yet another aspect of the present application, there is also provided a non-transitory computer readable storage medium. The storage medium has stored thereon a computer program which can implement the document conversion method as described above.
According to yet another aspect of the present application, an electronic device is also provided. The electronic device comprises one or more processors and storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the document conversion method as described above.
Finally, it should be noted that the foregoing description is only a preferred embodiment of the present application, and is not intended to limit the present application, and although the detailed description of the present application is given with reference to the foregoing embodiment, it will be obvious to those skilled in the art that various modifications may be made to the technical solutions of the foregoing embodiments, or that equivalents may be substituted for some of the technical features thereof. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (13)

1. A document conversion method, comprising:
judging the conversion state of the document uploaded by the user side;
based on the conversion state of the document, a conversion file corresponding to the conversion state is acquired, or synchronous type conversion is performed on the document, or type conversion is performed on the document.
2. The method for converting a document according to claim 1, wherein said determining a conversion status of a document uploaded by a user terminal includes:
judging whether a state file corresponding to the document exists in a database or not;
if not, determining that the conversion state of the document is an unconverted state;
if so, determining whether the document is consistent with the state file based on a message digest algorithm;
if the states are inconsistent, determining that the conversion state of the document is an unconverted state;
if the state file is consistent and the state file is the conversion completion state, determining that the conversion state of the document is the conversion completion state;
if the state files are consistent and the state files are in the conversion state, the conversion state of the document is determined to be in the conversion state.
3. The document conversion method according to claim 2, wherein the acquiring a conversion file corresponding to a conversion state based on the conversion state of the document includes:
under the condition that the conversion state is the conversion success state, obtaining a conversion file corresponding to the conversion success state from a database;
and sending the conversion file to the user side.
4. The document conversion method according to claim 2, wherein the performing synchronous type conversion on the document based on the conversion state of the document includes:
under the condition that the conversion state is the conversion state, acquiring a first conversion file of the converted part in the document from a database, and sending the first conversion file to the user side;
and synchronously uploading a second conversion file of the unconverted part in the document to the user side.
5. The document conversion method according to claim 2, wherein the performing type conversion on the document based on the conversion state of the document includes:
preprocessing the document to obtain a split document under the condition that the conversion state is an unconverted state;
carrying out static conversion on the split document according to the file type of the document to obtain a static conversion file, or carrying out dynamic conversion to obtain a dynamic conversion file;
and sending the static conversion file or the dynamic conversion file to the user side.
6. A document conversion system, comprising:
a document state judging unit for judging the conversion state of the document uploaded by the user side;
and a document conversion processing unit that acquires a conversion file corresponding to the conversion state based on the conversion state of the document, or performs synchronous type conversion on the document, or performs type conversion on the document.
7. The document conversion system according to claim 6, wherein the document status judging unit judges whether or not a status file corresponding to the document exists in a database;
the document state judging unit determines that the conversion state of the document is an unconverted state in the case that it is judged that the state file corresponding to the document does not exist in the database;
in the case that the state file corresponding to the document exists in the database, the document state judging unit determines whether the document is consistent with the state file or not based on a message digest algorithm;
if the two states are inconsistent, the document state judging unit determines that the conversion state of the document is an unconverted state;
if the state file is consistent and the state file is the conversion completion state, the document state judging unit determines that the conversion state of the document is the conversion completion state;
if the state file is consistent and the state file is in the conversion state, the document state judging unit determines that the conversion state of the document is in the conversion state.
8. The document conversion system according to claim 7, wherein in the case where the conversion state is the conversion success state, the document conversion processing unit acquires a conversion file corresponding to the conversion success state from a database, and transmits the conversion file to the user side.
9. The document conversion system according to claim 7, wherein in the case where the conversion state is the converting state, the document conversion processing unit acquires a first converted document of the converted portion in the document from a database, and sends the first converted document to the user side;
and the document conversion processing unit synchronously uploads a second conversion file of an unconverted part in the document to the user side.
10. The document conversion system according to claim 7, wherein the document conversion processing unit further includes:
a preprocessing unit, which preprocesses the document to obtain a split document when the conversion state is an unconverted state; the preprocessing unit distributes the split document to one or more static conversion units or one or more dynamic conversion units according to the file type of the document;
the static conversion unit is used for carrying out static conversion on the split document to obtain a static conversion file, and sending the static conversion file to the user side;
and the dynamic conversion unit is used for dynamically converting the split document to obtain a dynamic conversion file and transmitting the dynamic conversion file to the user side.
11. A live broadcast system comprising a document conversion system according to any of claims 6-10.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the document conversion method according to any one of claims 1 to 5.
13. An electronic device, comprising:
one or more processors;
a storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the document transformation method of any one of claims 1 to 5.
CN202310200630.2A 2023-03-06 2023-03-06 Document conversion method and system, live broadcast system, storage medium and electronic device Active CN116089362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310200630.2A CN116089362B (en) 2023-03-06 2023-03-06 Document conversion method and system, live broadcast system, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310200630.2A CN116089362B (en) 2023-03-06 2023-03-06 Document conversion method and system, live broadcast system, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN116089362A true CN116089362A (en) 2023-05-09
CN116089362B CN116089362B (en) 2023-06-20

Family

ID=86214186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310200630.2A Active CN116089362B (en) 2023-03-06 2023-03-06 Document conversion method and system, live broadcast system, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116089362B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020065036A (en) * 2001-02-05 2002-08-13 삼성전자 주식회사 A apparatus and method for converting document
KR20060021186A (en) * 2004-09-02 2006-03-07 에스케이 텔레콤주식회사 Apparatus and method of converting wml to html
CN103116586A (en) * 2011-11-17 2013-05-22 中国电信股份有限公司 Document reading achieving method, terminal, document conversion server and processing system
CN103955401A (en) * 2014-04-29 2014-07-30 南京新模式软件集成有限公司 Method for optimizing on-line preview of electronic document
CN104268211A (en) * 2014-09-23 2015-01-07 河海大学常州校区 Online engineering document to PDF document conversion method
CN109308346A (en) * 2018-08-10 2019-02-05 四川译讯信息科技有限公司 A kind of online picture and text conversion platform
CN110278265A (en) * 2019-06-20 2019-09-24 宜春宜联科技有限公司 Processing method, device, storage medium and the electronic equipment of the upper transmitting file of user
CN111581948A (en) * 2020-04-03 2020-08-25 北京百度网讯科技有限公司 Document analysis method, device, equipment and storage medium
CN114528813A (en) * 2022-01-26 2022-05-24 山东浪潮通软信息科技有限公司 File conversion management method, device, equipment and medium for online preview
CN115169292A (en) * 2022-08-03 2022-10-11 平安付科技服务有限公司 Document processing method and device, electronic equipment and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020065036A (en) * 2001-02-05 2002-08-13 삼성전자 주식회사 A apparatus and method for converting document
KR20060021186A (en) * 2004-09-02 2006-03-07 에스케이 텔레콤주식회사 Apparatus and method of converting wml to html
CN103116586A (en) * 2011-11-17 2013-05-22 中国电信股份有限公司 Document reading achieving method, terminal, document conversion server and processing system
CN103955401A (en) * 2014-04-29 2014-07-30 南京新模式软件集成有限公司 Method for optimizing on-line preview of electronic document
CN104268211A (en) * 2014-09-23 2015-01-07 河海大学常州校区 Online engineering document to PDF document conversion method
CN109308346A (en) * 2018-08-10 2019-02-05 四川译讯信息科技有限公司 A kind of online picture and text conversion platform
CN110278265A (en) * 2019-06-20 2019-09-24 宜春宜联科技有限公司 Processing method, device, storage medium and the electronic equipment of the upper transmitting file of user
CN111581948A (en) * 2020-04-03 2020-08-25 北京百度网讯科技有限公司 Document analysis method, device, equipment and storage medium
CN114528813A (en) * 2022-01-26 2022-05-24 山东浪潮通软信息科技有限公司 File conversion management method, device, equipment and medium for online preview
CN115169292A (en) * 2022-08-03 2022-10-11 平安付科技服务有限公司 Document processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN116089362B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
JP5353148B2 (en) Image information retrieving apparatus, image information retrieving method and computer program therefor
US20150356146A1 (en) Answerer extraction system, answerer extraction method, and non-transitory computer-readable medium
JP2010073114A6 (en) Image information retrieving apparatus, image information retrieving method and computer program therefor
JPH09297748A (en) Device and method for messaging
WO2019019652A1 (en) Push-information processing method, apparatus, computer device, and storage medium
CN104508689A (en) A two-dimension code processing method and a terminal
CN110460514A (en) Message method, device, storage medium and the equipment of instant messaging tools
CN112600750A (en) Method and device for processing multiple pieces of dialogue information in instant messaging
CN116701669A (en) Method, device, equipment and storage medium for generating multimedia content
CN116089362B (en) Document conversion method and system, live broadcast system, storage medium and electronic device
JPH1115723A (en) Multimedia data supplying method and multimedia data server
CN108228843B (en) Internet-based lecture note compression transmission and restoration method
CN111757187A (en) Multi-language subtitle display method, device, terminal equipment and storage medium
CN111866544A (en) Data processing method, device, equipment and computer readable storage medium
CN114969603A (en) 5G message-based picture acquisition and picture generation method and system
CN114222158A (en) Video slicing method and device, computer readable medium and electronic equipment
CN113947166A (en) Questionnaire statistics real-time processing method, system, electronic equipment and storage medium
CN108427685B (en) Automatic response obtaining method of intelligent response system
CN112235633A (en) Output effect adjusting method, device, equipment and computer readable storage medium
CN113900602B (en) Intelligent printing method and system for automatically eliminating target object filling information
CN111476012A (en) Intelligent PPT analysis report generation method in image-text release
CN112565268B (en) Transmission control method, device and equipment of multimedia information and computer storage medium
CN115002502B (en) Data processing method and server
JP7151248B2 (en) SNS server device and SNS system
CN113704652B (en) Data processing method, device, transfer station and data processing system

Legal Events

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