Online file security management method, application server, storage medium and program
By receiving file editing requests in the medical laboratory electronic document management system, obtaining copies of the files, and generating updated versions, the system addresses the security and reliability deficiencies of existing systems, thereby improving file traceability and security 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
Existing electronic document management systems for medical laboratories cannot seamlessly adapt to the needs of medical laboratories and have insufficient security and reliability. In particular, they cannot trace historical versions during the document approval process and are prone to security risks due to unauthorized intrusion.
This paper provides an online file security management method that receives file editing requests through an application server, obtains a copy of the file to be edited and displays it on the terminal device, generates an updated version of the file after editing, and archives the original file in a secure storage area, thus ensuring the security and reliability of the file editing process.
It enhances the security and reliability of the medical laboratory document management system, enabling traceability of historical versions, preventing unauthorized tampering, simplifying management complexity, and improving user experience.
Smart Images

Figure CN121637546A_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, an application server, a storage medium and a program. BACKGROUND
[0002] With the rapid development of information technology, the quality management requirements of medical laboratories are gradually converted from paper files to electronic file management, and are used as core proof materials for external inspection and review of medical laboratories (ISO15189 review, Grade Hospital Review, Flight Inspection, etc.). There is no electronic file management system specially designed for medical laboratories. The online electronic file management system used in other fields is difficult to seamlessly adapt to the needs of medical laboratories, and the underlying security and reliability are poor. In the field of medical laboratories, one of the most frequent file management use scenarios is file approval, and many approval processes may involve multi-party review, multi-level review, and repeated revision before the final release version is formed. The more review nodes, the more complex the management. For example, in the related art, for the approval process of a file, the current node will call out the source file of the file to be approved from the system for approval and revision to generate an updated new version file, which is then passed to the next node. In this way, the final review node is approved and released. For the file, the system stores the source file of the final release version of the file after the final release. The related art at least has the following problems:
[0003] Firstly, the system only stores a single version corresponding to the current node at any approval node, and cannot obtain historical versions for tracing and reviewing when necessary;
[0004] Secondly, in the review process, each approval node directly calls the source file to revise the source file. If the system is illegally invaded and the source file is illegally revised, and since there is no historical version for tracing to find problems, it may cause serious security problems. This is unacceptable for the medical laboratory field which has strict requirements for security and reliability.
[0005] Therefore, it is necessary to provide an electronic online file security management method and system specially designed for medical laboratories and having better security and reliability. SUMMARY
[0006] The main purpose of the present application is to provide an online file security management method, an application server system, a storage medium and a program specially designed for medical laboratories and having better security and reliability.
[0007] To achieve the above object, the application provides an online file security management method applied to the field of medical laboratories, which comprises the following file editing management steps performed by an application server:
[0008] receiving a file editing call request from a terminal device;
[0009] obtaining copy file data of an original file to be edited from a corresponding file security storage area according to the file editing call request;
[0010] sending the copy file data to the terminal device in the form of a copy HTML file stream so that the terminal device displays a corresponding document to be edited in an online document editing interface;
[0011] obtaining an edited HTML file stream generated by editing the document to be edited from the terminal device;
[0012] generating an updated file according to the copy HTML file stream and the obtained edited HTML file stream after detecting the end of editing.
[0013] In an embodiment, after receiving the file editing call request from the terminal device, the method further comprises judging whether the original file to be edited is currently in a preset control state, and performing security control processing on the file editing call request if the original file to be edited is currently in the preset control state.
[0014] The preset control state comprises at least one of the following:
[0015] The original file to be edited is currently in an editing state;
[0016] The original file to be edited is currently in an editing prohibited state;
[0017] The original file to be edited is currently in an access prohibited state;
[0018] And / or, the security control processing comprises at least one of the following:
[0019] rejecting the execution of the file editing call request;
[0020] rejecting the obtaining of the edited HTML file stream generated by editing the document to be edited from the terminal device;
[0021] discarding the edited HTML file stream generated by editing the document to be edited from the terminal device;
[0022] discarding or isolating the updated file.
[0023] In an embodiment, after detecting the end of editing, the method further comprises:
[0024] generating revision record information in the updated file according to the copy HTML file stream;
[0025] and / or, comparing the updated file with the original file and / or the copy file data of the original file, and generating revision record information in the updated file according to the comparison result.
[0026] In an embodiment, the file security storage area includes a first file security storage area in a database in communication connection with the application server, and the file stored in the first file security storage area is an HTML file.
[0027] When the file security storage area corresponding to the file editing call request is the first file security storage area, the original file to be edited and the copy file data are HTML files.
[0028] After obtaining the copy file data of the original file to be edited from the corresponding file security storage area according to the file editing call request, the method further includes:
[0029] storing the obtained copy file data in a first temporary storage area locally;
[0030] storing the obtained edited HTML file stream in the first temporary storage area after the edited HTML file stream is generated by editing the original document to be edited obtained from the terminal device;
[0031] generating an updated file according to the copy HTML file stream and the obtained edited HTML file stream includes:
[0032] generating a new HTML file according to the copy HTML file stream and the obtained edited HTML file stream, and storing the new HTML file in the first file security storage area.
[0033] In an embodiment, the file security storage area includes a second file security storage area in a file creation server in communication connection with the application server, and the file stored in the second file security storage area is an office file.
[0034] When the file security storage area corresponding to the file editing call request is the second file security storage area, the original file to be edited is an office file.
[0035] The method of sending the copy file data to the terminal device in a copy HTML file stream includes:
[0036] receive the HTML file stream converted by the file creation server from the copy file data, and send the HTML file stream to the terminal device.
[0037] In an embodiment, after obtaining the copy file data of the original file to be edited from the corresponding file security storage area according to the file editing call request, the method further comprises: storing the HTML file stream of the obtained copy file data in a local first temporary storage area;
[0038] storing the obtained editing HTML file stream in the first temporary storage area;
[0039] generating an updated file according to the copy HTML file stream and the obtained editing HTML file stream.
[0040] generating a new HTML file according to the copy HTML file stream and the obtained editing HTML file stream, and storing the new HTML file in the first file security storage area.
[0041] In an embodiment, generating an updated file according to the copy HTML file stream and the obtained editing HTML file stream further comprises:
[0042] sending the new HTML file to the file creation server, so that the file creation server converts the new HTML file into a new office file and stores the new office file in the second file security storage area.
[0043] In an embodiment, after obtaining the editing HTML file stream generated by editing the document to be edited from the terminal device, the method further comprises:
[0044] sending the editing HTML file stream to the file creation server, so that the file creation server stores the editing HTML file stream in its cache;
[0045] generating an updated file according to the copy HTML file stream and the obtained editing HTML file stream after detecting the end of editing.
[0046] notifying the file creation server of the end of editing, so that the file creation server extracts the editing HTML file stream stored in its cache and the editing HTML file stream into a placeholder file in its second temporary storage area, and converts the data in the placeholder file into an office document and stores the office document in the second file security storage area.
[0047] The placeholder file is generated by the file creation server in the second temporary storage area after the application server receives the file editing call request.
[0048] In an embodiment, the step of generating an updated file according to the copy HTML file stream and the obtained editing HTML file stream comprises:
[0049] generating second file metadata according to the first file metadata of the copy HTML file stream, and generating an updated file according to the second file metadata, the copy HTML file stream and the editing HTML file stream.
[0050] In addition, to achieve the above object, the present application further provides an application server applied to the field of medical laboratories, comprising a memory, a processor and a computer program stored in the memory and invokable by the processor, and the computer program is configured to implement the steps of the online file security management method.
[0051] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, and the 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.
[0052] In addition, to achieve the above object, the present application further provides a computer program, which is executed by a processor to implement the steps of the online file security management method.
[0053] The online file security management method, the application server, the storage medium and the program provided by the present application are applied to the field of medical laboratories, and the management steps of file editing comprise that the application server receives a file editing call request from a terminal device, then obtains copy file data of an original file to be edited from a corresponding file security storage area according to the file editing call request, then sends the copy file data to the terminal device in a copy HTML file stream, so that the terminal device displays a corresponding document to be edited in an online document editing interface, which can facilitate a user to audit and revise based on the displayed document, and obtains an editing HTML file stream generated by editing the document to be edited from the terminal device, and generates an updated file according to the copy HTML file stream and the obtained editing HTML file stream after detecting that the editing is completed.
[0054] In the file review process, the file presented to the user for review and editing is a copy of the file data to be reviewed, and the original file (i.e. the source file) is still stored in the secure storage area. Even when the user is an illegal user, or when the copy of the file data is illegally tampered with during the editing process, the security of the original file is not threatened, thereby improving the security and reliability of the system;
[0055] Since each version of the file is edited by editing its copy of the file data to generate a new version, the original file of the previous version is archived in the file security storage area, which can meet the demand for retrieving any version of the file before the current version, improve the reliability of the system, and facilitate comparison between versions, traceability and review.
[0056] In addition, the above scheme is designed specifically for medical laboratories, not simply applied to online file management systems in other fields, which can better meet the management needs of medical laboratories. BRIEF DESCRIPTION OF DRAWINGS
[0057] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings from these drawings without creative labor.
[0059] Figure 1 The online file security management method flowchart provided by the embodiments of the present application;
[0060] Figure 2 The file management system structure diagram provided by the embodiments of the present application;
[0061] Figure 3 The interactive interface diagram provided by the embodiments of the present application;
[0062] Figure 4 The structure diagram of the application server provided by the embodiments of the present application.
[0063] The purpose of the present application, the functional characteristics and advantages will be further explained with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0064] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0065] For better understanding of the technical solutions of the present application, the following will be described in detail in combination with the drawings of the specification and specific embodiments.
[0066] The present embodiment provides an online file security management method dedicated to medical laboratories, which is specially developed and designed according to the electronic file management needs in the field of medical laboratories, rather than simply applying the electronic online file security management method of other fields. Therefore, the underlying security and reliability have a natural advantage over other electronic online file security management methods and systems. Referring to Figure 1 The online file security management method includes the following file editing management method steps performed by the application server:
[0067] Step S10, receiving a file editing call request from a terminal device.
[0068] In the present embodiment, the terminal device includes various user layer devices directly facing users, including but not limited to PC, mobile intelligent terminal (such as notebook, tablet, mobile phone, smart watch, etc.). For users, the process of online file editing can be directly operated on the terminal device, which is convenient and efficient, especially suitable for user office in various scenarios.
[0069] In the present embodiment, the application server can serve as a control center, and all interactions between the terminal device and other modules in the system are realized through the application server, that is, the centralized security management of interactive information can be realized through the application server, with high control integration, good uniformity, better security and reliability.
[0070] In the present embodiment, the user can issue a file editing call request to the application server on the terminal device, and the issuing mode can include but is not limited to at least one of touch, voice recognition, gesture recognition, facial recognition and mouse key.
[0071] In an embodiment of the present embodiment, the file editing call request can include user identity verification information and to-be-edited file information (which can include various information that can uniquely identify the to-be-edited file, such as but not limited to at least one of file storage address, file number, etc.), and the application server, after receiving the file editing call request, performs identity security authentication on the currently accessed user according to the user identity verification information included therein, and only after the authentication is passed, the subsequent steps are executed. Of course, in other embodiments, the user identity verification information can be sent to the application server separately or together with other information before the terminal device issues the file editing call request to the application server, so as to perform identity security verification on the currently accessed user by the application server.
[0072] Step S20, according to the file editing call request, obtaining the copy file data of the original file to be edited from the corresponding file security storage area.
[0073] In this embodiment, the file to be edited includes at least one of the file created online in advance through the file management system and the file directly imported from the outside. For example, at least one of the online created Office file, HTML file and directly imported Office file, HTML file.
[0074] In this embodiment, the online Office file includes but is not limited to Microsoft Office file, WPS (Word Processing System) Office file and other types of online Office file (such as LibreOffice, Only Office, etc.).
[0075] The file to be edited in this embodiment is stored in the file security storage area. In some examples, when the file in the file security storage area is accessed, it needs to pass through a preset security audit process (such as an audit access process) to normally access, thereby improving the storage security; in some other examples, at least one backup area can be set in the file security storage area to store backup files, thereby improving the reliability.
[0076] Step S30, sending the copy file data to the terminal device in the form of a copy HTML file stream, so that the terminal device displays the corresponding document to be edited in the online document editing interface.
[0077] That is, in this embodiment, for the file to be edited, the copy file data edited by the user is presented to the user, and the original file (i.e. the source file) is still stored in the security storage area. Even when the user is an illegal user, or when abnormal situations such as illegal tampering of the copy file data occur during editing, the security of the original file will not be threatened, thereby improving the security and reliability of the system.
[0078] Step S40, obtaining the editing HTML file stream generated by editing the document to be edited from the terminal device.
[0079] In some examples, the data included in the editing HTML file stream includes but is not limited to newly added data and / or deleted data during editing.
[0080] Step S50, after detecting the end of editing, generating an updated version of the file according to the copy HTML file stream and the obtained editing HTML file stream.
[0081] 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.
[0082] In the field of medical laboratories, one of the most frequent use cases for document management is document approval, and many approval processes involve multiple parties and multiple 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 the complexity of management. To address the above problems, in some embodiments of this example, after step S10, the following step is also included:
[0083] Step S60: 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.
[0084] In some examples, the aforementioned preset control states may include, but are not limited to, at least one of the following:
[0085] The original file to be edited is currently in an editable state;
[0086] The original file to be edited is currently in an edit-prohibited state;
[0087] The original file to be edited is currently in an inaccessible state;
[0088] Furthermore, in some examples, the aforementioned preset control status can be updated by at least one of the system users and service providers.
[0089] In some examples, the above security control procedures include at least one of the following:
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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) reminders 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.).
[0097] 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:
[0098] The original file to be edited has changed from being edited to being edited.
[0099] The original file to be edited should change from a state where editing is prohibited to a state where editing is permitted.
[0100] The original file to be edited has changed from being in an access-forbidden state to an access-allowed state.
[0101] As can be seen, through the above step S60, 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 in a linear fashion on the original version, rather than in a tree-like fashion. This ensures the consistency of the final version used, as well as the consistency of the content of each version during the management process, simplifies the complexity of management, and improves the reliability of management.
[0102] In some embodiments of this example, after step S10, 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:
[0103] Latest version information;
[0104] The copy file data corresponding to the original file in the latest version.
[0105] 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.
[0106] 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.
[0107] In some embodiments of this example, after detecting that editing has ended, step S50 may further include generating revision record information using any of the following methods:
[0108] Method 1: Generate revision history information in the updated file based on the copy HTML file stream obtained in step S40; the copy HTML file stream obtained in step S40 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;
[0109] Method 2: Compare the updated file obtained in step S60 with the original file and / or a copy of the original file in step S20 (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.
[0110] 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.
[0111] 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.
[0112] 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.
[0113] 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 S20 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.
[0114] 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 call request, the method further includes storing the obtained copy of the file in a first temporary storage area on the application server.
[0115] In this embodiment, after obtaining the edited HTML file stream generated by editing the document to be edited from the terminal device in step S40, the obtained edited HTML file stream is stored in the first temporary storage area;
[0116] In this embodiment, step S50, 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.
[0117] 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 S20 above 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 security storage area are Office files; when the file security storage area corresponding to the file editing call request is the second file security storage area, the original file to be edited is an Office file; the above step S30 of sending the copy file data to the terminal device as a copy HTML file stream 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 security storage area according to the file editing call request, the above step S30 also includes: storing the obtained copy file data HTML file stream in the first temporary storage area on the application server.
[0118] 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 S40, 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 S50 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 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.
[0119] In another application example of this implementation, the process of directly generating an Office format file from an edited file includes:
[0120] After obtaining the edited HTML file stream generated by editing the document to be edited from the terminal device in step S40 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;
[0121] Step S50 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:
[0122] 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;
[0123] 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.
[0124] 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.
[0125] 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 S50, 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.
[0126] As described in step S20 above, in this embodiment, the file to be edited includes at least one of the following: a file pre-created online through the file management system, and a file directly imported from an external source. For ease of understanding, the process of creating an Office document online in the file management system is explained below.
[0127] The online file creation method executed by the file creation server in the online file security management method provided in this embodiment includes the following steps:
[0128] Step S110: In response 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.
[0129] 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.
[0130] Step S210: 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.
[0131] In this embodiment, before and / or during the process of sending the document conversion instruction to the file creation server, the application server can respond to data input by the user through the terminal device on the above interactive interface 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:
[0132] 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;
[0133] 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;
[0134] 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.
[0135] 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.
[0136] 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.
[0137] 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.
[0138] Step S310: 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.
[0139] 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.
[0140] 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:
[0141] The document control module performs the first security authentication based on the security authentication information. After the first authentication is successful, the document conversion instruction is forwarded to the online document service module.
[0142] The online document service module performs a second security authentication based on the security authentication information. If the second authentication is successful, the authentication is considered complete.
[0143] 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.
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] In step S410, when a new HTML file stream is detected by the application server, the new HTML file stream is stored in the local cache.
[0149] 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:
[0150] Firstly, it can securely isolate the cached HTML file stream from the second temporary storage space, ensuring security;
[0151] 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.
[0152] 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.
[0153] Step S510: 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.
[0154] Optionally, in this embodiment, the file submission conditions include, but are not limited to, at least one of the following:
[0155] 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;
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] Optionally, in one embodiment of this example, the file creation server converts the data in the placeholder file into Office format, including:
[0161] Read data from the placeholder file to obtain the HTML elements to be converted;
[0162] Convert each HTML element to Office's docbuilder syntax;
[0163] The converted docbuilder syntax is combined and concatenated to obtain a docbuilder file that can be executed by the Office docbuilder service.
[0164] 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 result is saved on the server as xxxxx.docbuilder. The xxxxx.docbuilder file can then be executed using OnlyOffice's official docbuilder service 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 from 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 has 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.
[0165] 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:
[0166] Based on the metadata index, the corresponding metadata is obtained from the database through the application server.
[0167] Step S610: Store the Office document in the local secure storage area (i.e., the second file secure storage area).
[0168] 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 (e.g., an audit access process).
[0169] 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 terminal devices and file creation servers are implemented through application servers, 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.
[0170] 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.
[0171] In one embodiment of this example, to further enhance the security of the file creation process, after step S210, 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:
[0172] Record and / or output security alert information for administrators to investigate and / or review later;
[0173] 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;
[0174] 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.
[0175] Optionally, the security processing method in this embodiment supports updates to user and / or service provision.
[0176] In some embodiments of this example, to further improve the usability, reliability, and security of the file management system, in step S610 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.
[0177] 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.
[0178] To facilitate further understanding, the following will use... Figure 2 The system shown is illustrated as a specific application scenario. The modules described below are designated by their corresponding codes D1, D2, D3, D4, D7, and D8, where:
[0179] 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.
[0180] 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.
[0181] 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., the second temporary storage area), and a master file area (i.e., the 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.
[0182] The D3 and D7 functional modules execute the corresponding service functions according to the calls.
[0183] 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.
[0184] In other scenarios in this example, D2, D4, and D7 can also be integrated on a single server to further improve system integration.
[0185] 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.
[0186] 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:
[0187] A11 and D1 receive the access request from the file creator and complete the user login authentication.
[0188] 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.
[0189] 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.
[0190] 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.
[0191] 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:
[0192] 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".
[0193] 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.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] Application servers A16 and D2 send document conversion notifications to D4, along with the token, file metadata (or index), and cache key.
[0198] 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.
[0199] 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.
[0200] 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.
[0201] 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.
[0202] A20: D7 fills the file streams in the buffer into the corresponding placeholder files in the Template2 area. The specific steps are as follows:
[0203] 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.
[0204] 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.
[0205] 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.
[0206] 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.
[0207] 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.
[0208] 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.
[0209] 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:
[0210] S21 and D1 receive the user's access request and complete the user login authentication.
[0211] S22 and D1 receive the user's instruction to create a new document and send a new document request to D2.
[0212] 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;
[0213] 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;
[0214] 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:
[0215] 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.
[0216] 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.
[0217] 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.
[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 the Template1 area;
[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 cache and sends a placeholder file generation request to D4 to generate a placeholder file in the Template2 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 the review / editing permissions are confirmed to be closed, avoiding data contamination during file editing 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 above illustrates the online editing process for HTML format 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 an application server; please refer to [link / reference]. Figure 4 ,include:
[0255] Request receiving module 10 is used to receive file editing call requests from terminal devices;
[0256] The copy acquisition module 20 is used to acquire copy file data of the original file to be edited from the corresponding file security storage area according to the file editing call request. The specific execution process is as described in, but not limited to, step S20 above.
[0257] The file stream transmission module 30 is used to send the copy file data 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; the specific execution process is as described in, but not limited to, step S30 above.
[0258] The editing data acquisition module 40 is used to acquire the edited HTML file stream generated by editing the document to be edited from the terminal device; the specific execution process is described in, but not limited to, step S40 above.
[0259] The data update module 50 is used to generate an updated file based on the copy HTML file stream and the obtained edited HTML file stream after the editing is detected to be completed; the specific execution process is described in, but not limited to, step S50 above.
[0260] This embodiment provides an application server for use in the field of medical laboratories. The application server includes a memory, a processor, and a computer program stored in the memory and invoked by the processor. The computer program is configured to implement the steps of the online file security management method described above.
[0261] 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 online file security management method 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.
[0262] 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.
[0263] 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.
[0264] 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 online file security 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 those of the online file security management method provided in the above embodiments, and will not be repeated here.
[0265] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the online file security management method described above.
[0266] The above description is only a part of the embodiments of this application and does 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, characterized by, Applied to the field of medical laboratories, the online file security management method comprises the following file editing management steps performed by an application server: receiving a file editing call request from a terminal device; obtaining copy file data of an original file to be edited from a corresponding file security storage area according to the file editing call request; sending the copy file data to the terminal device in the form of a copy HTML file stream, so that the terminal device displays a corresponding document to be edited in an online document editing interface; obtaining an edited HTML file stream generated by editing the document to be edited from the terminal device; generating an updated file according to the copy HTML file stream and the obtained edited HTML file stream after detecting the end of editing.
2. The online file security management method of claim 1, wherein, After receiving the file editing call request from the terminal device, the method further comprises judging whether the original file to be edited is currently in a preset control state, and performing security control processing on the file editing call request if the original file to be edited is currently in the preset control state. The preset control state comprises at least one of the following: the original file to be edited is currently in an edited state; the original file to be edited is currently in an editing prohibited state; the original file to be edited is currently in an access prohibited state; and / or, the security control processing comprises at least one of the following: refusing to execute the file editing call request; refusing to obtain the edited HTML file stream generated by editing the document to be edited from the terminal device; discarding the edited HTML file stream generated by editing the document to be edited from the terminal device; discarding or isolating the updated file.
3. The online file security management method of claim 1, wherein, After detecting the end of editing, the method further comprises: generating revision record information in the updated file according to the copy HTML file stream; and / or, comparing the updated file with the original file and / or the copy file data of the original file, and generating revision record information in the updated file according to the comparison result.
4. The online file security management method of any one of claims 1-3, wherein, The file security storage area comprises a first file security storage area in a database in communication connection with the application server, and the files stored in the first file security storage area are HTML files; when the file editing call request corresponds to the first file security storage area, the original file to be edited and the copy file data are HTML files; after obtaining the copy file data of the original file to be edited from the corresponding file security storage area according to the file editing call request, the method further comprises: storing the obtained copy file data in a first temporary storage area locally; after obtaining the edited HTML file stream generated by editing the document to be edited from the terminal device, storing the obtained edited HTML file stream in the first temporary storage area; generating the updated file according to the copy HTML file stream and the obtained edited HTML file stream comprises: generate a new HTML file according to the copy HTML file stream and the obtained edit HTML file stream, and store the new HTML file in the first file security storage area.
5. The online file security management method of any one of claims 1-3, wherein, The file security storage area includes a second file security storage area in a file creation server in communication connection with the application server, and the file stored in the second file security storage area is an office file. When the file security storage area corresponding to the file editing call request is the second file security storage area, the original file to be edited is an office file. The sending of the copy file data to the terminal device in a copy HTML file stream includes: receiving an HTML file stream obtained by conversion of the copy file data by the file creation server, and sending the HTML file stream to the terminal device.
6. The online file security management method of claim 5, wherein, After obtaining the copy file data of the original file to be edited from the corresponding file security storage area according to the file editing call request, the method further includes storing the HTML file stream of the obtained copy file data in a local first temporary storage area; After obtaining the edit HTML file stream generated by editing the original document to be edited from the terminal device, the method further includes storing the obtained edit HTML file stream in the first temporary storage area; The generating of the updated file according to the copy HTML file stream and the obtained edit HTML file stream includes: generating a new HTML file according to the copy HTML file stream and the obtained edit HTML file stream, and storing the new HTML file in the first file security storage area.
7. The online file security management method of claim 6, wherein, The generating of the updated file according to the copy HTML file stream and the obtained edit HTML file stream further includes: sending the new HTML file to the file creation server, so that the file creation server converts the new HTML file into a new office file and stores the new office file in the second file security storage area.
8. The online file security management method of claim 5, wherein, After obtaining the edit HTML file stream generated by editing the original document to be edited from the terminal device, the method further includes: sending the edit HTML file stream to the file creation server, so that the file creation server stores the edit HTML file stream in a cache thereof; After detecting the end of editing, the generating of the updated file according to the copy HTML file stream and the obtained edit HTML file stream includes: informing the file creation server of the end of editing, so that the file creation server extracts the edit HTML file stream stored in the cache thereof and the edit HTML file stream into a placeholder file in a second temporary storage area thereof, and converts data in the placeholder file into an office document and stores the office document in the second file security storage area; The placeholder file is generated by the file creation server in the second temporary storage area after the application server receives the file editing call request.
9. The online file security management method of any one of claims 1-3, wherein, The step of generating the updated file according to the copy HTML file stream and the obtained edit HTML file stream comprises: generating second file metadata according to first file metadata of the copy HTML file stream, and generating the updated file according to the second file metadata, the copy HTML file stream and the edit HTML file stream.
10. An application server, characterized by In the field of medical laboratories, the application server comprises a memory, a processor and a computer program stored in the memory and invokable by 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 9.
11. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the online file security management method according to any one of claims 1 to 9.
12. A computer program, characterized in that, The computer program is executed by the processor to implement the steps of the online file security management method according to any one of claims 1 to 9.