Material file management method and device, computer equipment and storage medium

By adopting a four-tiered B/S architecture in the document management system, automatic association and bidirectional traceability of documents and materials are achieved, solving problems such as document security, system stability, and access control. This improves document processing capabilities and system self-healing capabilities, avoids data silos, and enhances system security and flexibility.

CN121070877AActive Publication Date: 2025-12-05ABLE NEW ENERGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511603963.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2025-12-05
Estimated Expiration
2045-11-05

AI Technical Summary

Technical Problem

Existing document management systems suffer from problems such as document security issues, insufficient system stability, difficulty in managing the association between materials and documents, insufficient granularity of permission management, limited document processing capabilities, and a lack of intelligent monitoring and self-healing capabilities. These issues lead to data security risks, high risk of system crashes, isolation between material management and document management systems, static permission configurations, insufficient support for multimedia files, and low batch processing efficiency.

Method used

It adopts a four-layer design based on B/S architecture, including presentation layer, business layer, tool service layer and data storage layer, to realize automatic association and bidirectional traceability of files and materials, support multi-format file processing, build a multi-level system monitoring and automatic recovery mechanism, provide file safe deletion and recovery mechanism, and realize fine-grained access control and dynamic permission adjustment.

Benefits of technology

It enables automatic association and two-way traceability of documents and materials, enhances document security and system stability, improves document processing capabilities and access control flexibility, reduces maintenance costs, and avoids data silo problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121070877A_ABST
    Figure CN121070877A_ABST
Patent Text Reader

Abstract

The invention discloses a material file management method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a current file processing type corresponding to a material file processing instruction in response to the material file processing instruction; if it is determined that the current file processing type is a file uploading type, obtaining a current to-be-uploaded file based on a preset file uploading strategy, and performing file disk falling and material association processing in sequence to complete storage of the current to-be-uploaded file; and if it is determined that the current file processing type is a bidirectional tracing type, obtaining current to-be-traced information based on a preset bidirectional tracing strategy, and tracing local file information or material information to obtain a current tracing result. According to the embodiment of the invention, automatic association of the document and the material can be realized, bidirectional tracing of the document and the material can be carried out in combination with the stored data, and the problem of data islands between a material management system and a document management system is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of file management, and in particular to a material file management method and device, computer equipment and a storage medium. BACKGROUND

[0002] With the deepening of enterprise digital transformation, various types of document data generated within the enterprise are growing exponentially. Traditional file management methods face many challenges and technical bottlenecks, mainly in the following aspects: 1. The technical defects of the existing file management system are mainly: (11) File security problem, that is, the existing file management system generally adopts physical deletion mechanism, once the user performs the deletion operation, the file is permanently deleted and cannot be recovered. This design has serious data security risks, especially in the enterprise environment, accidental deletion of important documents may cause significant losses. At the same time, there is a lack of effective file access control and watermark protection mechanism, which cannot effectively prevent the unauthorized dissemination of sensitive documents; (12) Insufficient system stability, that is, the existing file system is prone to memory leaks, file handle leaks and other problems when processing large files or high concurrency operations, resulting in system crashes or deadlocks. Lack of effective resource monitoring and automatic recovery mechanism, system reliability is difficult to guarantee.

[0003] 2. There is a technical gap in the association management of materials and documents, and there are the following problems: (21) Information island problem, that is, the material management system and the document management system in the traditional enterprise are often independent of each other, lacking effective data interaction and association mechanism; the corresponding relationship between technical documents, design drawings, specifications and specific materials needs to be maintained manually, which is low in efficiency and prone to errors; (22) Difficulty in bidirectional tracing, that is, the existing system cannot realize bidirectional fast tracing from material to document and from document to material, and technical personnel need to switch between multiple systems when looking for relevant documents of a specific material, which is complex and time-consuming.

[0004] 3. Insufficient granularity of permission management, specifically: (31) Coarse permission control, that is, the permission control of the existing file management system can only reach the folder level, and cannot realize fine-grained permission control based on file type, user role and business process. This extensive permission management mode cannot meet the complex business needs of enterprises; (32) Lack of dynamic permission adjustment, that is, the permission configuration of the traditional system is highly static, and cannot automatically adapt to the permission settings according to the changes in business processes and the adjustment of user roles, with high maintenance cost and insufficient flexibility.

[0005] 4. Limited file processing capabilities, specifically: (41) Insufficient format support, i.e., existing systems have limited support for professional formats such as multimedia files and Office documents, lack a unified preview and conversion mechanism, and have poor user experience; (42) Weak batch processing capabilities, i.e., traditional systems lack effective concurrency control and resource scheduling mechanisms when processing large batches of file uploads, conversions, approvals, and other operations, resulting in low processing efficiency.

[0006] 5. Lack of intelligent monitoring and self-healing capabilities, specifically, existing systems generally lack intelligent system monitoring mechanisms, cannot detect system health status and resource usage in real time, cannot automatically recover when the system is abnormal, rely on manual intervention, and have high maintenance costs. SUMMARY

[0007] Embodiments of the present application provide a material file management method, device, computer equipment and storage medium, aiming to solve the problem that in the prior art, material management systems and document management systems are often independent of each other, lack effective data interaction and association mechanisms, and cannot realize bidirectional fast tracing from material to document and from document to material.

[0008] In a first aspect, embodiments of the present application provide a material file management method, comprising: In response to a material file processing instruction, a current file processing type corresponding to the material file processing instruction is obtained; If it is determined that the current file processing type is a file upload type, a current file to be uploaded is obtained based on a preset file upload strategy, and file landing and material association processing are performed in sequence to complete storage of the current file to be uploaded; If it is determined that the current file processing type is a bidirectional tracing type, current tracing information is obtained based on a preset bidirectional tracing strategy, and local file information or material information tracing is performed to obtain a current tracing result.

[0009] In a second aspect, embodiments of the present application also provide a material file management device, comprising: A file processing type obtaining unit is configured to obtain a current file processing type corresponding to a material file processing instruction in response to the material file processing instruction; A file upload processing unit is configured to, if it is determined that the current file processing type is a file upload type, obtain a current file to be uploaded based on a preset file upload strategy, and perform file landing and material association processing in sequence to complete storage of the current file to be uploaded; The file bidirectional tracing processing unit is configured to, if it is determined that the current file processing type is a bidirectional tracing type, acquire current to-be-traced information based on a preset bidirectional tracing strategy and perform local file information or material information tracing to obtain a current tracing result.

[0010] In a third aspect, an embodiment of the present application further provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method in the first aspect when executing the computer program.

[0011] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, the computer program comprises program instructions, and the program instructions can implement the method in the first aspect when executed by a processor.

