CN114968925A - File processing method, device, equipment, medium and product - Google Patents

File processing method, device, equipment, medium and product Download PDF

Info

Publication number
CN114968925A
CN114968925A CN202210597062.XA CN202210597062A CN114968925A CN 114968925 A CN114968925 A CN 114968925A CN 202210597062 A CN202210597062 A CN 202210597062A CN 114968925 A CN114968925 A CN 114968925A
Authority
CN
China
Prior art keywords
file
information
user
level
document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210597062.XA
Other languages
Chinese (zh)
Inventor
崔震
聂砂
张士存
郑江
罗奕康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202210597062.XA priority Critical patent/CN114968925A/en
Publication of CN114968925A publication Critical patent/CN114968925A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/134Distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a file processing method, a file processing device, a file processing medium and a file processing product, which are applied to a file approval system, wherein the file approval system comprises a file index module and a relational database, and the file approval system comprises the following steps: receiving a file processing request sent by first user equipment; searching a first file corresponding to the file information and file authority information of the first file in a file index module based on the file information to be processed; taking the first user identifier as an initial node, backtracking the top node in the department relation information according to the level sequence between the department relation information stored in the relation database, and determining the identifier to be verified; and under the condition that the file authority information of the first file comprises any user identifier in the identifiers to be verified, performing corresponding processing on the first file based on the file processing request. According to the embodiment of the application, the problem of leakage of the content of the file in the circulation process is avoided, and meanwhile, the function of searching the related file in the file approval system is achieved.

Description

