Online file security management method, system, server, medium and program
By employing an online file security management method that uses an application server to provide an interactive interface and dual security authentication in medical laboratories, the security and usability issues of online file management systems in medical laboratories are solved, achieving secure data isolation and efficient management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
AI Technical Summary
Medical laboratories lack dedicated online electronic document management systems. Existing systems are insufficient to meet security and ease-of-use requirements, leading to security risks and high learning costs in the document management process.
This paper provides an online file security management method that provides an interactive interface for terminal devices through an application server, adopts a dual security authentication mechanism to ensure the secure isolation of files in a temporary storage area and a cache area, generates Office documents and stores them in a secure storage area, and realizes secure data authentication and monitoring.
It improves the security and ease of use of online document management in medical laboratories, prevents document contamination and leakage, reduces user learning costs and error rates, and enhances system reliability and identity verification accuracy.
Smart Images

Figure CN121637545A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of medical laboratories, in particular to an online file security management method, system, server, medium and program. BACKGROUND
[0002] With the rapid development of information technology, medical laboratory quality management also requires gradual conversion from paper files to electronic file management, and as the core proof material for external inspection and review of medical laboratories (ISO15189 review, Grade Hospital Review, Flight Inspection, etc.). During the conversion from traditional paper files to electronic files, the following problems exist:
[0003] Firstly, an online electronic file management system needs to be provided to meet the electronic file management needs of medical laboratories; there is currently no online electronic file management system dedicated to medical laboratories, and other fields of online electronic file management systems are difficult to seamlessly adapt to the needs of medical laboratories.
[0004] Secondly, compared with other fields, medical laboratories have higher security requirements for online electronic file management systems. Once the electronic file management system is invaded, the files stored in the electronic file management system will be contaminated, leaked, or even cause patient information to be transmitted externally or illegally sold, which not only infringes on the privacy of patients, but also poses a great security risk.
[0005] Thirdly, the conversion from paper files to electronic file management has high learning costs, especially for the medical field where the average age of the management layer is relatively high. Not only is the learning cost high, but when the online electronic file management system is not user-friendly, various use errors are likely to occur, making it difficult to ensure medical laboratory quality management.
[0006] Therefore, it is an urgent technical problem to provide a medical laboratory dedicated online electronic file management method and system that is easy to use and safe and reliable. SUMMARY
[0007] The main purpose of the present application is to provide a medical laboratory dedicated online file security management method, system, server, medium and program that is easy to use and safe and reliable.
[0008] To achieve the above purpose, the present application provides an online file security management method applied to the field of medical laboratories, which includes the following online file creation steps performed by a file creation server:
[0009] in response to a document creation instruction from an application server, providing an interactive interface for a terminal device to create an office document online through the application server; the document creation instruction includes an instruction generated by the application server according to a document creation request from the terminal device;
[0010] receiving a document conversion instruction from the application server, the document conversion instruction including file stream extraction information, file metadata information and security authentication information generated by the application server for the document creation request;
[0011] performing security authentication according to the security authentication information, and generating a placeholder file in a local second temporary storage area after determining that the authentication is passed, and extracting an HTML (Hyper Text Markup Language) file stream from a first temporary storage area of the application server according to the file stream extraction information and storing the HTML file stream to a local cache area; the HTML file stream is obtained by converting data input by the terminal device in response to a user input in the interactive interface and transmitted to the application server through the application server;
[0012] storing the new HTML file stream to the cache area when the application server monitors the new HTML file stream;
[0013] filling the HTML file stream in the cache area and the metadata corresponding to the file metadata information into the placeholder file when a file submission condition trigger is monitored, and converting data in the placeholder file into an office format to generate an office document;
[0014] storing the office document in a local security storage area.
[0015] Optionally, when a file in the security storage area is accessed, a preset security audit process is required;
[0016] And / or, the file creation server includes a document control module and an online document service module; the security authentication according to the security authentication information includes:
[0017] the document control module performs a first security authentication according to the security authentication information, and forwards the document conversion instruction to the online document service module after the first security authentication is passed;
[0018] the online document service module performs a second security authentication according to the security authentication information, and determines that the authentication is passed when the second security authentication is passed.
[0019] Optionally, the file submission condition includes at least one of the following:
[0020] receiving a document submission instruction;
[0021] not monitoring a new HTML file stream within a preset time length;
[0022] monitoring a closing editing function instruction on the interactive interface issued by the application server;
[0023] monitoring an error saving condition trigger.
[0024] Optionally, the file metadata information is metadata or metadata index corresponding to the document type obtained by the application server from a database according to the document type.
[0025] When the file metadata information is the metadata index, before the metadata is filled into the placeholder file, the method further comprises:
[0026] obtaining corresponding metadata from the database by the application server according to the metadata index.
[0027] Optionally, in an embodiment, the converting data in the placeholder file into office format comprises:
[0028] reading data in the placeholder file to obtain each HTML element to be converted;
[0029] converting the each HTML element and the docbuilder syntax of office;
[0030] combining and splicing the converted docbuilder syntax to obtain a docbuilder file for the docbuilder service of office to execute.
[0031] Optionally, after the receiving the document conversion instruction from the application server, the method further comprises:
[0032] when detecting that there is illegal input data in the file stream, performing security processing;
[0033] The security processing comprises at least one of:
[0034] recording and / or outputting security warning information;
[0035] clearing the HTML file stream stored in the cache area;
[0036] notifying the application server to clear the HTML file stream stored in the first temporary storage area.
[0037] Optionally, the method further comprises:
[0038] When a file submission condition trigger is monitored, the HTML file stream in the cache area and the file metadata information are sent to the application server for the application server to generate an HTML file and store in a database connected thereto.
[0039] In addition, to achieve the above object, the present application further provides a file creation server applied to the field of medical laboratories, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the online file security management method.
[0040] In addition, to achieve the above object, the present application further provides an online file security management system, comprising an application server and a file creation server as described above, wherein:
[0041] The application server is configured to send a document creation instruction to the file creation server according to a document creation request from the terminal device; and receive data input by a user in an interactive interface for online creation of an office document by the terminal device and convert the data into an HTML file stream stored in a first temporary storage area locally; and send a document conversion instruction to the file creation server, the document conversion instruction comprising file stream extraction information, file metadata information and security authentication information generated for the document creation request;
[0042] The file creation server is configured to, in response to the document creation instruction, provide the interactive interface for the terminal device through the application server; and receive the document conversion instruction from the application server, perform security authentication according to the security authentication information, generate a placeholder file in a second temporary storage area locally after determining that the authentication is passed, and extract an HTML file stream from the first temporary storage area of the application server according to the file stream extraction information and store the HTML file stream in a cache area locally; and when a new HTML file stream is monitored through the application server, store the new HTML file stream in the cache area; and when a file submission condition trigger is monitored, fill the HTML file stream in the cache area and the corresponding metadata of the file metadata information into the placeholder file, convert data in the placeholder file into an office format to generate an office document, and store the office document in a secure storage area locally.
[0043] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, the storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the online file security management method as described above.
[0044] In addition, to achieve the above object, the application further provides a computer program which, when executed by a processor, implements the steps of the online file security management method as described above.
[0045] The online file security management method, system, server, medium and program provided by the application are applied to a medical laboratory. A file creation server provides an interactive interface for a terminal device to create an office document online by responding to a document creation instruction from an application server. The document creation instruction includes an instruction generated by the application server according to a document creation request from the terminal device. Then, the file creation server receives a document conversion instruction from the application server, which includes file stream extraction information, file metadata information and security authentication information generated by the application server for the document creation request. Then, the file creation server performs security authentication according to the security authentication information, generates a placeholder file in a local second temporary storage area after determining that the authentication is passed, extracts an HTML file stream from a first temporary storage area of the application server to a local cache area according to the file stream extraction information, and stores the HTML file stream in the cache area. The HTML file stream is obtained by converting data input by a user in the interactive interface and transmitted to the application server by the terminal device, and then converted by the application server. Then, the file creation server stores a new HTML file stream in the cache area when the new HTML file stream is monitored by the application server. When a file submission condition is triggered, the file creation server fills the HTML file stream in the cache area and the metadata corresponding to the file metadata information into the placeholder file, converts the data in the placeholder file into an office format to generate an office document, and stores the office document in a local security storage area. The above online file creation scheme provided by the application has at least the following advantages:
[0046] The online file security management method and system are designed for medical laboratories, not simply applied to online file management systems in other fields, and can better meet the management needs of medical laboratories.
[0047] All interactions between the terminal device and the file creation server in the online file security management system are implemented through the application server, that is, the centralized security management of interactive information can be realized through the application server. The application server serves as a control hub, has high control integration, good uniformity, and better security and reliability.
[0048] The file creation server can provide an interactive interface for the user to create an office document online on the terminal device, which conforms to the usage habits of the public, has good usability, low user learning cost, low error rate and better experience satisfaction.
[0049] During the document creation process in the online Office document creation interface, the initial data is stored in the first temporary storage area of the application server. Only after successful security authentication will the data be transferred from the first temporary storage area to the cache area of the file creation server. Before the file submission condition is triggered, the data entered by the user through the terminal device is stored in the cache area of the file creation server and will not be stored in the second temporary storage area or other storage areas on the local file creation server. In other words, before the file submission condition is triggered, the data entered by the user through the terminal device is securely isolated from the data in the second temporary storage area or other storage areas on the local file creation server. Therefore, data pollution during the file creation and editing process can be avoided, ensuring system reliability and security.
[0050] Furthermore, the security authentication adopted not only enhances the accuracy of identity recognition, but also prevents unidentified or malicious users from attacking the system, which could lead to the contamination or leakage of files stored in the system, or even the dissemination or illegal sale of patient information.
[0051] Thus, the first temporary storage area, the cache area, and the second temporary storage area in this application not only achieve physical or logical security isolation, but also ensure through a security authentication mechanism that only legitimate and authentic file content can be completely preserved, thereby greatly improving the security of the file creation process and effectively preventing the risk of malicious modification and unauthorized access.
[0052] In addition, in this application, the file creation server will only generate a placeholder file in the local second temporary storage area after the security authentication is passed, and will only fill the corresponding data into the placeholder file from the cache area at the last moment when the file submission condition is detected. That is, the temporary storage space is pre-customized, and the security and reliability of the second temporary storage space are guaranteed as much as possible. Moreover, the generated placeholder file can be used directly as a file handle, and can also prevent the risk of overwriting caused by other references. Attached Figure Description
[0053] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1This is a schematic diagram of the online file creation method provided in the embodiments of this application;
[0056] Figure 2 This is a schematic diagram of the structure of the online file security management system provided in the embodiments of this application;
[0057] Figure 3 This is a schematic diagram of the interactive interface in the online file security management method provided in the embodiments of this application;
[0058] Figure 4 A schematic diagram of the hardware structure of the file creation server provided in the embodiments of this application;
[0059] Figure 5 This is a schematic diagram of the file creation server module structure provided in the embodiments of this application;
[0060] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0061] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0062] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0063] This embodiment provides an online document security management method that is applied to the medical laboratory field. It is specifically developed and designed for the electronic document management needs of the medical laboratory field, rather than simply applying electronic document management methods from other fields. Therefore, its underlying security and reliability have a natural advantage over other electronic document management methods and systems.
[0064] The online file security management method provided in this embodiment includes: Figure 1 The following steps are shown in the online file creation method performed by the file creation server:
[0065] Step S10: Responding to the document creation instruction from the application server, the application server provides an interactive interface for creating office documents online to the terminal device; the document creation instruction includes the document creation instruction generated by the application server in response to the document creation request from the terminal device.
[0066] In this embodiment, the terminal device includes various user-layer devices that directly face the user, including but not limited to PCs and mobile smart terminals (such as laptops, tablets, mobile phones, smartwatches, etc.). For users, the process of creating online files and subsequent online file management can be directly operated on the terminal device, which is convenient and efficient, and is especially suitable for users' office work in various scenarios.
[0067] In this embodiment, the application server can serve as a control hub. All interactions between the terminal device and the file creation server are implemented through the application server. In other words, the application server can achieve centralized and secure management of interactive information, resulting in high control integration, good uniformity, and better security and reliability.
[0068] In this embodiment, a user can send a document creation request to the application server from a terminal device. The application server then sends a document creation instruction to the file creation server based on the request. The file creation server then provides the terminal device with an interactive interface for creating online Office documents based on the instruction. This allows users to create online Office documents through this interface. Providing online Office document creation is versatile, conforms to common user habits, has a low learning curve, is less prone to errors, and offers a better user experience.
[0069] In this embodiment, online Office files include, but are not limited to, Microsoft Office files, WPS (Word Processing System) Office files, and other types of online Office files (such as LibreOffice, Only Office, etc.).
[0070] Step S20: Receive a document conversion instruction from the application server. The document conversion instruction includes file stream extraction information, file metadata information, and security authentication information generated by the application server in response to the document creation request.
[0071] In this embodiment, before and / or during the process of sending a document conversion instruction to the file creation server, the application server can respond to data input by the user through the interactive interface on the terminal device and convert it into an HTML file stream, storing it in the application server's first temporary storage area. In some examples, the application server's first temporary storage area may include at least one of: a storage area located locally on the application server and a data repository (which may be a server or other data storage device) that is communicatively connected to the application server for storing and scheduling data. For example, in some application scenarios, the application server's first temporary storage area may only include its own local storage area, thereby reducing interaction with external data storage and ensuring the security and reliability of its data storage control. In other application scenarios, the application server's first temporary storage area may only include the data repository that is communicatively connected to it. The application server can store all of the above-mentioned HTML file streams in the data repository, without storing them locally, and can also securely isolate the data repository from the local storage area. This approach can minimize the impact of viruses or other contaminated data on the application server when there are viruses or other contaminated data in the HTML file stream, since the application server does not store them locally but stores them in an external data repository, thus improving the security and reliability of the application server. In some other application scenarios, the first temporary storage area of the application server may include its local storage area and a data repository connected to it in communication, and a corresponding security storage control policy may be set. For example, the security storage control policy may include, but is not limited to, at least one of the following:
[0072] Strategy 1: Prioritize storage in the local storage area, and only store in the data storage area when the remaining storage space in the local storage area is less than the first preset value;
[0073] Strategy 2: Prioritize storage in the data repository, and only store in the local storage area when the remaining storage space in the data repository is less than the second preset value;
[0074] Strategy 3: Set a first whitelist for data storage in the local storage area. Data within the first whitelist is stored in the local storage area, while data outside the first whitelist is stored in the data repository. The list in the first whitelist can be set based on at least one of the following: user information, data type, data size, interaction time, etc.
[0075] Strategy 4: Set a second whitelist for data storage in the data repository. Data on the data in the second whitelist is stored in the data repository, while data not on the second whitelist is stored in the local storage area. The list in the second whitelist can be set according to at least one of the following: user information, data type, data size, interaction time, etc.
[0076] In this embodiment, the aforementioned file stream extraction information is used at least to locate and access the corresponding HTML file stream stored in the first temporary storage area; the aforementioned file metadata information includes, but is not limited to, at least one of file number information, version information, header information, footer information, etc. The file metadata information in this example supports updates by the service provider and / or user to meet dynamic needs. Optionally, the file metadata information sent by the application server to the file creation server may be metadata or metadata indexes corresponding to the document type, retrieved by the application server from the database based on the document type.
[0077] The aforementioned security authentication information is used at least for user identity authentication. For example, in some application scenarios, the security authentication information may include, but is not limited to, at least one of token authentication information, JWT authentication information, and OAuth authentication information. This application does not impose any restrictions on this, and any authentication mechanism and corresponding security authentication information that can achieve user identity security authentication are within the scope of this embodiment.
[0078] Step S30: Perform security authentication based on security authentication information. After successful authentication, generate a placeholder file in the second temporary storage area on the local machine, and extract the HTML file stream from the first temporary storage area of the application server and store it in the local cache area based on the file stream extraction information.
[0079] The security authentication method used in this embodiment not only enhances the accuracy of identity recognition, but also prevents unidentified or malicious users from attacking the system, which could lead to the contamination or leakage of files stored in the system, or even the dissemination or illegal sale of patient information and other security risks.
[0080] In some examples of this embodiment, the file creation server includes a document control module and an online document service module; the file creation server performing security authentication based on security authentication information may include:
[0081] The document control module performs the first security authentication based on the security authentication information. After the first security authentication is successful, the document conversion instruction is forwarded to the online document service module.
[0082] The online document service module performs a second security authentication based on the security authentication information. If the second security authentication is successful, the authentication is considered complete.
[0083] In this example, the file creation server can use a dual authentication mechanism to verify the user's identity, thereby further improving security and reliability.
[0084] In some application scenarios, the document control module and the online document service module can be implemented through a single physical server, thereby improving the system's integration, reducing costs, and minimizing system maintenance.
[0085] In other application scenarios, the document control module and the online document service module can be implemented through at least two physical servers, which allows the system to have better flexibility and scalability.
[0086] In this embodiment, the file creation server generates a placeholder file in the local second temporary storage area only after the security authentication is passed. This not only realizes the pre-customization of the temporary storage space, but also ensures the security and reliability of the second temporary storage space as much as possible. Furthermore, the generated placeholder file can be used directly as a file handle, and can also prevent the risk of overwriting caused by other references.
[0087] In this embodiment, the file creation server can extract the HTML file stream from the first temporary storage area of the application server according to the file stream extraction information and store it in the local cache area; wherein the extraction step of the HTML file stream and the step of generating the placeholder file in the second temporary storage area can be executed in parallel, or they can be executed in a sequential order, and the order can be flexibly set according to the needs.
[0088] Step S40: When a new HTML file stream is detected by the application server, the new HTML file stream is stored in the local cache.
[0089] Storing the HTML file stream in this step, as well as in the previous step, to a local cache instead of directly storing it in a placeholder file in a second temporary storage space has at least the following advantages:
[0090] Firstly, it can securely isolate the cached HTML file stream from the second temporary storage space, ensuring security;
[0091] Secondly, the HTML file stream is stored in the cache. When a user accesses the cached HTML file stream through their terminal device during the file creation process, latency can be reduced and the response can be as fast as possible, improving efficiency and user experience.
[0092] It should also be understood that the data in the HTML file stream obtained by the application server from the terminal device in this embodiment may include at least one of the following: text, images, etc. newly entered (including pasted) by the user on the interactive interface, and text, images, etc. directly imported by the user from other documents. For example, in some examples, it may support users to directly import Word documents, Excel spreadsheets, PPT documents, etc.
[0093] Step S50: When the file submission condition is detected, the HTML file stream and the metadata corresponding to the file metadata information in the cache area are filled into the placeholder file, and the data in the placeholder file is converted into Office format to generate an Office document.
[0094] Optionally, in this embodiment, the file submission conditions include, but are not limited to, at least one of the following:
[0095] Upon receiving a document submission instruction; for example, after a user completes the creation of an online file, they can trigger the document submission instruction by clicking the submit icon;
[0096] No new HTML file streams were detected within the preset time period. This indicates that the user did not input any new content within the preset time period. At this time, a file can be generated based on the received data. This not only avoids file loss, but also prevents other malicious users from inputting malicious data through the interactive interface during the long wait. Therefore, it can improve both reliability and security.
[0097] The application server detects a command to disable the editing function on the interactive interface. The application server can trigger the control to disable the editing function on the interactive interface based on preset monitoring conditions. For example, it can be triggered when at least one of dangerous environment, dangerous data, or dangerous operation is detected, so that the file creation server can generate a file based on the received data.
[0098] If an error is detected and the save condition is triggered, the file creation server can also generate the file based on the received data, thus preventing the loss of previously created files.
[0099] As can be seen, this embodiment allows for flexible setting of file submission conditions and automatic monitoring, generating files at appropriate times based on monitoring results. This approach is more intelligent and better meets the diverse needs of the medical laboratory field. It should also be understood that the file submission conditions in this embodiment can be updated by users and / or service providers.
[0100] Optionally, in one embodiment of this example, the file creation server converts the data in the placeholder file into Office format, including:
[0101] Read data from the placeholder file to obtain the HTML elements to be converted;
[0102] Convert each HTML element to Office's docbuilder syntax;
[0103] The converted docbuilder syntax is combined and concatenated to obtain a docbuilder file that can be executed by the Office docbuilder service.
[0104] One example process is as follows: HTML content is read, and HTML elements are converted using OnlyOffice's docbuilder syntax. Then, based on the preset page margins in the HTML page, a conversion algorithm calculates the actual page margins for a given paper size (e.g., A4). All converted docbuilder syntax combinations are then concatenated, and the concatenated result is saved on the server as xxxxx.docbuilder. The xxxxx.docbuilder file can then be executed using the docbuilder service provided by OnlyOffice to convert tables. For example, the conversion algorithm provided in this embodiment is as follows: HTML elements are first converted to DOM elements using a lookup table. Then, relevant parameters in the DOM elements are recursively obtained, and each layer of the DOM is converted into the relevant syntax commands in docbuilder. During recursion, if an element is found to have built-in styles, syntax conversion is performed according to the style lookup table. Each element supports different built-in styles and attributes, but all support inline styles. In this embodiment, the syntax supported by inline styles includes, but is not limited to: padding, margin, width, height, border, font, color, line-height, position, text-align, vertical-align, text-decoration, top / left / right / bottom. In this embodiment, if it is determined that there are mergeable or conflicting styles among the inline styles, the conversion can be performed based on the last set style. The conversion method provided in this embodiment is highly efficient and effective.
[0105] Optionally, in this embodiment, when the file metadata information sent by the application server to the file creation server is a metadata index, before the file creation server fills the placeholder file with metadata, the method further includes:
[0106] Based on the metadata index, the corresponding metadata is obtained from the database through the application server.
[0107] Step S60: Store the Office document in the local secure storage area.
[0108] In this embodiment, the secure storage area is a file storage area that is securely isolated from the second temporary storage area. In some implementations, files in this secure storage area can only be accessed normally after passing through a preset security audit process (such as an access audit process).
[0109] As can be seen from the online file creation method in the above example, the online file security management method and system in this embodiment are designed specifically for medical laboratories, with good underlying security and reliability; all interactions between the terminal device and the file creation server are implemented through the application server, resulting in high control integration, good uniformity, and better security and reliability; and it can provide users with an interactive interface for creating office documents online, with low user learning costs, reduced error rates, and better user experience.
[0110] Data generated during the online creation of Office documents by users is protected by multiple layers of security isolation, including the application server's first temporary storage area, the file creation server's cache area, the second temporary storage area, and the secure storage area. This prevents data contamination during file creation and editing, ensuring system reliability and security. Furthermore, the security authentication employed not only enhances the accuracy of identity verification but also prevents unidentified or malicious users from attacking the system, which could lead to contamination or leakage of files stored within the system, or even the dissemination or illegal sale of patient information.
[0111] In one embodiment of this example, to further enhance the security of the file creation process, after step S20, the method further includes: performing security processing when illegal input data is detected in the HTML file stream; that is, in this embodiment, illegal data carried in the HTML file stream during the file creation process can be actively monitored, and security control can be performed when an anomaly is detected, thereby further improving security and reliability. In some examples, the security processing in this embodiment includes, but is not limited to, at least one of the following:
[0112] Record and / or output security alert information for administrators to investigate and / or review later;
[0113] Clear the HTML file streams stored in the cache of the file creation server to avoid various security risks caused by corrupted data in these HTML file streams;
[0114] The application server is notified to clear the HTML file streams stored in the first temporary storage area, thereby avoiding various security risks caused by corrupted data in these HTML file streams.
[0115] Optionally, the security processing method in this embodiment supports updates to user and / or service provision.
[0116] In some embodiments of this example, to further improve the usability, reliability, and security of the file management system, in step S60 above, when the file submission condition is triggered, the HTML file stream in the cache and the file metadata information are sent to the application server so that the application server can generate an HTML file and store it in the database connected to it. In this embodiment, in addition to generating and storing Office documents online, HTML files can also be generated and stored. The generated and stored Office documents and HTML files can serve as backups for each other. If the secure storage area is damaged or contaminated by data or illegally accessed, the corresponding HTML file can be retrieved from the database. After the crisis is resolved, the retrieved HTML file can be converted back into an Office document and stored in the secure storage area. Conversely, if the database is damaged or contaminated by data or illegally accessed, the corresponding Office document can be retrieved from the secure storage area, and after the crisis is resolved, the retrieved Office document can be converted back into an HTML file and stored in the database. Therefore, the disaster recovery performance of the file management system can be greatly improved, further enhancing its reliability. On the other hand, the document management system can also select HTML files or Office documents for users to view, modify or review based on specific application scenarios or user habits, meeting diverse user needs and further enhancing the user experience.
[0117] Of course, in some application scenarios, HTML files can be generated directly without generating Office documents. In this case, a file creation server is not needed. The application server can directly store the HTML file stream obtained from the terminal device in the first temporary storage area and merge the obtained file metadata into the HTML file stream to generate an HTML file.
[0118] This embodiment also provides an online file security management system, which is applied in the field of medical laboratories, including the aforementioned application server and file creation server. For ease of understanding, the following will use... Figure 2 The online file security management system shown is illustrated as a specific application example. Please refer to [link / reference]. Figure 2 The system includes a client browser terminal D1 (i.e., a terminal device), an application server D2, a database D3, and a file creation server, wherein the file creation server includes a document control module D4 and an online document server D7; for ease of description, the above modules are referred to by their corresponding codes D1, D2, D3, D4, D7, and D8 below, where:
[0119] D1 is a terminal for user interaction, such as a PC. It can provide various interactive interfaces, such as the system interface, and send corresponding requests to D2 based on the user's operations on the interactive interface. D1 can provide a system login interface. After logging in through this interface, the user enters the system homepage. The homepage can display the interfaces of various functional modules of the system (for example, it can be displayed in the form of "function menus", and each level of menu can be displayed and managed in a single or multi-level manner). The user can select the corresponding interface to enter the corresponding functional interface. For example, selecting to enter the "Document Management" interface, the user can then select the sub-menu interface to enter the next level of functional menu, such as "My Applications", "Drafts", "Pending Review", etc.
[0120] The Template 1 area of D2 constitutes at least part of the first temporary storage area of D1. Optionally, the system may also include a security server that provides temporary storage functionality, and the storage space provided by the security server may also constitute part of the first temporary storage area. For specific configuration methods, please refer to the previous description of the first temporary storage area, which will not be repeated here. In this example, D2 is responsible for business control. As the control center of the system, all business-related processes must be managed through D2 to improve the uniformity and security of system security management.
[0121] The D4 document control module includes a header and footer control unit (D5), a document conversion SDK unit (D6), a Template 2 area (i.e., a second temporary storage area), and a master file area (i.e., a secure storage area). In some application scenarios, the master file area may include, but is not limited to, the publication area, the application area, the draft area, and the discard area.
[0122] The D3 and D7 functional modules execute the corresponding service functions according to the calls.
[0123] In some scenarios in this example, D4 and D7 can be integrated on a single physical server, which can improve system integration and reduce costs; alternatively, they can be implemented through two separate entities, which can enhance the system's scalability.
[0124] In other scenarios in this example, D2, D4, and D7 can also be integrated on a single server to further improve system integration.
[0125] In this example, D1 cannot bypass D2 to directly call the D7 online document server to ensure the security and compliance requirements for file control.
[0126] For ease of understanding, the following will be used as an example. Figure 2 The following is an example illustrating the online file creation process of the system:
[0127] A11 and D1 receive the access request from the file creator and complete the user login authentication.
[0128] In this example, the user accesses the D2 file management system through D1. D1 provides the system access page. The user logs in by entering user authentication information through the interface login. D1 obtains the user authentication information and sends it to D2 for authentication. The login is completed after successful authentication.
[0129] In this step, D2 can also obtain the user's identity information, such as the user's department and position, based on the internally preset "user authentication information and user identity information correspondence table"; or, through D1, require the user to input their identity information in real time.
[0130] A12 and D1 receive the new document creation instruction from the file creator and send a new document creation request to the D2 application server.
[0131] In this example, D1 provides a "New Document" interface in at least one sub-menu, allowing users to select and access the new document interface. For example, users can find the "New Document" interface and access the new document interface through any of the sub-menus such as "My Applications" or "Drafts." Alternatively, D1 can provide a "New Document" interface in only one menu. When D1 detects that a user has clicked the "New Document" interface, it indicates that it has received a new document instruction and sends a new document request to D2, where:
[0132] Both "My Applications" and "Drafts" provide users with a "Create New Document" interface. Users can access the "Application Area" of the Master through "My Applications" to create a new document, and access the "Drafts Area" of the Master through "Drafts". Optionally, different file management mechanisms and different "review" processes can be set for files in the "Application Area" and "Drafts Area".
[0133] Based on the new document request, application servers A13 and D2 create a unique cache key and token for the user, and invoke the online document service function of online document server D7. Through application server D2 and D1, an interactive interface for online Office document editing is provided to the user, for example, see [link to example]. Figure 3 As shown.
[0134] In this step, D2 invokes D7's online Office document mode to display the file creation and editing area on D1, and adds a document information bar above this editing area. For example, an example interface is shown below: In the "Document Information Bar," except for the "File Type," which requires manual input from the user, all other information is automatically generated by D2. The document type menu options can be single-level or multi-level, allowing the user to select the corresponding document type. The items included in the document information bar in this step can be fixed and displayed when the user opens the new text interface. The content of each item (e.g., reviewer, approver) is preset in D3 based on the document type and will be filled in later. Of course, in some application scenarios, the file type can also be preset in D2 based on user identity information, and D2 will automatically match and generate the file type based on the user's identity information (generally applicable when users with such identities can only create one type of document). The "Online Document Editing Area" and "Document Upload, Preview, and Other Function Areas" are provided by D7. D2 provides the above information and functions to D1 for display.
[0135] A14 and D1 send the document type selected by the user to D2, and convert the content created by the user through online editing or the document uploaded as an attachment into a file stream (i.e., HTML structure data) and send it to D2.
[0136] Application servers A15 and D2 store the received file streams in the Template1 area and read the corresponding file metadata (or metadata index) from D3 according to the document type information selected by the user; a table of correspondence between document types and file metadata is pre-stored on D3.
[0137] Application servers A16 and D2 send document conversion notifications to D4, along with the token, file metadata (or index), and cache key.
[0138] After A17 and D4 verify the token, they notify the D7 online document server to perform document conversion and send the token, file metadata (or index), and cache key to the D7 online document server.
[0139] After A18 and D7 verify the token, they load the corresponding file stream from Template1 of D2 into the cache using the cache key, and send a placeholder file generation request to D4 to generate a placeholder file in Template2. The advantages of the placeholder file are: on the one hand, it can be directly provided to D7 as a file handle, and on the other hand, it can prevent the risk of overwriting caused by other references.
[0140] A19: D7 listens to D2 to obtain the data edited by the user on D1 and stores it in the corresponding file stream in the cache; after D7 detects that the user has submitted the document (i.e. completed the editing), it closes the user's editing rights on D1.
[0141] To ensure data security, D7 and / or D2 have security algorithms or monitoring mechanisms for user-edited input. When illegal input is detected, security alarms are triggered, illegal content is rejected, and legal input prompts are provided. When severe illegal input is detected, such as virus-like input, the file stream is cleared to stop file creation, and the user is given a security warning or added to a gray list.
[0142] A20: D7 fills the file streams in the buffer into the corresponding placeholder files in the Template2 area. The specific steps are as follows:
[0143] The D6 application requests the D5 application to retrieve the corresponding header HTML code, footer HTML code, and margin configuration based on metadata. The retrieved data is then converted into Office objects such as Document, Section, Paragraph, Text, Stroke, Shape, and Rect, and the HTML style is converted to an Office style. The converted data is then filled into placeholder files in the Template2 area to generate the final Word document. Finally, the final Word document is stored in the Master file area, and a link to this final Word document is maintained on the D2 application server for access.
[0144] One example of the conversion process involves comparing all Style attributes supported by HTML (Type 1) with OfficeStyle (Type 2, the Word document type in Office), filtering out unsupported styles, and merging similar styles. Specifically, by identifying OfficeStyle, the HTML5+CSS3 attribute library can be aggregated using Python to filter out differing styles, and then these differing styles can be converted using tags to achieve compatibility with HTML styles.
[0145] Compare all HTML objects with Office objects, escape any unsupported objects. Since Office supports fewer objects, it is necessary to plan and merge HTML objects for compatibility to avoid generating a large number of paragraphs that could cause style errors.
[0146] The positioning and hierarchy of HTML need to be converted to a format supported by Office. The positioning and hierarchy of HTML differ from those of Office, so the positioning and hierarchy of HTML need to be converted according to the positioning and hierarchy of Office.
[0147] Converting a table to an Office table requires an algorithmic approach. Specifically, a pre-defined algorithm can be used to convert the table's HTML code into multidimensional metadata, which is then converted into an Office table. The principle is as follows: For example, all supported HTML style attributes are compared with OfficeStyles, filtering out unsupported styles and merging similar styles. Then, by recognizing OfficeStyles, Python is used to aggregate HTML5 and CSS3 attribute libraries to filter out differing styles. Finally, these differing styles are converted using markup, thus achieving the conversion of HTML elements. Alternatively, all HTML objects can be compared with Office objects, and unsupported objects can be escaped. Since Office supports fewer objects, HTML objects need to be planned and merged for compatibility to avoid generating a large number of paragraphs that could cause style errors. In addition, the positioning and hierarchy of HTML need to be converted to the way Office supports. HTML positioning and hierarchy differ from Office, so HTML positioning and hierarchy need to be converted according to Office's hierarchy and positioning. Furthermore, for tables, the HTML code of the table can be converted into multidimensional metadata, and then the multidimensional metadata can be converted into an Office table generator.
[0148] In this example, the file stream in the D7 online document server's cache does not directly enter the Template2 area. Instead, it enters the Template2 area only after editing permissions are confirmed to be disabled. This avoids data corruption during file creation, further ensuring the reliability and security of the file creation process. Furthermore, in Figure 2 In this system, the Template1 area, the D7 cache area, the Template2 area, and the Master file area are securely isolated, which further ensures that the official Word documents in the Master file area will not be contaminated.
[0149] To further facilitate understanding, the following will be combined with... Figure 2 The example process of the system generating HTML files is illustrated below, including:
[0150] S21 and D1 receive the user's access request and complete the user login authentication.
[0151] S22 and D1 receive the user's instruction to create a new document and send a new document request to D2.
[0152] S23 and D2 assign a cache key and token to the user based on the new document request, and provide the user with an interactive HTML editing interface;
[0153] S24, D1 sends the document type selected by the user to D2, and sends the content created by the user through HTML line editing to D2 via data stream;
[0154] The online editing feature supports pasting. When copying and pasting an image is detected, the following methods can be used to ensure the integrity and accuracy of the pasted image:
[0155] Existing methods use clipboard authorization to read Windows temporary files to open images. However, this reads the entire file, not just the image itself. This often leads to issues with specific bitmaps or multiple images, causing the image's starting pointer to become abnormal and preventing successful uploads to the remote server. In this embodiment, the image pasting principle is as follows: On the client side, a paste event is used to determine if an image exists. If so, a WebSocket client sends an image loading request to the image service program. The image service program accurately reads the image file using a temporary address, converts it into a file stream, and sends it to the remote server. Using the remote address returned from the remote server, the client returns the file's address and then replaces it with the corresponding file's address using a regular expression matching algorithm, thus ensuring 100% successful image uploads.
[0156] S25 and D2 identify, filter, and transform the received data stream. D5 then retrieves the corresponding header HTML code, footer HTML code, and margin configuration based on the file's metadata. These are then integrated into HTML code and stored in D3 (database). The document is also linked to D2 for access.
[0157] It is worth noting that in this solution: D7 can uniformly convert Word documents generated via online Office and stored on D4 into HTML text format, and then store them on D3 via D2; this ensures uniformity and security in file management. Conversely, D7 can also convert HTML text to Word format via D2 and store it on D4.
[0158] In the field of medical laboratories, one of the most frequent use cases for document management is document approval. Many approval processes involve multiple parties, multiple levels of review, and repeated revisions before a final release version is reached. The more review nodes there are, the more complex the management becomes. For example, in related technologies, the approval process for a document is as follows: when the current node has a document to approve, it retrieves the source file from the system, approves and revises it, generates an updated new version file, and then passes it to the next node, and so on, until the final approval and release at the final review node. After the final release, the system only stores the source file of the final released version of that document. This related technology has at least the following problems:
[0159] Firstly, the system only stores the single version corresponding to the current node at any approval node, making it impossible to obtain historical versions for tracing and review when investigation is needed.
[0160] Secondly, during the review process, each approval node directly calls upon and modifies the source file. If the system is illegally accessed and the source file is illegally modified, and there are no historical versions available for tracing the problem, it could lead to serious security issues. This is unacceptable for the medical laboratory field, which has stringent requirements for security and reliability.
[0161] The file management method provided in this embodiment may further include the following file editing and management steps executed by the application server:
[0162] Step S110: Receive a file editing request from the terminal device.
[0163] In this embodiment, the user can send a file editing request to the application server on the terminal device. The sending method may include, but is not limited to, at least one of touch, voice recognition, gesture recognition, facial recognition, and mouse button.
[0164] In one embodiment of this example, the file editing request may include user identity verification information and information about the file to be edited (which may include various information that can uniquely identify the file to be edited, such as, but not limited to, at least one of, file storage address, file number, etc.). After receiving the file editing request, the application server performs identity security authentication on the currently accessing user based on the user identity verification information included therein. Only after successful authentication will subsequent steps be executed. Of course, in other embodiments, the user identity verification information may be sent to the application server separately or along with other information before the terminal device sends the file editing request to the application server, so that the application server can perform identity security verification on the currently accessing user.
[0165] Step S210: Obtain a copy of the original file to be edited from the corresponding file security storage area according to the file editing call request.
[0166] In this embodiment, the file to be edited includes at least one of the following: a file created online in advance through a file management system, and a file directly imported from an external source. For example, at least one of the following: an online-created Office file, an HTML file, and an Office file or HTML file directly imported from an external source.
[0167] In this embodiment, the file to be edited is stored in a secure file storage area. In some examples, access to files in this secure file storage area requires a preset security audit process (e.g., an audited access process) to be granted, thereby improving its storage security. In other examples, at least one backup area can be set up in the secure file storage area to store backup files, thereby improving its reliability.
[0168] Step S310: The copy file data is sent to the terminal device as a copy HTML file stream so that the terminal device can display the corresponding document to be edited in the online document editing interface.
[0169] In this embodiment, for a file to be edited, a copy of the file data is presented to the user for editing, while the original file (i.e., the source file) is still stored in a secure storage area. Even if the user is an unauthorized user, or if abnormal situations such as the copy file data being illegally tampered with occur during the editing process, the security of the original file will not be threatened, thereby improving the security and reliability of the system.
[0170] Step S410: Obtain the edited HTML file stream generated by editing the document to be edited from the terminal device.
[0171] In some examples, editing an HTML file stream includes, but is not limited to, data added and / or deleted during the editing process.
[0172] Step S510: After the editing is detected to be complete, an updated file is generated based on the copy HTML file stream and the obtained edited HTML file stream.
[0173] In other words, in this embodiment, the new file version generated after editing the file is based on the file copy data of the previous version and can be used as the original file of the new version file. The original file of the previous version is stored securely and independently of the new version file. Therefore, it can meet the need to retrieve and view any version file before the current version, improve system reliability, facilitate comparison between versions, and facilitate subsequent tracing and review.
[0174] In the field of medical laboratories, many document approval processes involve multiple parties and levels of review. This can lead to situations where the same version of the same document is reviewed and edited by two or more users simultaneously, resulting in errors in the updated version and content, and making it difficult to identify the owner of the edited content. This hinders subsequent management and traceability, increasing management complexity. To address these issues, in some embodiments of this example, after step S110, the following step is also included:
[0175] Step S610: When it is determined that the original file to be edited corresponding to the file editing call request is currently under a preset control state, the file editing call request is subject to security control processing to avoid the situation where the same original file to be edited is edited by multiple users at the same time.
[0176] In some examples, the aforementioned preset control states may include, but are not limited to, at least one of the following:
[0177] The original file to be edited is currently in an editable state;
[0178] The original file to be edited is currently in an edit-prohibited state;
[0179] The original file to be edited is currently in an inaccessible state;
[0180] Furthermore, in some examples, the aforementioned preset control status can be updated by at least one of the system users and service providers.
[0181] In some examples, the above security control procedures include at least one of the following:
[0182] The request to edit the file is rejected, which means the editing operation initiated by the user is refused. In some application scenarios, a prompt message may also be sent to the user, which may include the reason for the rejection and / or a message to try again later.
[0183] It refuses to obtain the HTML file stream generated by editing the document from the terminal device; that is, it can present a copy of the file data corresponding to the original file to be edited to the user for viewing, but refuses all editing operations by the user.
[0184] Discard the HTML file stream generated during the editing of the document from the terminal device; that is, present a copy of the file data corresponding to the original file to be edited to the user, accept the user's editing operations, but discard the data generated by the user's editing operations in the background.
[0185] The updated file can be discarded or isolated; that is, a copy of the file data corresponding to the original file to be edited can be presented to the user for viewing, the user's editing operation can be accepted and a corresponding new updated file can be generated, but the updated file can be discarded.
[0186] In some examples, a security control processing method selection mechanism is set up. For example, there are preset selection method trigger conditions. When the current detection result does not meet the selection method trigger conditions, any one of the first or second methods mentioned above is selected to promptly remind the user who initiated the file editing request. When the current detection result meets the selection method trigger conditions (the selection method trigger conditions include detecting the current user or a suspected illegal user, and the current editing operation being or suspected to be an illegal operation, at least one of these), any one of the third or fourth methods mentioned above is selected. This makes the user who initiated the file editing request mistakenly believe that the operation on the original file to be edited has been successfully completed. This "deceptive" technique reduces the possibility that the original file to be edited will be illegally edited again later, thereby improving system security and reliability.
[0187] In some examples, after performing the above security control processing, the process may further include: when the preset control status of the original file to be edited is detected to be lifted, sending an editable notification to the user corresponding to the file editing request that was previously managed by security (i.e., the user who sent the file editing request), to inform the user that the file that was previously denied editing can now be edited, thereby enabling the user to edit the corresponding file as promptly as possible when needed, improving the user experience. Optionally, in some application scenarios, the sent editable notification may also include the latest version file information and / or all version information of the original file to be edited, so that the user can quickly understand the version status and select the appropriate version for editing, thereby further improving convenience and user experience satisfaction.
[0188] It should be understood that the method of sending editable notifications to the user corresponding to the file editing request processed by security management can be flexibly set. For example, text and / or multimedia (such as at least one of images, voice, and video) reminder information can be sent to the user through communication methods reserved by the user (such as mobile phone, email, instant messaging account (such as QQ, WeChat), online reminders of the file management system provided in this embodiment, etc.).
[0189] Referring to the foregoing example, the removal of the aforementioned preset control status may include, but is not limited to, detecting at least one of the following:
[0190] The original file to be edited has changed from being edited to being edited.
[0191] The original file to be edited should change from a state where editing is prohibited to a state where editing is permitted.
[0192] The original file to be edited has changed from being in an access-forbidden state to an access-allowed state.
[0193] As can be seen, by using the above step S610, multiple people are not allowed to review / edit the same original file at the same time, thus ensuring that each edited version of a file is updated linearly on the original version rather than in a tree structure. This ensures the consistency of the final version used and the consistency of the content of each version during the management process, simplifies the complexity of management, and improves the reliability of management.
[0194] In some embodiments of this example, after step S110, the method further includes: determining whether the version of the original file to be edited corresponding to the received file editing request is the latest version; if so, the copy file data of the original file to be edited can be directly sent to the terminal device as a copy HTML file stream; if not, a version reminder message can be sent to the user who sent the file editing request, and the version reminder message may include, but is not limited to, at least one of the following:
[0195] Latest version information;
[0196] The copy file data corresponding to the original file in the latest version.
[0197] Therefore, the latest version message and / or a copy of the original file corresponding to the latest version can be sent to the user. This serves two purposes: firstly, it reminds the user that the currently invoked version is not the latest version; secondly, it allows the user to select the latest version for review and editing, preventing the user from selecting the wrong version. In some application scenarios, the version reminder message may include a reminder that the user must select the latest version for review and editing, or it may not include this reminder message but the system still forces the user to select the latest version file for review and editing, thus ensuring that each edited version of a file updates in a linear fashion from the original version.
[0198] For example, assuming a file has versions V1.0, V2.0, and V3.0, upon receiving a file editing request, the system retrieves the version of the original file to be edited (let's say V2.0) and the latest version V3.0. Based on the obtained version information, it determines that the version of the original file to be edited corresponding to the received file editing request is not the latest version. A version reminder message is then sent to the user who sent the file editing request. This message includes at least one of the latest version information V3.0 and the corresponding copy file data. Optionally, it may also include informing the user that they must select the latest version V3.0 for review and editing. This ensures that each edited version of the file is updated linearly from the original version. For example, the final updated versions might be V1.0, V2.0, V3.0, V4.0, Vn-1.0, Vn (linear), guaranteeing consistency in the final version used and the consistency of content across versions during management, simplifying management complexity, and improving management reliability.
[0199] In some embodiments of this example, after detecting that editing has ended, step S510 may further include generating revision record information using any of the following methods:
[0200] Method 1: Generate revision history information in the updated file based on the copy HTML file stream obtained in step S410; the copy HTML file stream obtained in step S410 includes data added and deleted during the user's editing process, so revision history information can be directly generated based on this copy HTML file stream;
[0201] Method 2: Compare the updated file obtained in step S610 with the original file and / or a copy of the original file in step S210 (the comparison can be done using, but is not limited to, the diff algorithm), and generate revision record information in the updated file based on the comparison result; that is, directly compare the latest version with the previous version of the file to obtain the revised content, and then generate revision record information.
[0202] Method 3: Combine Method 1 and Method 2. For example, use Method 2 to compare the latest version with the previous version of the file to obtain the revision content. Then compare this with the revision content corresponding to the copy HTML file stream in Method 1, and take the union of the two to obtain the final revision content. Generate revision record information based on the final revision content. Alternatively, compare the revision record information generated by Method 1 and Method 2, and take the union of the two to obtain the final revision content. Method 3 can minimize the omission of revision information records.
[0203] In this embodiment, the generated revision record information includes not only the content added and deleted during the user's editing process, but also the editing time, location (which can be information representing the location such as the physical location information of the terminal device or IP address information), and user information (including at least one of the following: user identity information, user's department, and job title). Since revision record information is generated in the updated file, when viewing each edited version file, the differences from the previous version, as well as the specific editing time, location, and editor information, can be obtained from the revision record information in that file. This facilitates the current user's decision-making and editing operations, and also facilitates subsequent review and tracing.
[0204] In another embodiment of this example, when generating revision record information for a new version file generated after the current edit, such as version Vn.0, when generating revision record information comparing its differences with Vn-1.0, the revision record information of each updated version file generated after the previous edit is also summarized into the version Vn.0 file. This allows users to view the content and process of historical editing and revisions globally in the version Vn.0 file, enriching and strengthening the user's decision-making basis, improving efficiency and user experience satisfaction.
[0205] In one embodiment of this example, see Figure 2 As shown, the file management system includes a client browser terminal D1 (i.e., a terminal device), an application server D2, and a database D3. An example application server includes a first temporary storage area, Template1. In this embodiment, the file secure storage area in step S210 includes a first file secure storage area in the database D3, which is communicatively connected to the application server D2. The files stored in the first file secure storage area are HTML files. When the file secure storage area corresponding to a file editing request is the first file secure storage area, the original file to be edited and its copy file data are HTML files.
[0206] In this embodiment, after obtaining a copy of the original file to be edited from the corresponding secure file storage area according to the file editing request, the method further includes storing the obtained copy of the file in a first temporary storage area on the application server.
[0207] In this embodiment, after obtaining the edited HTML file stream generated by editing the document to be edited from the terminal device in step S410, the obtained edited HTML file stream is stored in the first temporary storage area;
[0208] In this embodiment, step S510, generating an updated file based on the copy HTML file stream and the obtained editable HTML file stream, includes: generating a new HTML file based on the copy HTML file stream and the obtained editable HTML file stream, and storing the new HTML file in the first file secure storage area. In this embodiment, the original file to be edited and the edited new version file are directly stored in HTML format, resulting in a simple system architecture and high processing efficiency.
[0209] In another embodiment of this example, see Figure 2 As shown, the file management system includes a client browser terminal D1 (i.e., a terminal device), an application server D2, and a file creation server. The file creation server includes an online document server D7 and a document control module D4. The online document server D7 and the document control module D4 can be implemented through a single physical server, or through different physical servers, individually or jointly. In this embodiment, the file secure storage area in step S210 includes a second file secure storage area in the file creation server that is communicatively connected to the application server D2 (see, for example, but not limited to, the file secure storage area in the application server D2). Figure 2 In the document control module D4 (Template2), the files stored in the second file secure storage area are Office files; when the file secure storage area corresponding to the file editing call request is the second file secure storage area, the original file to be edited is an Office file; the step S310 above, sending the copy file data as a copy HTML file stream to the terminal device, includes: receiving the HTML file stream obtained by the file creation server from the copy file data, and sending the HTML file stream to the terminal device. After obtaining the copy file data of the original file to be edited from the corresponding file secure storage area according to the file editing call request, the step S310 above further includes: storing the obtained HTML file stream of the copy file data in the first temporary storage area on the application server.
[0210] In one application example of this embodiment, after obtaining the edited HTML file stream generated from editing the document to be edited from the terminal device in step S410, the obtained edited HTML file stream is stored in the first temporary storage area; the generation of an updated file based on the copy HTML file stream and the obtained edited HTML file stream in step S510 includes: generating a new HTML file based on the copy HTML file stream and the obtained edited HTML file stream, and storing the new HTML file in the first file secure storage area. The first file secure storage area can be, but is not limited to, the file secure storage area in the database in the above embodiments. That is, in this application example, for the document to be edited in Office format, the generated edited file can be an HTM format file, which can provide conversion and storage of different file formats during the file editing process, thereby better meeting diverse and personalized needs and improving the intelligence of the system. In one application scenario of this application example, after generating the new HTML file, the method further includes: the application server sends the new HTML file to the file creation server, so that the file creation server can convert the new HTML file into a new Office file and store it in the second file secure storage area. In this application scenario, in addition to online editing and generating / storing Office documents, HTML files can also be generated and stored. The generated and stored Office documents and HTML files can serve as backups for each other. If the secure storage area is damaged, corrupted, or illegally accessed, the corresponding HTML file can be retrieved from the database. After the crisis is resolved, the retrieved HTML file can be converted back into an Office document and stored in the secure storage area. Conversely, if the database is damaged, corrupted, or illegally accessed, the corresponding Office document can be retrieved from the secure storage area, and after the crisis is resolved, the retrieved Office document can be converted back into an HTML file and stored in the database. Therefore, this significantly improves the disaster recovery performance of the file management system and further enhances its reliability. On the other hand, the file management system can also selectively select HTML files or Office documents based on specific application scenarios or user habits for users to view, modify, or review, meeting diverse user needs and further improving the user experience.
[0211] In another application example of this implementation, the process of directly generating an Office format file from an edited file includes:
[0212] After obtaining the edited HTML file stream generated by editing the document to be edited from the terminal device in step S410 above, the application server also includes: sending the obtained edited HTML file stream to the file creation server so that the file creation server can store it in its cache;
[0213] Step S510 above, after detecting the completion of editing, generates an updated file based on the copy HTML file stream and the obtained edited HTML file stream, including:
[0214] The notification indicates that the file creation server has finished editing, and allows the file creation server to extract the edited HTML file stream stored in its cache and place it in a placeholder file in its second temporary storage area, and to convert the data in the placeholder file into an Office document and store it in the second secure file storage area;
[0215] The placeholder file is generated by the file creation server in the second temporary storage area after the application server receives a file editing request.
[0216] In this example, during online editing of an Office document, data entered by the user through the terminal device is stored in the cache area of the file creation server before the editing ends, and is not stored in the local second temporary storage area or other storage areas of the file creation server. That is, before the end of editing is detected, the data entered by the user through the terminal device is securely isolated from the data in the local second temporary storage area or other storage areas of the file creation server. Therefore, data pollution during the file editing process can be avoided, ensuring system reliability and security. In addition, the first temporary storage area, cache area and second temporary storage area in this application example not only achieve physical or logical security isolation, but also ensure that only the file content entered by the legitimate and genuine user is completely preserved through a security authentication mechanism (such as the application server authenticating the legitimacy of the user based on the file editing call request). This greatly improves the security of the file editing process and effectively prevents the risk of malicious modification and unauthorized access. Moreover, the file creation server only fills the placeholder file with the corresponding data from the cache area at the last moment when the editing ends. This not only pre-customizes the temporary storage space, but also ensures the security and reliability of the second temporary storage space as much as possible. Furthermore, the generated placeholder file can be used directly as a file handle, and can also prevent the risk of overwriting caused by other references.
[0217] In some embodiments of this example, when generating an updated file based on the copy HTML file stream and the obtained edited HTML file stream in step S510, the update of file metadata may also be included. For example, second file metadata may be generated based on the first file metadata of the copy HTML file stream, and an updated file may be generated based on the second file metadata, the copy HTML file stream, and the edited HTML file stream. It is understood that, to facilitate differentiation between the files before and after modification, the metadata of the modified file can be generated based on the copy data of the file before modification. For example, if the version number of the file before modification is V1.0, then the version number of the updated file can be V2.0. In this embodiment, the differentiation between the files before and after modification can also be achieved based on metadata, improving the user experience.
[0218] To further facilitate understanding, the following will be combined with... Figure 2 The system shown illustrates the online editing process for Office format files, which includes:
[0219] S31 and D1 receive the user access request and complete the user login authentication;
[0220] S32 and D1 receive instructions from users to review or edit documents, or other instructions to initiate revisions to the document (i.e., file editing request).
[0221] In this example, users can enter the corresponding folders to view the files mapped and displayed by D2 in each folder. For example, users can view files awaiting review in the "Pending Review" section; edit their documents in the "My Documents" section, etc. For ease of understanding, file editing call requests will be referred to as "reprocessing instructions" and the corresponding files will be referred to as "files to be edited".
[0222] S33 and D2, based on the reprocessing instruction, call D7 to read the instruction in the Master area of D4 (document control module) to read the Word file corresponding to the file to be edited, convert it into a file stream and transmit it to D1 through D2. After being converted into HTML format by D1, it is displayed.
[0223] The example implementation process is as follows: When the user reviews the file metadata through D2, D7 reads the Word file to which the current file belongs. Through streaming data, it uses Redis and PostgreSQL to decompose the Office metadata of the Word document and cache it in the cache. At the same time, it stores the document editing status and change action fingerprint in PostgreSQL. Then, it transmits the decomposed streaming data to D1 through Websocket. After receiving it, D1 uses an algorithm to draw on canvas to realize online viewing and editing of the Word file.
[0224] Furthermore, in this example, after receiving a file review or edit instruction, D2 can first determine whether the file corresponding to the instruction is currently under review / editing before executing the subsequent steps in S33. If so, the review / editing request is rejected. That is, a file can be viewed by multiple people at the same time, but not reviewed / edited simultaneously. This ensures that other versions of a file are updated linearly based on the original version, rather than in a tree-like manner. This guarantees the consistency of the final version used and the consistency of content across versions during management. It simplifies management complexity and improves management reliability.
[0225] The determination method may be one of the following, but is not limited to:
[0226] D2 can determine whether the current file is in Template1.
[0227] D2 can determine whether the current file is in the cache of D7;
[0228] Does D2 have a record of the file in the drafts folder? During the editing process, if a file is not saved within a preset time (e.g., 5 minutes), it will be automatically saved to the drafts folder; therefore, the presence of a file in the drafts folder indicates that it is in editing mode.
[0229] D2 can determine whether a review / edit request for the file has been received previously, and whether the file has not yet been reviewed / edited.
[0230] S34: D7 simultaneously loads the file stream from S33 into the buffer and sends a placeholder file generation request to D4 to generate a placeholder file in the Template ate2 area;
[0231] S35: D1 calls the D7 online document server through D2 to read the original version data of the Word file corresponding to the file to be edited in the Master area of D4, and then uses canvas to draw the difference comparison after comparing the content. For example, D1 uses the JavaScript SDK to request D7 to read the content of the previous version, compares the content, and then uses canvas to draw the difference comparison.
[0232] Optionally, in this example, D1 can execute S35 only after detecting the user's instruction to submit the document (i.e., complete editing or review), that is, after the user has completed editing or reviewing. This method requires the least resources and has the highest resource utilization. Of course, real-time recording and drawing during the modification process can also be used; this solution is disclosed in the specification and is not considered a protection solution.
[0233] S36: D7 listens to D2 to obtain the data (including modified data, review comments, and difference ratio data) of the user's editing of the file to be edited on D1 and stores it in the corresponding file stream in the cache; after D7 detects that the user has submitted the document (i.e., completed the editing or review), the D7 online document server closes the user's editing or review rights on D1.
[0234] S37: D7 fills the file stream in the cache area into the corresponding placeholder file in the Template2 area and refreshes the metadata (including the version number, such as V2 version); then fills it into the placeholder file in the Template2 area to convert it into a formal Word document; and stores it in the Master file area (final version storage area), and maintains a link to the new version of the Word document in D2 so that authorized users can access it.
[0235] Therefore, in this embodiment, the file stream in the D7 cache does not directly enter the Template2 area. Instead, it enters the Template2 area only after confirming that the review / editing permissions are closed, avoiding data contamination during the file editing process and further ensuring system reliability and security. Furthermore, the Template2 area and the Master file area are securely isolated, further ensuring that the official document in the Master file area is not contaminated. Thus, each version of each file involved in the revision process (original version, version edited each time, version reviewed each time) exists independently in the Master area, ensuring data traceability. Moreover, in this embodiment, the differences between versions are recorded for modified content, modification records, and review records, ensuring comprehensive and clear file records.
[0236] To further facilitate understanding, the following will be combined with... Figure 2 The system described illustrates the online editing process for HTML files, which includes:
[0237] S41 and D1 receive the user access request and complete the user login authentication;
[0238] S42 and D1 receive instructions from users to review or edit documents, or other instructions to initiate revisions to the document (i.e., file editing request).
[0239] S43 and D2 read the contents of the file through D3 and display them through D1 based on the file editing request;
[0240] In this example, after receiving a file review or edit instruction, D2 can first determine whether the file corresponding to the instruction is currently in a review / edit state before executing the subsequent steps in S43. If so, the review / edit request is rejected. The determination method can be one of the following, but is not limited to:
[0241] D2 can determine whether the file is currently in the cache.
[0242] D2 can determine whether a review / edit request for the file has been received previously, and whether the file has not yet been reviewed / edited.
[0243] S44: D2 obtains the editing data transmitted by the user through D1, reads the data of the previous version from D3, calculates the two versions through the intelligent DIFF algorithm, and processes and marks the differences;
[0244] S45: D2 identifies laboratory information and application scope based on the metadata attached to the document via D5, and obtains the following information: header HTML code, footer HTML code, margin configuration, etc.
[0245] S46: D2 combines the data results from the above two steps and provides the content rendered in D1: HTML content that can be rendered in a browser; or HTML can be converted to PDF using a PDF converter.
[0246] In this example, the user reviews the content based on the provided rendered content. If there are any errors, the user can directly revise the erroneous content. After revision, steps S44 to S45 are repeated to refresh the difference comparison and update the content.
[0247] S47: After receiving the user's instruction to review or revise the document, D2 refreshes the file's metadata (author, controller, file number, version number, reviewer, approver, review date, approval date, effective date, trial users, laboratory information, etc.) and automatically renders it into the file content during user preview, as well as storing it in D3 (database).
[0248] In some embodiments of this example, the file management system also provides an online preview mode. The online preview mode involves reserving files in the following process: D2 reads the file to be previewed from D3 or D4, then performs file conversion control, and subsequently renders the header and footer. Specifically, for HTML files, the PDF generation unit can be used for rendering; for Office documents, rendering can be done in D7, and then rendered on the terminal device.
[0249] In some implementations of this embodiment, after a file is created and / or edited, a draft can be transferred: that is, the file created / edited by the user can be stored in the draft box and transferred to a designated person through a preset process: the drafter transfers the draft content to the designated person; the designated person receives the document compilation task; after compilation is completed, the designated person can apply to return the draft; the drafter can reject the return application; after the drafter accepts, the draft content is automatically refreshed and the document application can be submitted directly.
[0250] In some implementations of this embodiment, the above-mentioned file metadata control implementation principle can be: configuring preset fields through category folders: file number prefix, starting version number, header preset, preset reviewer, preset approver, and preset applicable object; automatically reading the category configuration fields during creation and automatically filling in the file number, version number, compiler, reviewer, etc.; the system automatically reads the current time as the compilation date and automatically reads the approval time as the effective date, and the effective date provides change support; and automatically generates approval records when the review is approved.
[0251] In some embodiments of this example, the file transfer system also provides access control and electronic circulation functions. For example, it constrains the scope of permissions through three personnel attribute type fields: 1) personnel 2) department 3) position; it restricts access personnel through module access permissions and permission scope; users can circulate files through browsers and apps' HTML and online office rendering; the system automatically adds a watermark controlled stamp to the file and inserts it into the content, displays the user's name and circulation time, and automatically reloads the watermark if the user illegally deletes it, while also automatically adding it to the file content; it prohibits users from right-clicking, long-pressing, copying, and pasting operations; users can manually click to circulate and fill in circulation comments to complete the circulation task; the system judges the circulation status based on the task deadline, dividing it into three states: normal circulation, timed-out circulation, and timed-out non-circulation.
[0252] In some embodiments of this example, the file transfer system also provides an intelligent e-book module, for example: triggering an e-book generation task, selecting whether to generate a watermark, and entering the generation queue after triggering; the consumer downloads all chapter files in the selected category folder as PDFs in D2; resetting the page number fields in the PDF header and footer; generating an e-book cover using template technology; calculating the total number of pages and the starting page number of each chapter based on the chapter files; automatically generating a table of contents using the chapter and page number data; merging the cover, table of contents, and PDF files of each file into one PDF file, and regenerating the page numbers for each page; refreshing the page number content in the PDF header and footer; storing the processed PDF file in an internal resource server container and refreshing the storage address (D3 (database)); notifying that the e-book task is complete; (D1) the dynamic request status acquisition is complete, refreshing the e-book status and displaying the controlled access address of the e-book.
[0253] In some implementations of this embodiment, the file transfer system also provides a one-click controlled sharing module. An example implementation process is as follows: The user creates sharing item data and configures the data source: file, folder, e-book; the remote access address, dynamic random password, and QR code are automatically generated by the algorithm upon publication; visitors can access the shared file by scanning the QR code using apps such as WeChat, QQ, and Alipay, or by accessing the shared file through a hyperlink address. After entering the password, they can access the watermarked file and generate an access record.
[0254] This embodiment also provides a file creation server; please refer to [link / reference]. Figure 5 It includes:
[0255] The interaction module 10 is used to respond to document creation instructions from the application server and provide an interactive interface for creating office documents online to the terminal device through the application server; the specific execution process is shown in, but not limited to, step S10 above.
[0256] The receiving module 20 is used to receive a document conversion instruction from the application server. The document conversion instruction includes file stream extraction information, file metadata information, and security authentication information generated by the application server in response to the document creation request. The specific execution process is shown in, but is not limited to, step S20 above.
[0257] The first caching module 30 is used to perform security authentication based on the security authentication information. After the authentication is successful, a placeholder file is generated in the second temporary storage area on the local machine, and the HTML file stream is extracted from the first temporary storage area of the application server and stored in the local cache area based on the file stream extraction information. The specific execution process is shown in step S30 above, but is not limited to.
[0258] The second caching module 40 is used to store the new HTML file stream into the cache area when the application server detects the new HTML file stream; the specific execution process is shown in, but not limited to, step S40 above.
[0259] The filling module 50 is used to fill the placeholder file with the HTML file stream in the cache area and the metadata corresponding to the file metadata information when the file submission condition is triggered, and to convert the data in the placeholder file into Office format to generate an Office document; the specific execution process is shown in step S50 above, but is not limited to.
[0260] Storage module 60 is used to store the Office document in a local secure storage area. The specific execution process is shown in, but not limited to, step S60 above.
[0261] This embodiment provides a file creation server applicable to the medical laboratory field. See [link / reference] Figure 4 As shown, the application server includes a memory, a processor, and a computer program stored in the memory and accessible by the processor, the computer program being configured to implement the steps of the online file security management method described above.
[0262] This embodiment also provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the file management method described in the above embodiments. The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. The aforementioned computer-readable storage medium may be included in a terminal device; or it may exist independently and not assembled into a terminal device.
[0263] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0264] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0265] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described file management method, thereby solving the technical problem of how to manage files to prevent files that need to be modified from being contaminated. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the file management method provided in the above embodiments, and will not be repeated here.
[0266] This embodiment also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the file management method described above.
[0267] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. An online file security management method applied to the field of medical laboratories, characterized in that, The online file security management method comprises the following online file creation steps performed by a file creation server: in response to a document creation instruction from an application server, providing an interactive interface for a terminal device to create an office document online through the application server; the document creation instruction comprises an instruction generated by the application server according to a document creation request from the terminal device; receiving a document conversion instruction from the application server, the document conversion instruction comprising file stream extraction information, file metadata information and security authentication information generated by the application server for the document creation request; performing security authentication according to the security authentication information, generating a placeholder file in a local second temporary storage area after determining that the authentication is passed, and extracting an HTML file stream from a first temporary storage area of the application server according to the file stream extraction information and storing the HTML file stream to a local cache area; the HTML file stream is obtained by the application server converting data transmitted by the terminal device in response to user input in the interactive interface; when the application server monitors new HTML file stream, storing the new HTML file stream to the cache area; when a file submission condition is triggered, filling the HTML file stream in the cache area and the metadata corresponding to the file metadata information into the placeholder file, converting data in the placeholder file into an office format to generate an office document; storing the office document in a local secure storage area.
2. The online file security management method of claim 1, wherein, The file creation server comprises a document control module and an online document service module; the security authentication according to the security authentication information comprises: the document control module performs a first security authentication according to the security authentication information, and forwards the document conversion instruction to the online document service module after the first security authentication is passed; the online document service module performs a second security authentication according to the security authentication information, and determines that the authentication is passed when the second security authentication is passed.
3. The online file security management method of claim 1, wherein, The file submission condition comprises at least one of the following: receiving a document submission instruction; no new HTML file stream is monitored within a preset time period; monitoring an instruction from the application server to close an editing function on the interactive interface; monitoring that an error saving condition is triggered.
4. The online file security management method of claim 1, wherein, The file metadata information is metadata or metadata index corresponding to a document type obtained by the application server from a database according to the document type; when the file metadata information is a metadata index, before filling the metadata into the placeholder file, the method further comprises: obtaining corresponding metadata from the database through the application server according to the metadata index.
5. The online file security management method of any one of claims 1-4, wherein, The conversion of data in the placeholder file into an office format comprises: reading data in the placeholder file to obtain each HTML element to be converted; converting each HTML element and the docbuilder syntax of office; The docbuilder syntax obtained by the conversion is combined and spliced to obtain a docbuilder file for execution by the docbuilder service of the office.
6. The online file security management method of any one of claims 1-4, wherein, After receiving the document conversion instruction from the application server, the method further comprises: When detecting that there is illegal input data in the HTML file stream, performing security processing; The security processing comprises at least one of the following: Recording and / or outputting security warning information; Clearing the HTML file stream stored in the cache area; Notifying the application server to clear the HTML file stream stored in the first temporary storage area.
7. The online file security management method of any one of claims 1-4, wherein, The method further comprises: When detecting that a file submission condition is triggered, sending the HTML file stream in the cache area and the file metadata information to the application server, so that the application server generates an HTML file and stores the HTML file in a database connected thereto.
8. A file creation server, characterized by Applied to the field of medical laboratories, the file creation server comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the online file security management method according to any one of claims 1 to 7.
9. An online file security management system characterized by, Applied to the field of medical laboratories, the online file security management system comprises an application server and a file creation server according to claim 8, wherein: The application server is configured to send a document creation instruction to the file creation server according to a document creation request from the terminal device, and receive data input by a user in an interactive interface for online creation of an office document by the terminal device and convert the data into an HTML file stream stored in a first temporary storage area locally, and send a document conversion instruction to the file creation server, the document conversion instruction comprising file stream extraction information, file metadata information, and security authentication information generated for the document creation request; The file creation server is configured to provide the interactive interface for the terminal device through the application server in response to the document creation instruction, receive the document conversion instruction from the application server, perform security authentication according to the security authentication information, generate a placeholder file in a second temporary storage area locally after determining that the authentication is passed, extract an HTML file stream from the first temporary storage area of the application server according to the file stream extraction information and store the HTML file stream in a cache area locally, store a new HTML file stream in the cache area through the application server when a new HTML file stream is monitored, fill the HTML file stream in the cache area and corresponding metadata of the file metadata information into the placeholder file when a file submission condition is triggered, convert data in the placeholder file into an office format to generate an office document, and store the office document in a security storage area locally.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the online file security management method according to any one of claims 1 to 7.
11. A computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the online file security management method according to any one of claims 1 to 7.