[0012] The embodiment of the present application provides a material file management method and device, a computer device and a storage medium. The method comprises the following steps: in response to a material file processing instruction, acquiring a current file processing type corresponding to the material file processing instruction; if it is determined that the current file processing type is a file uploading type, acquiring a current to-be-uploaded file based on a preset file uploading strategy and sequentially performing file disk writing and material association processing to complete storage of the current to-be-uploaded file; if it is determined that the current file processing type is a bidirectional tracing type, acquiring current to-be-traced information based on a preset bidirectional tracing strategy and performing local file information or material information tracing to obtain a current tracing result. The embodiment of the present application can realize automatic association of documents and materials, and can also realize bidirectional tracing of documents and materials combined with stored data, thereby avoiding the data island problem between a material management system and a document management system. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0014] Figure 1 The application scenario diagram of the material file management method provided by the embodiment of the present application is shown in the figure. Figure 2 The flowchart of the material file management method provided by the embodiment of the present application is shown in the figure. Figure 3 The sub-flowchart of the material file management method provided by the embodiment of the present application is shown in the figure. Figure 4 Another sub-flowchart of the material file management method provided by the embodiment of the present application is shown in the figure. Figure 5 A construction process schematic diagram of the current file and the material association table in the material file management method provided by the embodiment of the present application; Figure 6 Another sub-process schematic diagram of the material file management method provided by the embodiment of the present application; Figure 7 A schematic block diagram of the material file management device provided by the embodiment of the present application; Figure 8 A schematic block diagram of the computer device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0015] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0016] It should be understood that, when used in the specification and the appended claims, the terms "comprise" and "include" indicate the presence of described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0017] It should also be understood that the terms used in the present application specification are only for the purpose of describing particular embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0018] It should be further understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations thereof, and includes these combinations.

[0019] Please refer to Figure 1 and Figure 2 , wherein Figure 1 is a scene schematic diagram of the material file management method provided by the embodiment of the present application, Figure 2 is a flow schematic diagram of the material file management method provided by the embodiment of the present application. As shown in Figure 1 , the material file management method provided by the embodiment of the present application is applied to a server 10, and a user terminal 20 is in communication connection with the server 10. As shown in Figure 2 , the method comprises the following steps S110-S130.

[0020] S110, in response to the material file processing instruction, acquiring a current file processing type corresponding to the material file processing instruction.

[0021] In the embodiment, the server is taken as the execution subject to describe the technical solution. The material file management platform is deployed in the server, which specifically adopts a four-layer layered architecture based on B / S (B / S architecture means Browser / Server architecture). The architecture includes a presentation layer (specifically including React SPA), a business layer (specifically including Node.js / Express), a tool service layer (specifically including PDF watermark, file stream, Office conversion, monitoring and self-healing, etc.), and a data storage layer (specifically including a MySQL database and a file system). The above-mentioned modularization and cross-cutting design are adopted, that is, the controller-middleware-tool-service-routing decoupling design is adopted, and the REST interface (REST stands for Representational State Transfer) between the above-mentioned multiple modules forms a mesh connection.

[0022] More specifically, in the four-layer layered architecture based on B / S adopted by the material file management platform in the server, the presentation layer in which the front-end module is deployed specifically provides a user interaction interface, and can perform login, search, upload, approval, preview, download, deletion and other operations, and can also perform online preview of documents.

[0023] The business layer in which the controller module is deployed can perform file upload / download, classified storage, version and approval, logical deletion and recovery, preview scheduling and other operations. The user / set / material controller set therein can perform user, role, department, system configuration, watermark parameter, material information and mapping operations. The middleware module also belongs to the business layer, which mainly performs authentication and permission (specifically including JWT authentication, RBAC fine-grained authorization and other operations), upload protection and timeout (specifically including concurrent upper limit, timeout threshold, exception cleaning, request timeout processing and other operations), error handling and log (specifically including exception capture and structured log and other operations).

[0024] The tool and service module is deployed in the tool service layer, which mainly includes a PDF watermark engine (specifically performing dynamic watermarking based on pdf-lib), a file stream manager (specifically performing stream lifecycle and handle governance, leakage prevention and other processing), an Office converter (specifically performing unified document conversion / preview), monitoring and self-healing (specifically performing health check, process / response monitoring, threshold triggering GC / cleaning / restart), etc.

[0025] The data access and storage module is deployed in the data storage layer, where the MySQL database is used to store metadata, permissions and audit logs; the file system is used to manage the category directory, the delete recycle area and version archive.

[0026] After introducing the architecture of the material file management platform on the server, the following section details the specific file management methods. When the server detects a material file processing instruction, it needs to parse the instruction to obtain the current file processing type. This current file processing type includes at least file viewing, file upload, two-way traceability, file approval, file download, file deletion / recovery, monitoring and self-healing, user management, and access control.

[0027] S120. If the current file processing type is determined to be a file upload type, the current file to be uploaded is obtained based on the preset file upload strategy, and the file is written to disk and the material is associated with it in sequence to complete the storage of the current file to be uploaded.

[0028] In this embodiment, if the current file processing type is determined to be a file upload type, the file to be uploaded by the user is generally a document related to material data. In this case, specific processing after file upload can be performed, such as associating it with material metadata.

[0029] In one embodiment, such as Figure 3 As shown, step S120 includes: S121. Obtain the current user's authentication information; S122. If it is determined that the current user verification information passes the verification, then obtain the current user permission information; S123. If it is determined that the current user permission information has passed the verification, then obtain the current file to be uploaded and add it to the waiting queue; S124. If it is determined that the preset upload protection condition of the waiting queue has not been triggered, then the current target directory corresponding to the current file to be uploaded is obtained, and the current file to be uploaded is written to the storage area corresponding to the current target directory. S125. Obtain the current target metadata corresponding to the current file to be uploaded in the current target directory, and establish a unique association between the current file to be uploaded and the current target metadata.

