File information management method, system, electronic device and storage medium
By setting display layers and selection layers in the client operation area and rendering PDF files using PDF.js tool, the extraction, selection and real-time display of file information is realized, which solves the problem of difficulty in saving the complete file style and extraction of file information at the same time in the existing technology, and improves the automation and simplification of enterprise file information management.
Patent Information
- Application Number
- CN202110419173.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-19
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-04-19
AI Technical Summary
The prior art is difficult to simultaneously realize the extraction, selection and real-time display of the complete file style and file information in file information management, resulting in insufficient automation and simplification of enterprise file information management.
By setting up a preview layer and annotation layer in the client operation area, and setting up a display layer and a selection layer in the preview layer, the PDF file content is processed and read information, using the PDF.js tool to render the PDF file into canvas, and extracting file information through the span tag, and arranging it in the selection layer to realize the extraction, selection and real-time display of information.
It realizes the extraction, selection and real-time display of file information, while ensuring the retention of file styles, solving the problem that saving the complete file style and exposing text cannot be achieved simultaneously, making enterprise file information management more automated and simplified, and improving file information management efficiency.
Smart Images

Figure CN113515917B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of file information management, and in particular to a file information management method, system, electronic device and storage medium. Background Art
[0002] There are a large number of files in the enterprise, and these file data often contain great value. Extracting information from the files, extracting key information separately, and refining the essentials can greatly improve the efficiency of enterprise file information management and make enterprise information management more automated. Therefore, how to simplify and automate the information management of a large number of enterprise file information has become an urgent problem to be solved.
[0003] In the current file information management process, it is impossible to simultaneously save the complete file style and extract, select, and display file information in real time, resulting in the inability to achieve WYSIWYG from the client's perspective, making enterprise file information management more automated and simplified. Summary of the invention
[0004] The embodiments of the present application provide a file information management method, system, electronic device and storage medium, so as to at least realize the extraction, selection and real-time display of file information through the present invention, and ensure the retention of file styles, thereby greatly improving the efficiency of enterprise file information management.
[0005] The present invention provides a file information management method, comprising:
[0006] Setting step: setting a preview layer and an annotation layer in the client operation area, and setting a display layer and a selection layer in the preview layer;
[0007] A file information extraction step: after rendering the PDF file into a canvas in the display layer, extracting the file information in the canvas, and arranging the extracted file information in the selection layer;
[0008] File information display step: the marking layer is attached to the selected layer, and the file information marked by the client in the selected layer is displayed.
[0009] In the above-mentioned file information management method, the display layer is located below the selection layer.
[0010] In the above-mentioned file information management method, the file information extraction step comprises:
[0011] PDF file processing step: using the PDF.js tool in the presentation layer to render the PDF file into the canvas, and after displaying the canvas on the presentation layer, extracting the file information in the canvas through the span tag;
[0012] File information arrangement step: arranging the size and position of the text in the extracted file information in the selected layer.
[0013] In the above-mentioned file information management method, the marking layer generates a semi-transparent div box on the selection layer, and displays the file information in the canvas manually marked by the client in the selection layer in the div box.
[0014] The present invention also provides a file information management system, which is applicable to the file information management method described above, and the file information management system includes:
[0015] Setting unit: setting a preview layer and an annotation layer in the client operation area, and setting a display layer and a selection layer in the preview layer;
[0016] A file information extraction unit: after rendering the PDF file into a canvas in the presentation layer, extracts the file information in the canvas, and arranges the extracted file information in the selection layer;
[0017] File information display unit: the marking layer is attached to the selection layer, and displays the file information marked by the client in the selection layer.
[0018] The above-mentioned file information management system sets up the display layer below the selection layer through the setting unit.
[0019] In the above-mentioned file information management system, the file information extraction unit comprises:
[0020] PDF file processing module: using the PDF.js tool in the presentation layer to render the PDF file into the canvas, and after displaying the canvas on the presentation layer, extracting the file information in the canvas through the span tag;
[0021] A file information arrangement module arranges the size and position of the characters in the extracted file information in the selected layer.
[0022] In the above-mentioned file information management system, the annotation layer generates a semi-transparent div box on the selection layer, and displays the file information in the canvas manually annotated by the client in the selection layer in the div box through the file information display unit.
[0023] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned file information management methods when executing the computer program.
[0024] The present invention also provides an electronic device readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by the processor, any of the above-mentioned file information management methods is implemented.
[0025] Compared with the related art, the present invention processes and reads information on the PDF file content by setting up a preview layer and an annotation layer in the user operation area, and establishing a display layer and a selection layer in the preview layer, thereby realizing information extraction, selection, and real-time display, while ensuring the retention of the file style, solving the contradiction that the complete style of the file cannot be preserved and the text cannot be exposed at the same time, making the enterprise file information management simpler and more automated, and greatly improving the efficiency of enterprise file information management.
[0026] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0028] Figure 1 is a flow chart of a file information management method according to an embodiment of the present application;
[0029] Figure 2 is a block diagram of a display layer and a selection layer according to an embodiment of the present application;
[0030] Figure 3 It is a structural schematic diagram of the file information management system of the present invention;
[0031] Figure 4 is a framework diagram of an electronic device according to an embodiment of the present application.
[0032] Wherein, the accompanying drawings are marked as follows:
[0033] SetUnit:51;
[0034] File information extraction unit: 52;
[0035] Document information display unit: 53;
[0036] PDF file processing module: 521;
[0037] File information arrangement module: 522;
[0038] Bus:80;
[0039] Processor: 81;
[0040] Memory: 82;
[0041] Communication interface:83. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0043] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the disclosure of the present application, some changes in design, manufacturing or production based on the technical content disclosed in the present application are just conventional technical means, and should not be understood as the disclosure of the present application is insufficient.
[0044] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0046] HTML5 is a language description method for building Web content. HTML5 is designed to support multimedia on mobile devices. Its newly introduced syntax features can support multimedia on mobile devices, such as video, audio and canvas tags can better adapt to mobile devices. The new parsing rules enhance flexibility, new attributes, and eliminate outdated or redundant attributes, which truly changes the way users interact with documents. HTML5 gives web pages better meaning and structure. Richer tags will build a data-driven Web that is more valuable to programs and users with support for RDFa, microdata and microformats. Web apps developed based on HTML5 have shorter startup time and faster network speed, all thanks to HTML5 APP Cache and local storage functions. Indexed DB (one of the most important technologies for HTML5 local storage) and API documentation. Since the API documentation of the Geolocation function was made public, HTML5 has provided web application developers with more functional optimization options and brought more experience function advantages. HTML5 provides unprecedented open interfaces for data and application access. It enables external applications to directly connect to data inside the browser, such as video and audio can be directly connected to microphones and cameras. More efficient connection efficiency enables real-time chat based on pages, faster web game experience, and more optimized online communication. HTML5 has more effective server push technology, Server-Sent Event and WebSockets are two of its features, which can help us realize the function of "pushing" data from the server to the client.
[0047] The main advantage of using HTML5 is that this technology can be used across platforms. For example, if you develop an HTML5 game, you can easily port it to UC's open platform, Opera's game center, Facebook's application platform, and even distribute it to the App Store or Google Play through packaging technology. Therefore, its cross-platform nature is very strong, which is also the main reason why most people are interested in HTML5. It has long been imagined whether it is possible to "design once and apply universally" so that the same web page can automatically adapt to screens of different sizes and automatically adjust the layout according to the screen width. In 2010, Ethan Marcotte proposed the term "adaptive web design", which refers to web design that can automatically identify the screen width and make corresponding adjustments. This solves a traditional situation - websites provide different web pages for different devices, such as providing a mobile version or an iPhone / iPad version. This certainly guarantees the effect, but it is more troublesome, and you have to maintain several versions at the same time. Moreover, if a website has multiple portals, it will greatly increase the complexity of the architecture design. The game client needs to be updated every time, which is very troublesome. But updating an HTML5 game is like updating a page, which is an immediate and instant update.
[0048] The present invention provides a file information management method, system, electronic device and storage medium, which can simultaneously realize the preservation of the complete style of the document and the extraction, selection and real-time display of file information, so that what the client sees is what he gets, and realize more automated and simplified enterprise information management.
[0049] The present invention is described below in conjunction with specific embodiments.
[0050] Embodiment 1
[0051] This embodiment provides a file information management method. Figure 1 to Figure 2 , Figure 1 is a flow chart of a file information management method according to an embodiment of the present application; Figure 2 : is a block diagram of a display layer and a selection layer according to an embodiment of the present application; as shown in the figure, the file information management method includes the following steps:
[0052] Setting step S1: setting a preview layer and a marking layer in the client operation area, and setting a display layer and a selection layer in the preview layer;
[0053] File information extraction step S2: after rendering the PDF file into a canvas in the display layer, extract the file information in the canvas, and arrange the extracted file information in the selection layer;
[0054] File information display step S3: the annotation layer is attached to the selected layer, and the file information annotated by the client in the selected layer is displayed.
[0055] In an embodiment, the setting step S1 includes that the display layer is located below the selection layer.
[0056] In specific implementation, the display layer is located below the selection layer. The display layer is a canvas drawing snapshot of the source document, similar to a "background image", which preserves all style formats of the file to the greatest extent; the selection layer is similar to a "text grabber".
[0057] In the embodiment, the file information extraction step S2 includes:
[0058] PDF file processing step S21: using the PDF.js tool in the presentation layer to render the PDF file into the canvas, and after displaying the canvas on the presentation layer, extracting the file information in the canvas through the span tag;
[0059] File information arrangement step S22: arranging the size and position of the text in the extracted file information in the selected layer.
[0060] In the specific implementation, the PDF.js tool open sourced by Mozilla is used to directly render the PDF file into canvas. The PDF.js framework can realize the conversion of files through pure HTML5 technology, without any local support, and can be used as long as the browser supports H5, with good compatibility. If you want to implement the extraction operation of the browser, you must have text paragraphs, and when we use the PDF.js tool to directly render the PDF file into canvas, you cannot call the browser's text selection API to extract file information. Therefore, the present invention extracts the text in the file information by extracting the file information in the canvas through the span tag, and by absolute positioning, each text corresponds to the position of this text in the display layer, and compares the specific size of the original text through the zoom function to ensure that the text of the selected layer is the same size as the text of the display layer.
[0061] In an embodiment, the file information display step S3 includes: the marking layer generates a semi-transparent div box on the selection layer, and displays the file information in the canvas manually marked by the client in the selection layer in the div box.
[0062] In a specific implementation, the annotation layer of the present invention records and highlights the content annotated by the user, generates a semi-transparent div box attached to the selection layer, and realizes that the highlight effect can still be preserved after selection and annotation.
[0063] Embodiment 2
[0064] Please refer to Figure 3 , Figure 3 FIG. 1 is a schematic diagram of the structure of the file information management system of the present invention. Figure 3 As shown, the file information management system of the invention is applicable to the above-mentioned file information management method, and the file information management system includes:
[0065] Setting unit 51: setting a preview layer and a marking layer in the client operation area, and setting a display layer and a selection layer in the preview layer;
[0066] The file information extraction unit 52: after rendering the PDF file into a canvas in the display layer, extracts the file information in the canvas, and arranges the extracted file information in the selection layer;
[0067] The file information display unit 53: the marking layer is attached to the selected layer, and displays the file information marked by the client in the selected layer.
[0068] In this embodiment, the display layer is set up below the selection layer by the setting unit 51 .
[0069] In this embodiment, the file information extraction unit 52 includes:
[0070] PDF file processing module 521: using PDF.js tool in the presentation layer to render the PDF file into the canvas, and after displaying the canvas on the presentation layer, extracting the file information in the canvas through the span tag;
[0071] The file information arrangement module 522 arranges the size and position of the characters in the extracted file information in the selected layer.
[0072] In this embodiment, the marking layer generates a semi-transparent div box on the selected layer, and the file information in the canvas manually marked by the client in the selected layer is displayed in the div box by the file information display unit 53 .
[0073] Embodiment 3
[0074] Combination Figure 4 As shown, this embodiment discloses a specific implementation of an electronic device. The electronic device may include a processor 81 and a memory 82 storing computer program instructions.
[0075] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0076] Among them, the memory 82 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 82 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 82 may be inside or outside the file information management device. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (ErasableProgrammable Read-Only Memory, FPROM for short), an electrically erasable PROM (Electrically ErasableProgrammable Read-Only Memory, EFPROM for short), an electrically alterable ROM (ElectricallyAlterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0077] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .
[0078] The processor 81 implements any file information management method in the above embodiments by reading and executing computer program instructions stored in the memory 82 .
[0079] In some of the embodiments, the electronic device may further include a communication interface 83 and a bus 80. Figure 4 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.
[0080] The communication interface 83 is used to realize the communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication interface 83 can also realize data communication with other components such as: external devices, image / file information management equipment, databases, external storage, and image / file information management workstations.
[0081] The bus 80 includes hardware, software or both, and couples the components of the electronic device to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0082] Electronic devices can be connected to the file information management system to achieve integration Figure 1 to Figure 2 Describe the method.
[0083] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0084] In summary, the present invention processes and reads information on the content of a PDF file by setting a preview layer and an annotation layer in the user operation area, and establishing a display layer and a selection layer in the preview layer, thereby realizing information extraction, selection, and real-time display, while ensuring the retention of the file style, solving the contradiction that the complete style of the file cannot be preserved and the text cannot be exposed at the same time, realizing what you see is what you get from the client's perspective, making enterprise information management simpler and more automated, and greatly improving the efficiency of enterprise file information management.
[0085] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the protection scope of the attached claims.
Claims
1. A file information management method, characterized in that: include: Setting step: setting a preview layer and a marking layer in the client operation area, and setting a display layer and a selection layer in the preview layer, wherein the display layer is located below the selection layer; A file information extraction step: after rendering the PDF file into a canvas in the display layer, extracting the file information in the canvas, and arranging the extracted file information in the selection layer; File information display step: the annotation layer is attached to the selected layer, and the file information annotated by the client in the selected layer is displayed; Wherein, the file information extraction step includes: PDF file processing step: using the PDF.js tool in the presentation layer to render the PDF file into the canvas, and after displaying the canvas on the presentation layer, extracting the file information in the canvas through the span tag; File information arrangement step: arrange the size and position of the text in the extracted file information in the selected layer, correspond each text to the position of the text in the display layer by absolute positioning, compare the specific size of the original text by zooming function, and ensure that the text in the selected layer is the same size as the text in the display layer.
2. The file information management method according to claim 1, characterized in that: The file information display step includes: the marking layer generates a semi-transparent div box on the selection layer, and displays the file information in the canvas manually marked by the client in the selection layer in the div box.
3. A file information management system, characterized in that: Applicable to the file information management method described in claim 1 or 2 above, the file information management system comprises: Setting unit: Setting a preview layer and a marking layer in the client operation area, and setting a display layer and a selection layer in the preview layer, and setting the display layer below the selection layer through the setting unit; A file information extraction unit: after rendering the PDF file into a canvas in the presentation layer, extracts the file information in the canvas, and arranges the extracted file information in the selection layer; File information display unit: the annotation layer is attached to the selection layer, and displays the file information annotated by the client in the selection layer; Wherein, the file information extraction unit includes: PDF file processing module: using the PDF.js tool in the presentation layer to render the PDF file into the canvas, and after displaying the canvas on the presentation layer, extracting the file information in the canvas through the span tag; File information arrangement module: arranges the size and position of the text in the file information extracted in the selected layer, corresponds each text to the position of the text in the display layer through absolute positioning, compares the specific size of the original text through the zoom function, and ensures that the text in the selected layer is the same size as the text in the display layer.
4. The document information management system according to claim 3, characterized in that: The marking layer generates a semi-transparent div box on the selection layer, and displays the file information in the canvas manually marked by the client in the selection layer in the div box through the file information display unit.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the file information management method according to claim 1 or 2 is implemented.
6. An electronic device readable storage medium, wherein computer program instructions are stored on the electronic device readable storage medium, and when the computer program instructions are executed by a processor, the file information management method according to claim 1 or 2 is implemented.
Citation Information
Patent Citations
Method and system for extracting webpage information
CN102831121A
Document display method and device, equipment and computer readable medium
CN112650714A