File processing method, device, equipment, medium and product
Technical Field
The present application relates to the field of document processing, and in particular, to a method, an apparatus, a device, a medium, and a product for document processing.
Background
With the continuous progress of internet technology, companies often see various document approval systems, such as Office Automation systems (OA), in the Office process.
However, in real life, the document approval system mostly does not consider the authority problem of the document, so that the document content is easily leaked in the process of transferring the documents to be approved among departments. Based on the problem, in the prior art, the authority information of the file is generally set by setting the association relationship among the entity tables stored in the relational database to avoid the leakage of the file content in the file transfer process, but in the prior art, the relational database cannot realize the function of searching the related file under the condition, so that the file approval system cannot realize the function of searching the related file while avoiding the leakage of the file content in the file transfer process.
Disclosure of Invention
The embodiment of the application provides a file processing method, a file processing device, a file processing medium and a file processing product, which can avoid the problem of file content leakage in the file circulation process and realize the function of searching related files in a file approval system.
In a first aspect, an embodiment of the present application provides a file processing method, which is applied to a file approval system, where the file approval system includes a file index module and a relational database, and the method includes:
receiving a file processing request sent by first user equipment, wherein the file processing request comprises a first user identifier and file information to be processed;
searching a first file corresponding to the file information and file authority information of the first file in a file index module based on the file information to be processed;
taking the first user identifier as an initial node, backtracking the top node in the department relation information according to the level sequence between the department relation information stored in the relation database, and determining the identifier to be verified;
and under the condition that the file authority information of the first file comprises any user identifier in the identifiers to be verified, performing corresponding processing on the first file based on the file processing request.
In an optional implementation manner of the first aspect, the file information to be processed includes file information to be deleted or file information to be modified.
In an optional implementation of the first aspect, the method further comprises:
receiving a file approval request sent by first user equipment, wherein the file approval request comprises a first user identifier and a file to be approved;
and storing the files to be reviewed to the file index module based on the file approval request, and generating file authority information of the files to be reviewed, wherein the file authority information of the files to be reviewed comprises a first user identification.
In an optional implementation manner of the first aspect, the document approval request further includes an identifier to be approved; the method further comprises the following steps:
sending the document to be approved to second user equipment corresponding to the identification to be approved for the second user equipment to examine and approve the document to be approved;
and under the condition that the second user equipment carries out approval processing on the file to be approved, updating the file permission information of the file to be approved to obtain updated file permission information, wherein the updated file permission information comprises the identification to be approved and the first user identification.
In an optional implementation manner of the first aspect, after updating the file right information of the to-be-reviewed file to obtain the updated file right information, the method further includes:
aiming at each user identification in the updated file authority information, the following steps are executed:
based on the user identification and the department relation information stored in the relation database, searching for the user identification of the Nth-1 level having the upper and lower level relation with the user identification and all the user identifications of the Nth level having the upper and lower level relation with the user identification of the Nth-1 level, wherein the level of each user identification in the updated file authority information is the Nth level;
under the condition that the updated file permission information comprises all Nth-level user identifications having an upper-lower level relation with the Nth-1-level user identification, all Nth-level user identifications in the updated file permission information are the Nth-1-level user identifications, the Nth-i-2-level user identifications having an upper-lower level relation with the N-i-1-level user identifications and all Nth-i-1-level user identifications having an upper-lower level relation with the N-i-2-level user identifications are searched for, so that the updated file permission information does not comprise all N-i-1-level user identifications having an upper-lower level relation with the N-i-2-level user identifications, wherein i is an integer larger than or equal to 0, n is a positive integer greater than 2.
In an optional implementation of the first aspect, the method further comprises:
and under the condition that the updated file authority information does not comprise all Nth-level user identifications having upper and lower level relations with the N-1-level user identifications, determining the updated file authority information as target file authority information.
In a second aspect, an embodiment of the present application provides a file processing apparatus, which is applied to a file approval system, where the file approval system includes a file index module and a relational database, and the apparatus includes: the receiving module is used for receiving a file processing request sent by first user equipment, wherein the file processing request comprises a first user identifier and file information to be processed;
the searching module is used for searching a first file corresponding to the file information and the file authority information of the first file in the file indexing module based on the file information to be processed;
the backtracking module is used for backtracking the top node in the department relation information according to the level sequence between the department relation information stored in the relation database by taking the first user identifier as an initial node, and determining the identifier to be verified;
and the processing module is used for carrying out corresponding processing on the first file based on the file processing request under the condition that the file authority information of the first file comprises any user identifier in the identifiers to be verified.
In a third aspect, an electronic device is provided, including: a memory for storing computer program instructions; and the processor is used for reading and executing the computer program instructions stored in the memory so as to execute the file processing method provided by any optional implementation manner of the first aspect or the second aspect.
In a fourth aspect, a computer storage medium is provided, where computer program instructions are stored on the computer storage medium, and when executed by a processor, the computer program instructions implement the signal processing method provided in any optional implementation manner of the first aspect or the second aspect.
In a fifth aspect, a computer program product is provided, and when executed by a processor of an electronic device, instructions in the computer program product cause the electronic device to execute a file processing method provided by implementing any optional implementation manner of the first aspect or the second aspect.
In the embodiment of the present application, after receiving a file processing request sent by a first user device, a file index module in a file approval system may search, based on file information to be processed included in the file processing request, for a first file corresponding to the file information to be processed, and file authority information of the first file, and with a first user identifier included in the file processing request as a start node, trace back to a top node in department relation information according to a rank order between the department relation information stored in a relation database, determine an identifier to be verified, and may perform corresponding processing on the first file based on the file processing request under a condition that any user identifier in the identifier to be verified is included in the file authority information of the first file, thereby, while avoiding a problem of file content leakage in a circulation process of the file approval system, the function of searching the related files in the file approval system is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a document processing method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating a tree structure storage of department relationship information according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of another document processing method provided in the embodiments of the present application;
fig. 4(a) is a schematic diagram of file authority information provided in an embodiment of the present application;
fig. 4(b) is a schematic diagram of another file authority information provided in an embodiment of the present application;
FIG. 5 is a diagram illustrating verification of file authority information according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of a document processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Features of various aspects and exemplary embodiments of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative only and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof. In addition, in the technical scheme of the application, the acquisition, storage, use, processing and the like of the data all conform to relevant regulations of national laws and regulations.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In real life, with the continuous progress of internet technology, various document approval systems are often encountered by large companies during the office process. As most document approval systems do not consider the authority problem of the documents, the content of the documents to be approved is easy to be divulged in the process of transferring the documents among departments.
In order to solve the above problems, in the prior art, the authority information of the file is generally set through the association relationship between the entity tables stored in the relational database to avoid the leakage of the file content, but this method cannot be applied to the search function. In addition, in the prior art, the file authority setting and file searching functions can be simultaneously realized by establishing an index through a non-relational database, but the method affects the efficiency of file searching because the specified authority field of each file is too long when the index is established.
In summary, in order to solve the problem that the file approval system in the prior art cannot avoid leakage of file contents during file transfer, and at the same time, better implement a function of searching for related files, embodiments of the present application provide a file processing method, apparatus, device, and medium, where after receiving a file processing request sent by a first user device, the method may search, based on file information to be processed included in the file processing request, a first file corresponding to the file information to be processed, and file authority information of the first file in a file indexing module in the file approval system, and determine an identifier to be verified by tracing back to a top node in department relationship information according to a level sequence between the department relationship information stored in a relationship database with a first user identifier included in the file processing request as a starting node, and then, under the condition that the file authority information of the first file comprises any user identifier in the identifiers to be verified, the first file is correspondingly processed based on the file processing request, so that the problem of file content leakage of the file in the circulation process of the file approval system can be avoided, and meanwhile, the function of searching related files in the file approval system is realized.
The following describes the document processing method provided by the embodiments of the present application in detail by specific embodiments with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a file processing method according to an embodiment of the present application.
As shown in fig. 1, the executing device of the document processing method is a document approval system, which may include a document indexing module and a relational database. The method specifically comprises the following steps:
s110, receiving a file processing request sent by the first user equipment.
The document approval System may be an Office Automation System (OA) System or other systems having a document approval function. The first user device may be an electronic device such as a computer or a tablet computer that can install or run the document approval system. The file processing request may include a first user identifier and file information to be processed, where the first user identifier may be an identifier of an electronic device used by a user or a user code of the user, the specific user identifier is not specifically limited herein, and the file information to be processed may include a file code or a file name, and an operation to be performed on a file is not limited herein.
Specifically, the document approval system may receive a document processing request sent by the first user equipment when the user clicks or touches a page of the document approval system in the first user equipment, where the document processing request may include the first user identifier and information of the document to be processed.
S120, searching a first file corresponding to the file information and file authority information of the first file in the file index module.
The file index module can be a module arranged in the file approval system based on an elastic search engine and used for storing files uploaded to the file approval system and file authority information corresponding to each file. The first file may be a file corresponding to the file information to be processed, and may include a file header and a file content, for example, when the file information to be processed includes a file code, the first file is a file searched from a file index module in the file approval system according to the file code included in the file information to be processed. The file authority information may include a user identifier for representing that the user identifier has authority to operate a file corresponding to the file authority information.
After the file approval system receives the file information to be processed, because the file index module is an elastic search engine and is a module arranged inside the file approval system, the file information to be processed can be converted into an elastic search statement, so that a first file corresponding to the file information and file authority information of the first file can be searched in the file index module in the file approval system based on the file information to be processed converted into the elastic search statement.
In addition, because the file index module is based on the Elasticsearch engine and is a module arranged inside the file approval system, correspondingly, the files stored in the file index module and the corresponding file authority information can be stored by adopting Elasticsearch statements. The file index module may mainly store a file title, a file content, and file authority information, and a word segmenter used for the file title and the file content, for example, the file title and the file content may be stored by using an ik _ smart word segmenter.
In one example, the storage examples in the file indexing module may be: { "id": "01 hbg2uag 69", "title": "leave system approval", "content": "leave-on system approval XXX", "authority": {["1010200","1020100","1020200","1010102","1010103"]}. Wherein id represents a file code, title represents a file title, content represents a file content, authority represents file right information, and the file right information includes a user identifier.
S130, with the first user identifier as an initial node, backtracking to a top node in the department relation information according to the level sequence between the department relation information stored in the relation database, and determining the identifier to be verified.
The relational database may be a Mysql database, or other relational databases, and the specific relational database provided in the embodiment of the present application is not limited too much. The relational database may be configured to store department relation information in a tree structure, where the department relation information may be employees in each department in a company and relation information between each department and employees. The to-be-verified identifier may be an identifier that needs to be subjected to authority verification, and each two adjacent user identifiers in the to-be-verified identifier have a top-and-bottom relationship.
Specifically, because the relational database may store the department relation information in a tree structure, based on this, the document approval system may backtrack the top node in the department relation information according to the rank order between the department relation information stored in the relational database based on the first user identifier, that is, backtrack the top node in the department relation information stored in the tree structure, so as to determine the identifier to be verified including the first user identifier.
In an embodiment, the department relation information may be as shown in table 1, where Id in table 1 may be a user identifier of a department or an employee, Name may be a Name of the department or the employee, pareid may be a user identifier of a previous level corresponding to each department or the employee, Flag may be used to indicate whether the department or the employee fails, Flag may be 0 to indicate that the department has been deleted, or the employee has left the position, and Flag may be 1 to indicate that the department is operating normally, or the employee is in the position. Based on this, it is assumed that under the condition that the department to which the employee belongs adjusts or the employee leaves, simulation can be achieved by modifying the part _ id or Flag in the department relation information table, that is, when the department to which the employee belongs adjusts, the part _ id field corresponding to the employee can be modified based on the identification of the adjusted department, and if the employee leaves, the Flag field corresponding to the employee can be modified to 0.
TABLE 1 department relationship information
Id Name Pare_id Flag
1000000 General Co Ltd 0 1
1010000 Division 1 1000000 1
1020000 Division 2 1000000 1
1010100 Department 1 1010000 1
1010200 Department 2 1010000 1
1020100 Department 3 1020000 1
1020200 Department 4 1020000 1
1010101 Employee A 1010100 1
1010102 Staff B 1010100 1
1010103 Employee C 1010100 1
1010104 Staff D 1010100 0
In addition, the department relationship information shown in table 1 may be stored in a relational database in a form of a tree structure, which may be specifically shown in fig. 2. Based on this, in a specific example, assuming that the employee a is the user represented by the first user identifier, the to-be-verified identifiers including the user identifiers corresponding to the employee a, the department 1, the branch company 1, and the head company may be obtained by tracing back upward according to the level sequence shown in fig. 2 based on the first user identifier, that is, the employee a.
S140, under the condition that the file authority information of the first file comprises any user identifier in the identifiers to be verified, the first file is correspondingly processed based on the file processing request.
After the file approval system searches the first file and the file authority information of the first file based on the file information to be processed included in the file processing request, and determines the identifier to be verified based on the first user identifier included in the file processing request, the file approval system may perform corresponding processing on the first file based on the received file processing request under the condition that the file authority information of the first file includes any user identifier in the identifier to be verified.
In the embodiment of the present application, after receiving a file processing request sent by a first user device, a file index module in a file approval system may search, based on file information to be processed included in the file processing request, for a first file corresponding to the file information to be processed, and file authority information of the first file, and with a first user identifier included in the file processing request as a start node, trace back to a top node in department relation information according to a rank order between the department relation information stored in a relation database, determine an identifier to be verified, and may perform corresponding processing on the first file based on the file processing request under a condition that any user identifier in the identifier to be verified is included in the file authority information of the first file, thereby, while avoiding a problem of file content leakage in a circulation process of the file approval system, the function of searching the related files in the file approval system is realized.
In some embodiments, the above-mentioned pending file information may include file information to be deleted or file information to be modified.
In one example, in the case that the file information to be processed is file information to be deleted, the file approval system may delete the searched first file based on the file information to be deleted included in the file processing request in the case that the first user identification authority passes the verification.
In another example, when the file information to be processed is file information to be modified, the file approval system may modify the first file obtained by searching based on the file information to be modified included in the file processing request when the first user identification authority passes verification. For example, information such as a file title, a file content, and the like of the first file may be modified.
In this embodiment, the file approval system may perform corresponding processing on the first file based on the file information to be deleted or the file information to be modified included in the received file processing request, under the condition that the first user identification authority passes the verification. Therefore, the condition that the file is lost or the file is divulged can be avoided by carrying out the authority verification on the first user identification, and the user is allowed to correspondingly modify or delete the searched file under the condition that the user authority verification passes, so that the user experience is improved.
In order to more accurately and clearly describe the document processing method provided in the embodiment of the present application, in an embodiment, as shown in fig. 3, the document processing method related to the foregoing may further include the following steps:
s310, a file approval request sent by the first user equipment is received.
And S320, storing the files to be reviewed to the file index module based on the file approval request, and generating file authority information of the files to be reviewed.
The document approval request may include a first user identifier and a document to be approved, and the document to be approved may be a document that is uploaded to the document approval system by the first user device and needs to be approved.
The file approval system can store the to-be-approved file included in the file approval request into the file index module according to the file approval request by receiving the file approval request sent by the first user equipment, generate the file permission information including the to-be-approved file according to the file approval request, and the generated file permission information including the first user identification.
Therefore, the document to be examined and approved included in the document examination and approval request can be stored in the document index module by receiving the document examination and approval request sent by the first user equipment, so that the document to be examined and approved can be filed conveniently, and the document authority information of the document to be examined and approved can be generated, so that the document authority information of the document to be examined and approved can be continuously updated in the circulation process of the document to be examined and approved, further, the authority verification of the user identification based on the document authority information is facilitated, and the condition that the document is leaked in the circulation process of the document examination and approval system is avoided.
In an embodiment, the document approval request may further include an identifier to be approved, and based on this, in order to more clearly and fully describe the document processing method provided in the embodiment of the present application, the document processing method may further include the following steps:
sending the document to be approved to second user equipment corresponding to the identification to be approved for the second user equipment to examine and approve the document to be approved;
and under the condition that the second user equipment carries out approval processing on the file to be approved, updating the file permission information of the file to be approved to obtain the updated file permission information.
The pending identification may include at least one user identification, and the second user device may be a computer, a tablet, or other device that can run the document approval system. The updated file permission information may include the pending approval identifier and the first user identifier.
The file approval system can sequentially send the files to be approved to the second user equipment corresponding to the identifiers to be approved according to the identifiers to be approved included in the file approval request, so that the second user equipment can approve the files to be approved, and further, under the condition that the second user equipment approves the files to be approved, the file permission information of the files to be approved is updated, that is, the identifiers to be approved after the files to be approved are added to the file permission information of the files to be approved, so that the updated file permission information of the files to be approved comprises the identifiers to be approved and the first user identifier.
In this embodiment, the files to be approved can be sequentially sent to the second user devices corresponding to the identifiers to be approved based on the identifiers to be approved included in the file approval request, so that the file can be circulated and approved in the file approval system. In addition, in the embodiment of the application, the file permission information of the to-be-approved file can be updated under the condition that the second user equipment passes the examination of the to-be-approved file, so that the file permission information of the to-be-approved file is continuously updated in the circulation process of the to-be-approved file, the follow-up permission verification of the user identification based on the file permission information can be conveniently carried out, and the file leakage condition of the file in the circulation process of the file examination and approval system is avoided.
In addition, it should be noted that the file authority information related in the file processing method provided in the embodiment of the present application may be defined based on a certain rule, so as to ensure the reasonability of the file authority information. For example, as shown in fig. 4(a), employee a, employee B, and department 1 all have authority to modify the corresponding files, but in the case where department 1 has authority, employee a, employee B, employee C, and employee D under department 1 should all have authority, and therefore, the file authority information shown in fig. 4(a) is incorrect, whereas fig. 4(B) does not involve the above-mentioned problem, and therefore, the file authority information shown in fig. 4(B) is correct. And it should be noted that, in the case that all of employee a, employee B, employee C, and employee D under department 1 have authority, it may be considered that department 1 has authority, that is, the file authority information may include only the user identifier of department 1, and does not need to include the user identifiers of employee a, employee B, employee C, and employee D.
Based on this, in order to accurately update the file authority information, it is necessary to verify the updated file authority information. Therefore, in an embodiment, after updating the file authority information of the pending file to obtain the updated file authority information, the above-mentioned related file processing method may further include the following steps:
aiming at each user identification in the updated file authority information, searching an N-1 level user identification having a hierarchical relationship with the user identification and all Nth level user identifications having the hierarchical relationship with the N-1 level user identification based on the user identification and department relationship information stored in a relationship database;
and under the condition that the updated file permission information comprises all Nth-level user identifications having an upper-lower level relation with the Nth-1-level user identification, all Nth-level user identifications in the updated file permission information are the Nth-1-level user identifications, searching for the Nth-i-2-level user identification having an upper-lower level relation with the N-i-1-level user identification and all Nth-i-1-level user identifications having an upper-lower level relation with the N-i-2-level user identification, wherein the updated file permission information does not comprise all N-i-1-level user identifications having an upper-lower level relation with the N-i-2-level user identification.
And the level of each user identifier in the updated file authority information is the Nth level. i is an integer greater than or equal to 0 and N is a positive integer greater than 2.
Specifically, after the file permission information of the document to be approved is updated, the document approval system may search, for each user identifier in the updated file permission information, the rank of each user identifier in the updated file permission information as the nth rank, and based on the user identifier and the department relationship information stored in the relationship database, for an nth-1 rank user identifier having a hierarchical relationship with the user identifier, that is, a user identifier of the previous rank of the user identifier, and all nth ranks user identifiers having a hierarchical relationship with the nth-1 rank user identifier, that is, user identifiers of the same ranks of the user identifiers. Thus, under the condition that the updated file authority information comprises all Nth-level user identifications having an upper-lower level relation with the Nth-1-level user identification, all Nth-level user identifications in the updated file authority information are updated to be the N-1 th-level user identifications, and the N-i-2 th-level user identifications having an upper-lower level relation with the N-i-1-level user identification and all N-i-1 th-level user identifications having an upper-lower level with the N-i-2-level user identification can be continuously searched until all N-i-1 th-level user identifications having an upper-lower level relation with the N-i-2-level user identification are not included in the updated file authority information.
In one example, as shown in fig. 5, assuming that the updated file authority information includes user identifications of employee a, employee B, employee C, employee D and department 2, the level of the user identification of employee a may be considered as nth level, and based on the user identification of employee a and the department relationship information, the user identification of the previous level of employee a, that is, the user identification of department 1, and all the user identifications of the nth level under department 1, that is, the user identifications of employee a, employee B, employee C and employee D, respectively, may be searched, based on which, the updated file authority information includes all the user identifications of nth level under department 1, such as employee a, employee B, employee C and employee D, etc., so that the user identifications of employee a, employee B, employee C and employee D in the updated file authority information may be updated as the identification of department 1, that is, the updated file authority information includes the user identifications of the department 1 and the department 2. And then the process can be continued based on the user identification of the department 1 until the updated file authority information does not comprise all the user identifications of the N-i-1 level which have the upper and lower level relation with the user identification of the N-i-2 level.
In the embodiment, the updated file authority information can be verified, the reasonability and the correctness of the updated file authority information are ensured, the storage content of the file authority information can be reduced through the verification mode, the storage space can be saved, and the query efficiency can be improved.
Based on this, in one embodiment, the method for processing files may further include the following steps:
and under the condition that the updated file permission information does not comprise all Nth-level user identifications having an upper-lower level relation with the N-1-level user identifications, determining the updated file permission information as target file permission information.
Specifically, after the file permission information of the file to be approved is updated to obtain the updated file permission information, the file approval system may determine that the updated file permission information is the target file permission information under the condition that the updated file permission information does not include all nth-level user identifiers having an upper-lower level relationship with the N-1-level user identifiers.
In this embodiment, the updated file authority information may be determined to be the target file authority information under the condition that the updated file authority information does not include all nth-level user identifiers having a hierarchical relationship with the N-1-level user identifiers. Therefore, the updated file authority information can be verified, and the reasonability and the correctness of the updated file authority information are guaranteed.
In some embodiments, the file authority information may include department authority information and employee authority information.
In the embodiment, the file authority information is divided into the department authority information and the employee authority information to be stored respectively, so that the authority information of the file is changed continuously along with the continuous circulation of the corresponding file in the file approval system, and the file authority information can be modified in a targeted manner, namely, the department authority information can be directly modified if the department authority information is increased or deleted, and the department authority information can be directly modified if the employee authority information is increased or deleted.
Based on the same inventive concept, the embodiment of the application also provides a file processing device. The document processing device may be configured in a document approval system, which may include a document indexing module and a relational database. The document processing apparatus provided in the embodiment of the present application is specifically described with reference to fig. 6.
Fig. 6 is a schematic structural diagram of a document processing apparatus according to an embodiment of the present application.
As shown in fig. 6, the document processing apparatus 600 may include: a receiving module 610, a searching module 620, and a rights verification module 630.
The receiving module 610 is configured to receive a file processing request sent by a first user device, where the file processing request includes a first user identifier and file information to be processed.
And the searching module 620 is configured to search the file indexing module for the first file corresponding to the file information and the file authority information of the first file.
The backtracking module 630 is configured to take the first user identifier as an initial node, perform backtracking to a top node in the department relationship information according to a level sequence between the department relationship information stored in the relationship database, and determine an identifier to be verified.
The processing module 640 is configured to, when the file authority information of the first file includes any user identifier in the identifiers to be verified, perform corresponding processing on the first file based on the file processing request.
In one embodiment, the file information to be processed includes file information to be deleted or file information to be modified.
In one embodiment, the receiving module is further configured to receive a file approval request sent by the first user equipment, where the file approval request includes a first user identifier and a file to be approved;
the file processing apparatus as referred to above may further include a storage module.
And the storage module is used for storing the files to be examined to the file index module based on the file approval request and generating the file authority information of the files to be examined, wherein the file authority information of the files to be examined comprises a first user identification.
In one embodiment, the document approval request further comprises an identifier to be approved; the file processing device may further include a sending module and an updating module.
And the sending module is used for sending the document to be approved to the second user equipment corresponding to the identifier to be approved so as to be used for the second user equipment to carry out approval processing on the document to be approved.
And the updating module is used for updating the file authority information of the file to be approved under the condition that the second user equipment approves the file to be approved to obtain updated file authority information, and the updated file authority information comprises the identification to be approved and the first user identification.
In one embodiment, the above-mentioned document processing apparatus may further include a lookup module.
And the searching module is used for searching the user identification of the Nth-1 level having the upper and lower level relation with the user identification and all the user identifications of the Nth level having the upper and lower level relation with the user identification of the Nth-1 level according to each user identification in the updated file permission information and the department relation information stored in the relation database, wherein each user identification level in the updated file permission information is the Nth level.
The updating module is further configured to, in a case that the updated file permission information includes all nth level user identifiers having an upper-lower level relationship with the nth-1 level user identifiers, update all nth level user identifiers in the updated file permission information to be nth-1 level user identifiers, and search for nth-i-2 level user identifiers having an upper-lower level relationship with the N-i-1 level user identifiers and all nth-i-1 level user identifiers having an upper-lower level relationship with the N-i-2 level user identifiers, so that the updated file permission information does not include all nth-i-1 level user identifiers having an upper-lower level relationship with the N-i-2 level user identifiers, wherein, i is an integer greater than or equal to 0 and N is a positive integer greater than 2.
In one embodiment, the above-mentioned document processing apparatus may further include a determination module.
And the determining module is used for determining the updated file authority information as the target file authority information under the condition that the updated file authority information does not comprise all Nth-level user identifications having the upper and lower level relations with the N-1-level user identifications.
In the embodiment of the present application, after receiving a file processing request sent by a first user device, a file index module in a file approval system may search, based on file information to be processed included in the file processing request, for a first file corresponding to the file information to be processed, and file authority information of the first file, and with a first user identifier included in the file processing request as a start node, trace back to a top node in department relation information according to a rank order between the department relation information stored in a relation database, determine an identifier to be verified, and may perform corresponding processing on the first file based on the file processing request under a condition that any user identifier in the identifier to be verified is included in the file authority information of the first file, thereby, while avoiding a problem of file content leakage in a circulation process of the file approval system, the function of searching the related files in the file approval system is realized.
Each module in the file processing apparatus provided in the embodiment of the present application may implement the method steps in the embodiments shown in fig. 1 or fig. 3, and may achieve the technical effects corresponding thereto, and for brevity, no further description is given here.
Fig. 7 shows a hardware structure diagram of an electronic device according to an embodiment of the present application.
The electronic device may include a processor 701 and a memory 702 that stores computer program instructions.
Specifically, the processor 701 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 702 may include a mass storage for data or instructions. By way of example, and not limitation, memory 702 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 702 may include removable or non-removable (or fixed) media, where appropriate. The memory 702 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 702 is non-volatile solid-state memory.
The memory may include Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform operations described with reference to the methods according to an aspect of the present disclosure.
The processor 701 realizes any one of the file processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 702.
In one example, the electronic device may also include a communication interface 703 and a bus 710. As shown in fig. 7, the processor 701, the memory 702, and the communication interface 703 are connected by a bus 710 to complete mutual communication.
The communication interface 703 is mainly used for implementing communication between modules, apparatuses, units and/or devices in this embodiment of the application.
Bus 710 comprises hardware, software, or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 710 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
In addition, in combination with the file processing method in the foregoing embodiments, the embodiments of the present application may provide a computer storage medium to implement. The computer storage medium having computer program instructions stored thereon; the computer program instructions realize the file processing method provided by the embodiment of the application when being executed by a processor.
The embodiment of the present application further provides a computer program product, and when an instruction in the computer program product is executed by a processor of an electronic device, the electronic device executes the scientific and technological innovation achievement evaluation method provided in the embodiment of the present application.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable document processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable document processing apparatus, implement the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As is clear to those skilled in the art, for convenience and simplicity of description, the specific working processes of the above-described systems, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (10)

1. A file processing method is characterized by being applied to a file approval system, wherein the file approval system comprises a file index module and a relational database, and the method comprises the following steps:
receiving a file processing request sent by first user equipment, wherein the file processing request comprises a first user identifier and file information to be processed;
searching a first file corresponding to the file information and file authority information of the first file in the file index module based on the file information to be processed;
taking a first user identifier as an initial node, backtracking a top node in the department relation information according to a level sequence between the department relation information stored in the relation database, and determining an identifier to be verified;
and under the condition that the file authority information of the first file comprises any user identifier in the identifiers to be verified, performing corresponding processing on the first file based on the file processing request.
2. The method according to claim 1, wherein the file information to be processed comprises file information to be deleted or file information to be modified.
3. The method of claim 1, further comprising:
receiving a file approval request sent by first user equipment, wherein the file approval request comprises a first user identifier and a file to be approved;
and storing the files to be examined to the file index module based on the file approval request, and generating the file permission information of the files to be examined, wherein the file permission information of the files to be examined comprises a first user identification.
4. The method of claim 3, wherein the document approval request further comprises an approval to be granted identifier; the method further comprises the following steps:
sending the document to be examined to second user equipment corresponding to the identification to be examined, so that the second user equipment can examine and approve the document to be examined;
and under the condition that the second user equipment approves the document to be approved, updating the document permission information of the document to be approved to obtain updated document permission information, wherein the updated document permission information comprises an identification to be approved and a first user identification.
5. The method of claim 4, wherein after updating the file permission information of the pending file to obtain updated file permission information, the method further comprises:
aiming at each user identification in the updated file authority information, the following steps are executed:
based on the user identification and department relation information stored in the relation database, searching for an N-1 level user identification having an upper and lower level relation with the user identification and all N levels of user identifications having an upper and lower level relation with the N-1 level user identification, wherein the level of each user identification in the updated file authority information is the Nth level;
under the condition that the updated file permission information comprises all Nth-level user identifications having an upper-lower level relationship with the Nth-1-level user identification, updating all Nth-level user identifications in the updated file permission information to be the Nth-1-level user identifications, searching for the Nth-i-2-level user identifications having an upper-lower level relationship with the N-i-1-level user identification and all the Nth-i-1-level user identifications having an upper-lower level relationship with the N-i-2-level user identification for the updated file permission information not to comprise all the N-i-1-level user identifications having an upper-lower level relationship with the N-i-2-level user identification, wherein i is an integer greater than or equal to 0, and N is a positive integer greater than 2.
6. The method of claim 5, further comprising:
and under the condition that the updated file permission information does not comprise all Nth-level user identifications having an upper-level and lower-level relation with the N-1-level user identifications, determining the updated file permission information as target file permission information.
7. A file processing device is applied to a file approval system, the file approval system comprises a file index module and a relational database, and the device comprises:
the receiving module is used for receiving a file processing request sent by first user equipment, wherein the file processing request comprises a first user identifier and file information to be processed;
the searching module is used for searching a first file corresponding to the file information and file authority information of the first file in the file indexing module based on the file information to be processed;
the backtracking module is used for backtracking the top node in the department relation information according to the level sequence between the department relation information stored in the relation database by taking the first user identifier as an initial node, and determining the identifier to be verified;
and the processing module is used for carrying out corresponding processing on the first file based on the file processing request under the condition that the file authority information of the first file comprises any user identifier in the identifiers to be verified.
8. An electronic device, characterized in that the device comprises: a processor and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the document processing method of any one of claims 1 to 6.
9. A computer storage medium, characterized in that the computer storage medium has stored thereon computer program instructions which, when executed by a processor, implement the file processing method according to any one of claims 1 to 6.
10. A computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the file processing method of any of claims 1-6.
CN202210597062.XA 2022-05-30 2022-05-30 File processing method, device, equipment, medium and product Pending CN114968925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210597062.XA CN114968925A (en) 2022-05-30 2022-05-30 File processing method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210597062.XA CN114968925A (en) 2022-05-30 2022-05-30 File processing method, device, equipment, medium and product

Publications (1)

Publication Number Publication Date
CN114968925A true CN114968925A (en) 2022-08-30

Family

ID=82957105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210597062.XA Pending CN114968925A (en) 2022-05-30 2022-05-30 File processing method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN114968925A (en)

Similar Documents

Publication Publication Date Title
CN115222361A (en) Business process flow transfer method, device, equipment and computer storage medium
CN115952760A (en) Method, device and equipment for simulating digital-analog circuit and computer storage medium
CN114090643A (en) Recruitment information recommendation method, device, equipment and storage medium
CN114968925A (en) File processing method, device, equipment, medium and product
CN114328503A (en) Method, device and equipment for managing data based on hash table and storage medium
CN109726398B (en) Entity identification and attribute judgment method, system, equipment and medium
CN114677211A (en) Credit parameter updating method, apparatus, electronic device, medium, and program product
CN114372072A (en) Data storage method, device, equipment, computer storage medium and program product
CN114647496A (en) Index checking method, device, equipment and computer readable storage medium
CN112328595A (en) Data searching method, device, equipment and storage medium
US20200141757A1 (en) Map information creation device, map information creation method, map information creation program, and recording medium
CN115391447A (en) Data export method, device, equipment, medium and product
CN116303337A (en) Data migration method, device, equipment and computer storage medium
CN114637795A (en) Report processing method, device, equipment, medium and product
CN115967522A (en) Data processing method, device, equipment and storage medium
CN115204677A (en) Information determination method, device, equipment and computer readable storage medium
CN115827783A (en) Data receiving method, device, equipment and readable storage medium
CN118132655A (en) Information synchronization method, apparatus, device, storage medium, and program product
CN114661604A (en) Data generation method, device, equipment and computer storage medium
CN117971618A (en) Database performance problem processing method, device, equipment, medium and product
CN115033534A (en) File processing method, device, equipment and computer readable storage medium
CN117251449A (en) Data processing method, device, equipment, medium and product
CN115481204A (en) Data checking method, data checking device, electronic equipment, medium and program product
CN115048917A (en) Information processing method, device, equipment, medium and product
CN114168564A (en) Data processing method, device, equipment and computer storage medium

Legal Events

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