[0030] In this embodiment, when a user logs into the material file management platform through a user terminal (such as a smartphone) and uploads a file on the front-end page, the file to be uploaded is not directly uploaded to the server. Instead, the user verification information (such as the user's login account and password) corresponding to the user terminal is verified first. Once it is determined that the user verification information corresponding to the user terminal is registered user information and has passed the verification, the user's current permission information (such as administrator permissions, ordinary user permissions, etc.) can be further obtained. Only when the current user permission information is verified is the file to be uploaded obtained from the user terminal and added to the waiting queue in the server. At this point, the waiting queue will check its current queue status to determine whether the preset upload protection conditions have been triggered. Specifically, the upload protection conditions are set to a current concurrent user count of less than 10 and a file upload start time of no more than 5 minutes (of course, the specific values ​​of the current concurrent user count of less than 10 and the file upload start time of no more than 5 minutes are not limited to the above example and can be customized according to the user's actual needs and the server's own performance). After determining that the preset upload protection conditions of the waiting queue have not been triggered, the current target directory corresponding to the file to be uploaded can be obtained, and the file to be uploaded can be written to the storage area corresponding to the current target directory. Finally, the current target metadata corresponding to the file to be uploaded can be obtained in the current target directory, and a unique association relationship can be established between the file to be uploaded and the current target metadata.

[0031] Specifically, when the current concurrent number of requests in the waiting queue is determined to be less than 10, regardless of whether the file upload startup time exceeds 5 minutes, an execution token is first obtained, then a timeout is started to count the file upload startup time, and the currently pending file is streamed into a temporary file. Afterwards, if the file upload startup time exceeds 5 minutes, the execution token is released, the temporary file is cleaned up, and a file upload error message is returned and logged. If the file upload startup time does not exceed 5 minutes, the current target directory corresponding to the currently pending file is obtained, and the currently pending file is written to the storage area corresponding to the current target directory. Furthermore, the current target metadata corresponding to the currently pending file can be obtained in this storage area, and a unique association is established between the currently pending file and the current target metadata. Simultaneously, the execution token is released, and a file upload success message is returned.

[0032] In one embodiment, such as Figure 4 As shown, step S125 includes: S1251, acquire the current file table structure information corresponding to the current to-be-uploaded file, and acquire the current material part number from the current file table structure information; S1252, acquire the current target metadata with the current material part number, and acquire the current material table structure information corresponding to the current target metadata; S1253, construct a current file and material association table according to the current file table structure information and the current material table structure information, so as to complete the establishment of the unique association relationship between the current to-be-uploaded file and the current target metadata.

[0033] In the embodiment, in the process of establishing the unique association relationship between the current to-be-uploaded file and the current target metadata, the following can be referred to Figure 5 After the server acquires the current to-be-uploaded file structure information, the fields included in the current to-be-uploaded file structure information (which can be represented by a FILES table) can be acquired, including id (the field Chinese name is file ID, the field data type is int, and it is a primary key PK), filename (the field Chinese name is file name, the field data type is int), part_number (the field Chinese name is part number and can be understood as material part number, the field data type is varchrar), part_name (the field Chinese name is part name and can be understood as material part name, the field data type is varchrar), specification (the field Chinese name is specification, the field data type is text), upload_id (the field Chinese name is uploader, the field data type is int, and it is a foreign key FK), upload_date (the field Chinese name is upload time, the field data type is timestamp), and file_path (the field Chinese name is file path, the field data type is varchrar). The current user information table corresponding to the current to-be-uploaded file can be represented by a USERS table, which includes the fields of id (the field Chinese name is user ID, the field data type is int, and it is a primary key PK), username (the field Chinese name is username, the field data type is varchrar), name (the field Chinese name is name, the field data type is varchrar), and department (the field Chinese name is department, the field data type is varchrar).

[0034] Continuing to refer to Figure 5In the server, the current target metadata corresponding to the current material part number obtained by the server continues to include the current material table structure information (which can be represented by a MATERIALS table) including the fields of id (the field Chinese name is material ID, the field data type is int, and it is the primary key PK), part_number (the field Chinese name is part number and can be understood as material part number, the field data type is varchar, and it is the unique key UK), name (the field Chinese name is product name and can be understood as material product name, the field data type is varchar), specification (the field Chinese name is specification, the field data type is text), status (the field Chinese name is status, the field data type is enum), created_by (the field Chinese name is creator, the field data type is int, and it is the foreign key FK), and created_at (the field Chinese name is creation time, the field data type is timestamp).

[0035] Still referring to Figure 5 In the server, the current file and material association table is constructed according to the current file table structure information and the current material table structure information, which can be represented by a FILES_MATERIALS_RELATIONS table, including the fields of id (the field Chinese name is association ID, the field data type is int, and it is the primary key PK), file_id (the field Chinese name is file ID, the field data type is int, and it is the foreign key FK), material_id (the field Chinese name is material ID, the field data type is int, and it is the foreign key FK), created_by (the field Chinese name is association creator, the field data type is int, and it is the foreign key FK), and created_at (the field Chinese name is association creation time, the field data type is timestamp). After the current file and material association table (that is, the FILES_MATERIALS_RELATIONS table) is constructed according to the current file table structure information (that is, the FILES table) and the current material table structure information (that is, the MATERIALS table), the current file and material association table can be associated with the current user information table (that is, the USERS table), so as to complete the intelligent association of material files and material metadata.

[0036] In S130, if it is determined that the current file processing type is a bidirectional tracing type, the current to-be-traced information is obtained based on a preset bidirectional tracing strategy, and local file information or material information tracing is performed to obtain a current tracing result.

[0037] In the embodiment, if it is determined that the current file processing type is the bidirectional tracing type, it indicates that the user inputs the file information or the material information on the user interaction interface at the front end. At this time, the file information or the material information is taken as a query condition, and a relevant query is performed in the local database of the server to obtain the current tracing result.

[0038] In an embodiment, as shown in FIG. 13, Figure 6 Step S130 includes: S131, if it is determined that the current to-be-traced information includes the file information, a first SQL statement is generated based on the file name corresponding to the file information according to the bidirectional tracing strategy, and a query is performed in the local file and material association table to obtain the current tracing result. S132, if it is determined that the current to-be-traced information includes the file information, a second SQL statement is generated based on the file name corresponding to the file information according to the bidirectional tracing strategy, and a query is performed in the local file and material association table to obtain the current tracing result.

[0039] In the embodiment, the step S131 can acquire the current material part number of the current to-be-traced information by a first preset regular expression (for example, [A-Z0-9]+-[A-Z0-9]+|[A-Z0-9]+_[A-Z0-9]+). If the current to-be-traced information corresponds to a current file, the current material part number is acquired from the file name of the current file. If the current material part number can be acquired from the file name based on the first preset regular expression, the current material part number does not need to be acquired from the specific file data of the current file. For example, if the acquired initial material part number is ABC_123, the initial material part number needs to be standardized to convert the underscore into a hyphen to obtain the current material part number ABC-123. Then, the current material part number is used as a query condition to generate an SQL statement and query the material table structure information with the current material part number in a local database (for example, a MySQL database) of the server. After it is determined that the material table structure information with the current material part number is queried and the current file and the material association table are associated, the operation of automatically filling the file information is performed, and the writing file operation is performed. Then, if it is determined that the association between the current file and the material association table (that is, the FILES_MATERIALS_RELATIONS table) is valid, the bidirectional tracing relationship between the current file table structure information and the current material table structure information is valid, the file-to-material tracing can be performed, and the complete material information can be displayed. The material-to-file tracing can be performed, and all the file documents related to the material can be displayed. Through the intelligent association between the material file and the material metadata, the part number can be automatically recognized and the material association can be established without manual intervention when the file is uploaded. The part name and the specification of the logistics data can be intelligently completed based on the file. The material association relationship can be automatically inherited when the file version is updated. Moreover, the user can quickly find all the related documents through the material part number to quickly locate the position, can view the complete material information associated with the file from any document to realize complete tracing, can completely trace the historical version document of the material to realize version tracking, and can batch process the multiple documents of the same material to realize batch management.

[0040] If the current material part number cannot be acquired from the file name based on the first preset regular expression, the current material part number needs to be acquired from the specific file data of the current file, that is, the current material part number is acquired from the current file table structure information corresponding to the current file. The subsequent intelligent association process is the same as the intelligent association process performed after the current material part number is acquired from the file name based on the first preset regular expression. Details are not described herein.

[0041] In an embodiment, the step S110 further includes: If the current file processing type is determined to be a file viewing type, then the current file viewing information is obtained based on the preset file viewing strategy, and the file is acquired to obtain the current target file.

[0042] In this embodiment, when a user sends a request to the server to view a specific file (which can be understood as a file viewing request) through the user interface on the front end, the server verifies the user authentication information (such as the user's login account and password) included in the current file viewing information according to the file viewing strategy. If the user authentication information corresponding to the user terminal is confirmed to be registered user information and passes verification, the server can further obtain the current user permission information (such as administrator permissions, ordinary user permissions, etc.) corresponding to the current file viewing information. Only when the current user permission information passes verification can the server retrieve the current target file corresponding to the current file viewing information from its database. Furthermore, if the file type of the current target file is determined to be PDF or an Office product file format (such as doc, ppt, etc.), the current target file is previewed and rendered, generating a preview address or stream to be returned to the front end for display. If the file type of the current target file is determined to be other than PDF or an Office product file format, the server first reads the thumbnail and basic information of the current target file, then generates a preview address or stream to be returned to the front end for display. Therefore, the above method enables rapid viewing of material-related files.

[0043] In one embodiment, the method further includes the following after step S110: If the current file processing type is determined to be a file approval type, then the current file to be approved is obtained based on the preset file approval strategy and the file is automatically approved to obtain the current file approval result.

[0044] In this embodiment, when a user sends a current file approval request (which can be understood as submitting an approval request) to the server through the user interface on the front end, the server verifies the user verification information (such as the user's login account and password) corresponding to the file to be approved through the file approval strategy. When it is determined that the user verification information corresponding to the user terminal is registered user information and has passed the verification, the server can further obtain the current user permission information (such as administrator permission, ordinary user permission, etc.) corresponding to the current file viewing information. Only when the current user permission information is verified can the server automatically approve the current file to be approved.

[0045] The specific process of automatically approving the current to-be-approved file in the server is to first load the approval process node, and then automatically check whether the current to-be-approved file is legal and compliant and whether it meets the file specification in the approval process node. If the current to-be-approved file fails the legal and compliant detection or does not meet the file specification, it is returned to the approval process node for modification and the reason for the return is recorded for subsequent rejection audit record query. If the current to-be-approved file is legal and compliant and meets the file specification, the approval process node releases the current to-be-approved file, but it needs to be noted that if the approval process node is the last node in the complete file approval process, the current to-be-approved file is marked as published, the version state and approval log are updated, the distribution and watermark strategy of the file are triggered, and the current file approval result (such as a file approval pass result) corresponding to the current to-be-approved file is sent to the corresponding applicant and subscriber, and the audit log is added with a record of the audit pass.

[0046] In an embodiment, after step S110, the following steps are further included: If it is determined that the current file processing type is a file download type, the current to-be-downloaded file corresponding to the current file download information is obtained based on a preset file download strategy, and the current to-be-downloaded file is sent to the corresponding request end.

[0047] In the present embodiment, when a user uses a request end (which can be regarded as a user terminal) to operate on a user interaction interface on the front end to send current file download information (which can be understood as a download request) to the server, the server verifies the user verification information (such as a user login account and password, etc.) included in the current file download information through a file download strategy. When it is determined that the user verification information corresponding to the user terminal is registered user information and passes the verification, the current user permission information (such as administrator permission, ordinary user permission, etc.) corresponding to the current file download information can be further obtained, and when the current user permission information passes the verification, the current to-be-downloaded file corresponding to the current file download information can be obtained in the database of the server. After the server obtains the current to-be-downloaded file, it needs to combine the current user permission information to determine whether to automatically add a file watermark. If it is determined that the file watermark needs to be automatically added, the file watermark is automatically added to each page of the current to-be-downloaded file, and then a download stream is generated for the request end to download and obtain. As can be seen, the above-mentioned method realizes the rapid download of material-related files.

[0048] In an embodiment, after step S110, the following steps are further included: If it is determined that the current file processing type is a file deletion / resume type, a current to-be-processed file is obtained based on a preset file deletion / resume type strategy, and a deletion or resume operation is performed correspondingly to obtain a current processing result of the current to-be-processed file.

[0049] In the embodiment, when a user operates on a user interaction interface at the front end to send a file deletion request or a file resume request to the server for a certain file, the server verifies user authentication information (such as a user login account and a password) included in the file deletion request or the file resume request through a file deletion / resume type strategy. When it is determined that the user authentication information corresponding to the user terminal is registered user information and passes the verification, the current user permission information (such as administrator permission or ordinary user permission) corresponding to the file resume request or the file resume request can be further obtained, and the current to-be-processed file can be obtained in the database of the server when the current user permission information passes the verification. For example, taking that the server detects a file deletion request as an example, if the server determines that the request user corresponding to the file deletion request has a file deletion permission, a logical deletion mark delete is added to the current to-be-processed file, and then the current to-be-processed file is moved to a Delete recycle area in the server while keeping the original file structure, and then the database record of the server is updated, the deletion audit information corresponding to the record is recorded, and the associated permission corresponding to the current to-be-processed file is cleaned to realize a recoverable deletion of the current to-be-processed file.

[0050] If the current to-be-processed file that has been deleted needs to be resumed, a user with an administrator permission needs to log in to the server using the user terminal, find the Delete directory in the Delete recycle area of the server, read the deletion record corresponding to the current to-be-processed file, and move the current to-be-processed file back to the original storage location before the last deletion, update the database record of the server, rebuild the associated permission corresponding to the current to-be-processed file, and record the recovery audit information corresponding to the record.

[0051] Of course, in the server, a request of a monitoring and self-recovery type, a user management type, a permission management type, and the like can also be processed correspondingly. For example, if it is determined that the current file processing type is the monitoring and self-recovery type, the system memory usage, the file handle, whether the database is abnormal, the response time, and the like are collected at a preset period. When the memory usage is greater than 90%, or the handle is greater than 1000, or the database response is abnormal, or the response time is greater than 5 s, it is determined that the system of the server has a fault. At this time, a health snapshot can be recorded and a recovery result can be evaluated. If the system has been recovered, a recovery log is written and the monitoring is continued. If the system has not been recovered, a smooth restart is performed (specifically, new requests are stopped, in-transit completion is waited, resources are released, and a process is restarted).

[0052] If it is determined that the current file processing type is a user management type, a user with administrator permission needs to log in the server and perform operations such as creating a new user, resetting a password, enabling / disabling a user, editing user profile, etc.

[0053] If it is determined that the current file processing type is a permission management type, a user with administrator permission needs to log in the server and perform operations such as creating a new role, configuring permission, assigning a role, runtime authentication, etc.

[0054] It can be seen that the embodiment implementing the method can realize automatic association of documents and materials, and can also realize bidirectional tracing of documents and materials in combination with stored data, thereby avoiding the data island problem between the material management system and the document management system.

[0055] Of course, the embodiment implementing the method can also realize the following beneficial effects: 1) Enhanced security, i.e., a file security deletion and recovery mechanism is established, document watermark protection and fine access control are realized; 2) System self-healing capability, i.e., a multi-level system monitoring and automatic recovery mechanism is constructed; 3) Processing capability is improved: unified processing and efficient batch operation of multi-format files are supported.

[0056] Figure 7 is a schematic block diagram of a material file management device provided by an embodiment of the present application. As shown in Figure 7 Corresponding to the above material file management method, the present application also provides a material file management device 100. The material file management device 100 comprises units for executing the above material file management method. Please refer to Figure 7 The material file management device 100 comprises a file processing type acquisition unit 110, a file uploading processing unit 120 and a file bidirectional tracing processing unit 130.

[0057] The file processing type acquisition unit 110 is configured to acquire a current file processing type corresponding to a material file processing instruction in response to the material file processing instruction.

[0058] In the present embodiment, the technical solution is described with the server as the execution subject. A material file management platform is deployed in the server, which specifically adopts a four-layer layered architecture based on B / S (B / S architecture refers to Browser / Server architecture), which includes a presentation layer (specifically including React SPA), a business layer (specifically including Node.js / Express), a tool service layer (specifically including PDF watermark, file stream, Office conversion, monitoring self-healing, etc.), and a data storage layer (specifically including a MySQL database and a file system). The above-mentioned modularization and cross-cutting design are adopted, that is, the controller-middleware-tool-service-routing decoupling design is adopted, and the REST interface (REST stands for Representational State Transfer) between the above-mentioned multiple modules forms a mesh connection.

[0059] More specifically, in the four-layer layered architecture based on B / S adopted by the material file management platform in the server, the presentation layer in which the front-end module is deployed specifically provides a user interaction interface and can perform login, search, upload, approval, preview, download, deletion and other operations, and can also perform online preview of documents.

[0060] The business layer in which the controller module is deployed can perform file upload / download, classified storage, version and approval, logical deletion and recovery, preview scheduling and other operations; and the user / settings / material controller set therein can perform user, role, department, system configuration, watermark parameter, material information and mapping operations. The middleware module also belongs to the business layer, which mainly performs authentication and permission (specifically including JWT authentication, RBAC fine-grained authorization and other operations), upload protection and timeout (specifically including concurrent upper limit, timeout threshold, exception cleaning, request timeout processing and other operations), error handling and log (specifically including exception capture and structured log and other operations).

[0061] The tool and service module is deployed in the tool service layer, which mainly includes a PDF watermark engine (specifically performing dynamic watermarking based on pdf-lib), a file stream manager (specifically performing stream lifecycle and handle governance, leakage prevention and other processing), an Office converter (specifically performing unified document conversion / preview), monitoring and self-healing (specifically performing health check, process / response monitoring, threshold triggering GC / cleaning / restart), etc.

[0062] The data access and storage module is deployed in the data storage layer, in which the MySQL database is used to store metadata, permissions and audit logs; the file system is used to manage classified directories, Delete recycle bin and version archive.

[0063] After the architecture of the material file management platform in the server is introduced, the specific file management method is introduced in detail. When the server detects a material file processing instruction, the instruction needs to be parsed to obtain the current file processing type. The current file processing type includes at least file viewing type, file uploading type, bidirectional tracing type, file approval type, file downloading type, file deletion / resume type, monitoring and self-healing type, user management type, and permission management type.

[0064] The file uploading processing unit 120 is configured to, if it is determined that the current file processing type is the file uploading type, acquire the current to-be-uploaded file based on a preset file uploading strategy, and sequentially perform file disk writing and material association processing, so as to complete storage of the current to-be-uploaded file.

[0065] In this embodiment, if it is determined that the current file processing type is the file uploading type, the current to-be-uploaded file uploaded by a general user is a document related to material data, and specific processing after file uploading, such as association with material metadata, can be performed.

[0066] In an embodiment, the file uploading processing unit 120 is specifically configured to: acquire current user authentication information; if it is determined that the current user authentication information passes authentication, acquire current user permission information; if it is determined that the current user permission information passes authentication, acquire the current to-be-uploaded file and add the current to-be-uploaded file to a waiting queue; if it is determined that a preset uploading protection condition of the waiting queue is not triggered, acquire a current target directory corresponding to the current to-be-uploaded file, and write the current to-be-uploaded file into a storage area corresponding to the current target directory; acquire current target metadata corresponding to the current to-be-uploaded file in the current target directory, and establish a unique association relationship between the current to-be-uploaded file and the current target metadata.

[0067] In the embodiment, when a user logs in a material file management platform by operating a user terminal (such as a smart phone or the like), and operates to upload a file on a front-end page, the current to-be-uploaded file is not directly uploaded to a server at this time, but first, user verification information (such as a user login account and password or the like) corresponding to the user terminal is verified, when it is determined that the user verification information corresponding to the user terminal is registered user information and passes the verification, the current user permission information (such as administrator permission, ordinary user permission or the like) corresponding thereto can be further obtained, and when the current user permission information passes the verification, the current to-be-uploaded file is obtained from the user terminal side and added to a waiting queue in the server. At this time, the waiting queue detects the current queue state of the queue to determine whether a preset upload protection condition of the waiting queue is triggered, and the upload protection condition is specifically set to that the current number of concurrent uploads is less than 10 and the file upload start time is not more than 5 minutes (of course, the specific values of the current number of concurrent uploads less than 10 and the file upload start time not more than 5 minutes in the upload protection condition are not limited to the above examples, and can be customized according to actual user needs and the performance of the server), after it is determined that the preset upload protection condition of the waiting queue is not triggered, the current target directory corresponding to the current to-be-uploaded file is obtained, and the current to-be-uploaded file is written into a storage area corresponding to the current target directory. Finally, the current target metadata corresponding to the current to-be-uploaded file is obtained in the current target directory, and a unique association between the current to-be-uploaded file and the current target metadata is established.

[0068] In the embodiment, when it is determined that the current number of concurrent uploads of the waiting queue is less than 10, whether the file upload start time exceeds 5 minutes or not, an execution token is first obtained, and then a timeout timer is started to count the file upload start time and the current to-be-uploaded file is written into a temporary file in a streaming manner; then, if it is determined that the file upload start time exceeds 5 minutes, the execution token is released and the temporary file is cleaned up, and a file upload error prompt is returned and a log record is made; if it is determined that the file upload start time does not exceed 5 minutes, the current target directory corresponding to the current to-be-uploaded file is obtained, and the current to-be-uploaded file is written into a storage area corresponding to the current target directory, and the current target metadata corresponding to the current to-be-uploaded file is also obtained in the storage area, and a unique association between the current to-be-uploaded file and the current target metadata is established, and the execution token is released and a file upload success prompt is returned.

[0069] In an embodiment, the obtaining, in the current target directory, of the current target metadata corresponding to the current to-be-uploaded file and the establishing of a unique association between the current to-be-uploaded file and the current target metadata comprises: obtaining current file table structure information corresponding to the current to-be-uploaded file, and obtaining a current material part number from the current file table structure information; obtaining the current target metadata having the current material part number, and obtaining current material table structure information corresponding to the current target metadata; constructing a current file and material association table according to the current file table structure information and the current material table structure information, to complete establishment of a unique association relationship between the current to-be-uploaded file and the current target metadata.

[0070] In the embodiment, in the process of establishing the unique association relationship between the current to-be-uploaded file and the current target metadata, reference can be made to Figure 5 After the server obtains the current to-be-uploaded file structure information, the fields included in the current to-be-uploaded file structure information (which can be represented by a FILES table) can specifically include id (the field name is file ID, the field data type is int, and it is a primary key PK), filename (the field name is file name, the field data type is int), part_number (the field name is part number and can be understood as a material part number, the field data type is varchrar), part_name (the field name is part name and can be understood as a material part name, the field data type is varchrar), specification (the field name is specification, the field data type is text), upload_id (the field name is uploader, the field data type is int, and it is a foreign key FK), upload_date (the field name is upload time, the field data type is timestamp), and file_path (the field name is file path, the field data type is varchrar). The current user information table corresponding to the current to-be-uploaded file can be represented by a USERS table, which includes fields such as id (the field name is user ID, the field data type is int, and it is a primary key PK), username (the field name is user name, the field data type is varchrar), name (the field name is name, the field data type is varchrar), and department (the field name is department, the field data type is varchrar).

[0071] Continuing to refer to Figure 5In the server, the current target metadata corresponding to the current material part number obtained by the server continues to include the current material table structure information (which can be represented by a MATERIALS table) including the fields of id (the field Chinese name is material ID, the field data type is int, and it is the primary key PK), part_number (the field Chinese name is part number and can be understood as material part number, the field data type is varchar, and it is the unique key UK), name (the field Chinese name is product name and can be understood as material product name, the field data type is varchar), specification (the field Chinese name is specification, the field data type is text), status (the field Chinese name is status, the field data type is enum), created_by (the field Chinese name is creator, the field data type is int, and it is the foreign key FK), and created_at (the field Chinese name is creation time, the field data type is timestamp).

[0072] Still referring to Figure 5 In the server, the current file and material association table is constructed according to the current file table structure information and the current material table structure information, which can be represented by a FILES_MATERIALS_RELATIONS table, including the fields of id (the field Chinese name is association ID, the field data type is int, and it is the primary key PK), file_id (the field Chinese name is file ID, the field data type is int, and it is the foreign key FK), material_id (the field Chinese name is material ID, the field data type is int, and it is the foreign key FK), created_by (the field Chinese name is association creator, the field data type is int, and it is the foreign key FK), and created_at (the field Chinese name is association creation time, the field data type is timestamp). After the current file and material association table (that is, the FILES_MATERIALS_RELATIONS table) is constructed according to the current file table structure information (that is, the FILES table) and the current material table structure information (that is, the MATERIALS table), the current file and material association table can be associated with the current user information table (that is, the USERS table), so as to complete the intelligent association of material files and material metadata.

[0073] The file bidirectional tracing processing unit 130 is configured to, if it is determined that the current file processing type is the bidirectional tracing type, acquire current to-be-traced information based on a preset bidirectional tracing strategy and perform local file information or material information tracing to obtain a current tracing result.

[0074] In the embodiment, if it is determined that the current file processing type is the bidirectional tracing type, it indicates that the user inputs the file information or the material information on the user interaction interface at the front end. At this time, the file information or the material information is taken as a query condition, and a relevant query is performed in the local database of the server to obtain the current tracing result.

[0075] In an embodiment, the file bidirectional tracing processing unit 130 is specifically configured to: If it is determined that the current to-be-traced information includes file information, a first SQL statement is generated based on the file name corresponding to the file information according to the bidirectional tracing strategy, and a query is performed in the local file and material association table to obtain the current tracing result. If it is determined that the current to-be-traced information includes file information, a second SQL statement is generated based on the file name corresponding to the file information according to the bidirectional tracing strategy, and a query is performed in the local file and material association table to obtain the current tracing result.

[0076] In the embodiment, the current material part number of the current to-be-traced information can be acquired through a first preset regular expression (for example, [A-Z0-9]+-[A-Z0-9]+|[A-Z0-9]+_[A-Z0-9]+). When the current to-be-traced information corresponds to a current file, the current material part number is acquired from the file name of the current file. If the current material part number can be acquired from the file name based on the first preset regular expression, the current material part number does not need to be acquired from the specific file data of the current file. For example, if the acquired initial material part number is ABC_123, the initial material part number needs to be standardized to convert the underscore into a hyphen, so that the current material part number is ABC-123. Then, the current material part number is used as a query condition to generate an SQL statement and query the material table structure information with the current material part number in a local database (for example, a MySQL database) of a server. After it is determined that the material table structure information with the current material part number is queried and the current file and the material association table are associated, the operation of automatically filling the file information is performed, and the file writing operation is performed. Then, if it is determined that the association relationship between the current file and the material association table (that is, the FILES_MATERIALS_RELATIONS table) is valid, the bidirectional tracing relationship between the current file table structure information and the current material table structure information is valid, the file-to-material tracing can be performed, and the complete material information can be displayed. The material-to-file tracing can be performed, and all the file documents related to the material can be displayed. Through the intelligent association of the material file and the material metadata, the part number can be automatically recognized and the material association can be established without manual intervention when the file is uploaded. The part name and the specification of the logistics data can be intelligently completed according to the file. The material association relationship can be automatically inherited when the file version is updated. Moreover, the user can quickly find all the related documents through the material part number to quickly locate, can view the complete material information associated with the file from any document to realize complete tracing, can completely trace the historical version document of the material to realize version tracking, and can batch process the multiple documents of the same material to realize batch management.

[0077] If the current material part number cannot be acquired from the file name based on the first preset regular expression, the current material part number needs to be acquired from the specific file data of the current file, that is, the current material part number is acquired from the current file table structure information corresponding to the current file. The subsequent intelligent association process is the intelligent association process performed after the current material part number is acquired from the file name based on the first preset regular expression, which is not described herein.

[0078] In an embodiment, the material file management apparatus 100 further includes: The file viewing and processing unit is used to obtain the current file viewing information and acquire the file based on a preset file viewing strategy if it is determined that the current file processing type is a file viewing type, thereby obtaining the current target file.

[0079] In this embodiment, when a user sends a request to the server to view a specific file (which can be understood as a file viewing request) through the user interface on the front end, the server verifies the user authentication information (such as the user's login account and password) included in the current file viewing information according to the file viewing strategy. If the user authentication information corresponding to the user terminal is confirmed to be registered user information and passes verification, the server can further obtain the current user permission information (such as administrator permissions, ordinary user permissions, etc.) corresponding to the current file viewing information. Only when the current user permission information passes verification can the server retrieve the current target file corresponding to the current file viewing information from its database. Furthermore, if the file type of the current target file is determined to be PDF or an Office product file format (such as doc, ppt, etc.), the current target file is previewed and rendered, generating a preview address or stream to be returned to the front end for display. If the file type of the current target file is determined to be other than PDF or an Office product file format, the server first reads the thumbnail and basic information of the current target file, then generates a preview address or stream to be returned to the front end for display. Therefore, the above method enables rapid viewing of material-related files.

[0080] In one embodiment, the material document management device 100 further includes: The document approval processing unit is used to obtain the current document to be approved based on a preset document approval strategy and automatically approve the document if the current document processing type is determined to be a document approval type, thereby obtaining the current document approval result.

[0081] In this embodiment, when a user sends a current file approval request (which can be understood as submitting an approval request) to the server through the user interface on the front end, the server verifies the user verification information (such as the user's login account and password) corresponding to the file to be approved through the file approval strategy. When it is determined that the user verification information corresponding to the user terminal is registered user information and has passed the verification, the server can further obtain the current user permission information (such as administrator permission, ordinary user permission, etc.) corresponding to the current file viewing information. Only when the current user permission information is verified can the server automatically approve the current file to be approved.

[0082] The specific process of automatically approving the current to-be-approved file in the server is to first load the approval process node, and then automatically check whether the current to-be-approved file is legal and compliant and whether it meets the file specification in the approval process node. If the current to-be-approved file fails the legal and compliant detection or does not meet the file specification, the approval process node returns it for modification and records the return reason for subsequent rejection audit record query. If the current to-be-approved file is legal and compliant and meets the file specification, the approval process node releases the current to-be-approved file, but it needs to be noted that if the approval process node is the last node in the complete file approval process, the current to-be-approved file is marked as published, and the version state and approval log are updated. The distribution and watermark strategy of the file can also be triggered, and the current file approval result (such as a file approval pass result) corresponding to the current to-be-approved file is sent to the corresponding applicant and subscriber, and the audit pass record is added in the audit log.

[0083] In an embodiment, the material file management apparatus 100 further comprises: The file download processing unit is configured to, if it is determined that the current file processing type is a file download type, acquire a current to-be-downloaded file corresponding to the current file download information based on a preset file download strategy, and send the current to-be-downloaded file to a corresponding request end.

[0084] In this embodiment, when a user uses a request end (which can be regarded as a user terminal) to operate on a user interaction interface on the front end to send current file download information (which can be understood as a download request) for a certain file to the server, the server verifies the user verification information (such as a user login account and password, etc.) included in the current file download information through a file download strategy. When it is determined that the user verification information corresponding to the user terminal is registered user information and passes the verification, the current user permission information (such as administrator permission, ordinary user permission, etc.) corresponding to the current file download information can be further acquired, and the current to-be-downloaded file corresponding to the current file download information can be acquired in the database of the server when the current user permission information passes the verification. After the server acquires the current to-be-downloaded file, it needs to determine whether to automatically add a file watermark in combination with the current user permission information. If it is determined that the file watermark needs to be automatically added, the watermark is automatically added to each page of the current to-be-downloaded file, and then a download stream is generated for the request end to download and acquire. It can be seen that the above-mentioned manner realizes the rapid download of material-related files.

[0085] In an embodiment, the material file management apparatus 100 further comprises: The file deletion recovery processing unit is configured to, if it is determined that the current file processing type is a file deletion / recovery type, acquire the current to-be-processed file based on a preset file deletion / recovery type strategy and perform a deletion or recovery operation on the current to-be-processed file, to obtain a current processing result of the current to-be-processed file.

[0086] In the embodiment, when a user operates on a user interaction interface at the front end to send a file deletion request or a file recovery request to the server for a certain file, the server verifies user authentication information (such as a user login account and a password, etc.) included in the file deletion request or the file recovery request based on a file deletion / recovery type strategy. When it is determined that the user authentication information corresponding to the user terminal is registered user information and the verification is passed, the current user permission information (such as an administrator permission, a normal user permission, etc.) corresponding to the file recovery request or the file recovery request can be further acquired, and the current to-be-processed file can be acquired in the database of the server when the current user permission information is verified. For example, taking that the server detects a file deletion request as an example, if the server determines that the request user corresponding to the file deletion request has a file deletion permission, a logical deletion mark delete is added to the current to-be-processed file, and then the current to-be-processed file is moved to a Delete recycle area in the server while keeping the original file structure, and then the database record of the server is updated, the deletion audit information corresponding to the record is recorded, and the associated permissions corresponding to the current to-be-processed file are cleaned to realize a recoverable deletion of the current to-be-processed file.

[0087] If the current to-be-processed file that has been deleted needs to be recovered, a user with an administrator permission needs to log in to the server using the user terminal, find the Delete directory in the Delete recycle area of the server, read the deletion record corresponding to the current to-be-processed file, and move the current to-be-processed file back to the original storage location before the last deletion, update the database record of the server, reconstruct the associated permissions corresponding to the current to-be-processed file, and record the recovery audit information corresponding to the record.

[0088] Of course, in the server, a request of a monitoring and self-recovery type, a user management type, a permission management type, etc. can also be processed correspondingly. For example, if it is determined that the current file processing type is a monitoring and self-recovery type, the system memory usage, the file handle, whether the database is abnormal, the response time, etc. can be collected according to a preset period. When the memory usage is greater than 90%, or the handle is greater than 1000, or the database response is abnormal, or the response time is greater than 5s, it can be determined that the system of the server has a fault. At this time, a health snapshot can be recorded and a recovery result can be evaluated. If the system has been recovered, a recovery log can be written and the monitoring can be continued. If the system has not been recovered, a smooth restart can be performed (the specific operation is to stop new requests, wait for in-transit completion, release resources, and restart the process).

[0089] If it is determined that the current file processing type is a user management type, a user with administrator permission needs to log in the server and perform operations such as creating a new user, resetting a password, enabling / disabling a user, and editing user profile.

[0090] If it is determined that the current file processing type is a permission management type, a user with administrator permission needs to log in the server and perform operations such as creating a new role, configuring permission, assigning a role, and runtime authentication.

[0091] It can be seen that the embodiment of the device can realize automatic association of documents and materials, and can also realize bidirectional tracing of documents and materials in combination with stored data, thereby avoiding the data island problem between the material management system and the document management system.

[0092] The material file management device can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 8 .

[0093] Please refer to Figure 8 , Figure 8 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device integrates any of the material file management devices provided by the embodiments of the present application.

[0094] Referring to Figure 8 , the computer device 400 includes a processor 402, a memory, and a network interface 405 connected through a system bus 401, wherein the memory can include a storage medium 403 and an internal memory 404.

[0095] The storage medium 403 can store an operating system 4031 and a computer program 4032. The computer program 4032 includes program instructions, which, when executed, can cause the processor 402 to perform a material file management method.

[0096] The processor 402 is configured to provide computing and control capabilities to support the operation of the entire computer device.

[0097] The internal memory 404 provides an environment for the running of the computer program 4032 in the storage medium 403, which, when executed by the processor 402, can cause the processor 402 to perform the above-mentioned material file management method.

[0098] The network interface 405 is configured to perform network communication with other devices. Those skilled in the art can understand that Figure 8The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0099] The processor 402 is configured to run the computer program 4032 stored in the memory to implement the above-mentioned material file management method.

[0100] It should be understood that, in the embodiments of the present application, the processor 402 can be a central processing unit (CPU), and the processor 402 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0101] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned method embodiments can be completed by a computer program instructing relevant hardware. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the above-mentioned method embodiments.

[0102] Therefore, the present application also provides a computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions are executed by the processor to make the processor execute the above-mentioned material file management method.

[0103] The storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various computer readable storage media that can store program codes.

[0104] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0105] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic. For example, the division of each unit is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed.

[0106] The steps in the method embodiments of the present application can be adjusted, combined and deleted in sequence according to actual needs. The units in the apparatus embodiments of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0107] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a terminal or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.

[0108] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A material file management method characterized by, Comprising: In response to the material file processing instruction, the current file processing type corresponding to the material file processing instruction is obtained; If it is determined that the current file processing type is a file upload type, the current to-be-uploaded file is obtained based on a preset file upload strategy, and file landing and material association processing are sequentially performed to complete storage of the current to-be-uploaded file; If it is determined that the current file processing type is a bidirectional traceability type, the current to-be-traced information is obtained based on a preset bidirectional traceability strategy, and local file information or material information traceability is performed to obtain a current traceability result.

2. The method of claim 1, wherein, The current to-be-uploaded file is obtained based on a preset file upload strategy, and file landing and material association processing are sequentially performed to complete storage of the current to-be-uploaded file, comprising: Current user verification information is obtained; If it is determined that the current user verification information passes verification, current user permission information is obtained; If it is determined that the current user permission information passes verification, the current to-be-uploaded file is obtained and added to a waiting queue; If it is determined that a preset upload protection condition of the waiting queue is not triggered, a current target directory corresponding to the current to-be-uploaded file is obtained, and the current to-be-uploaded file is written to a storage area corresponding to the current target directory; In the current target directory, current target metadata corresponding to the current to-be-uploaded file is obtained, and a unique association relationship between the current to-be-uploaded file and the current target metadata is established.

3. The method of claim 2, wherein, The current target metadata corresponding to the current to-be-uploaded file is obtained in the current target directory, and a unique association relationship between the current to-be-uploaded file and the current target metadata is established, comprising: Current file table structure information corresponding to the current to-be-uploaded file is obtained, and a current material part number is obtained from the current file table structure information; The current target metadata with the current material part number is obtained, and current material table structure information corresponding to the current target metadata is obtained; A current file and material association table is constructed according to the current file table structure information and the current material table structure information, to complete establishment of a unique association relationship between the current to-be-uploaded file and the current target metadata.

4. The method of claim 1, wherein, The current to-be-traced information is obtained based on a preset bidirectional traceability strategy, and local file information or material information traceability is performed to obtain a current traceability result, comprising: If it is determined that the current to-be-traced information includes file information, a first SQL statement is generated based on the file information corresponding to the file name based on the bidirectional traceability strategy, and a query is performed in the local file and material association table to obtain the current traceability result; If it is determined that the current to-be-traced information includes file information, a second SQL statement is generated based on the file information corresponding to the file name based on the bidirectional traceability strategy, and a query is performed in the local file and material association table to obtain the current traceability result.

5. The method of claim 1, wherein, After the step of obtaining the current file processing type corresponding to the material file processing instruction in response to the material file processing instruction, further comprising: If it is determined that the current file processing type is a file viewing type, current file viewing information is obtained based on a preset file viewing strategy and the file is obtained, to obtain a current target file.

6. The method of claim 1, wherein, After the step of obtaining the current file processing type corresponding to the material file processing instruction in response to the material file processing instruction, the method further includes: If it is determined that the current file processing type is a file approval type, a current file to be approved is obtained based on a preset file approval strategy and automatic approval of the file is performed, to obtain a current file approval result.

7. The method of claim 1, wherein, After the step of obtaining the current file processing type corresponding to the material file processing instruction in response to the material file processing instruction, the method further includes: If it is determined that the current file processing type is a file downloading type, a current file to be downloaded corresponding to current file downloading information is obtained based on a preset file downloading strategy, and the current file to be downloaded is sent to a corresponding request end.

8. A material file management apparatus characterized by comprising: The method includes: a file processing type obtaining unit, configured to obtain a current file processing type corresponding to a material file processing instruction in response to the material file processing instruction; a file uploading processing unit, configured to, if it is determined that the current file processing type is a file uploading type, obtain a current file to be uploaded based on a preset file uploading strategy and sequentially perform file disk landing and material association processing, to complete storage of the current file to be uploaded; a file bidirectional tracing processing unit, configured to, if it is determined that the current file processing type is a bidirectional tracing type, obtain current tracing information based on a preset bidirectional tracing strategy and perform local file information or material information tracing, to obtain a current tracing result.

9. A computer device, comprising: The computer device includes a memory and a processor, the memory has a computer program stored thereon, and the processor implements the material file management method of any one of claims 1-7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium has a computer program stored thereon, the computer program includes program instructions, and the program instructions can implement the material file management method of any one of claims 1-7 when executed by a processor.

Citation Information

Patent Citations

  • File management operation method and related device

    CN111881087A

  • Generation method and device of associated viewing model, computer equipment and storage medium

    CN114490756A

  • Device information management method and device, electronic equipment and medium

    CN117474503A

  • Method and device for creating digital delivery information based on BOM

    CN118552149A

  • Document bidirectional tracing method and related device

    CN119624475A