Intelligent file management method and system based on micro-service and cloud native architecture
By constructing a file access path list and a permission check sorting list, the permission processing order is optimized, which solves the problem of insufficient optimization of permission node order and improves the coordination and stability of file access.
Patent Information
- Application Number
- CN202610051958.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-15
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2046-01-15
AI Technical Summary
Existing technologies do not involve structural optimization of the order of permission nodes in the access control process and lack the ability to build path models based on access behavior. This results in delayed response times and scattered execution logic in permission processing, making it difficult to adapt to scenarios with continuous changes in access behavior, reducing processing efficiency and increasing collaborative pressure.
By acquiring access records in the microservice environment, a file access path list is constructed, the frequency and order of permission nodes are counted, a permission check sorting list is generated, and sorting boundaries are set according to the list to divide the processing order before and after, forming a file permission processing order mapping table, and uniformly organizing permission checks and access behavior paths.
It improves the overall coordination and processing continuity of access paths, reduces the disconnect between permission processing and file operations, and enhances the process adaptability and scheduling stability in complex access scenarios.
Smart Images

Figure CN121542225A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent file management technology, and in particular to a method and system for intelligent file management based on microservices and cloud-native architecture. Background Technology
[0002] The field of intelligent document management technology encompasses the systematic, automated, and intelligent management of various electronic documents throughout their entire lifecycle, including generation, classification, storage, retrieval, sharing, searching, and archiving. Its core content is based on digital information processing technology, enabling unified identification and management of document structure, attributes, content, and metadata. This covers multiple sub-directions such as document lifecycle management, distributed storage, access control, full-text search, version tracking, operation auditing, and intelligent content parsing. The overall technology system relies on pooled computing resources, standardized data interfaces, automated processing workflows, and a systematic security strategy, providing enterprises and institutions with comprehensive document management support across platforms, multiple terminals, and high-concurrency scenarios.
[0003] The file intelligent management method based on microservices and cloud-native architecture refers to decoupling system functions into independently deployed, elastically scalable microservice units, achieving automated scheduling, containerized operation, and service interoperability control within a cloud-native infrastructure. It primarily encompasses communication between services via a unified interface protocol, node discovery and governance through a service registration mechanism, centralized parameter management through a configuration center, handling high-concurrency requests through a load balancing mechanism, and rapid horizontal scaling through stateless services. The overall architecture separates file upload, parsing, storage, retrieval, and permission verification into independent service units, enabling flexible combination and independent evolution of each stage to adapt to changes in business scale and processing capacity adjustments.
[0004] Existing technologies do not involve structural optimization of the order of permission nodes in the access control process, lack the ability to build path models based on access behavior, and have fixed configurations for permission verification steps, making it difficult to adapt to scenarios with continuous changes in access behavior. This results in delays in the timing of permission processing and scattered execution logic. In addition, the file operation process lacks path aggregation and sequence recognition mechanisms for each action, and does not have the ability to identify paths for continuous access behavior. For example, read and modify operations cannot be processed as a whole link, which limits the space for structural optimization of access paths, reduces processing efficiency, and increases the collaborative pressure caused by process separation. Summary of the Invention
[0005] To address the technical problems existing in the prior art, embodiments of the present invention provide a method and system for intelligent file management based on microservices and cloud-native architecture. The technical solution is as follows: The intelligent file management method based on microservices and cloud-native architecture includes the following steps: S1: Obtain access records generated in the microservice environment, extract the access initiator and target file location identifier, sort the permission steps that appear sequentially in the same access by time, eliminate duplicates, establish a continuous path trajectory, and generate a list of file access paths. S2: Based on the file access path list, count the number of times each permission check step appears in the path, record its average position in the path, merge and sort according to cumulative frequency and average position, and generate a file permission check sorting list. S3: Based on the file permission check and sorting list, set sorting boundaries to classify the earlier steps into pre-access processing and the rest into post-access processing, mark the position and order label of each processing step, and generate a file permission processing order mapping table. S4: Call the file access path list, compare multiple access paths from the same initiator, sort out the order of opening, reading and modifying files, filter out duplicate structure paths and merge them to generate a set of file access continuation paths.
[0006] As a further aspect of the present invention, the file access path list includes access initiator identification information, file storage location identification information, permission check node sequence, and access behavior time tag; the file permission check sorting list includes permission node occurrence frequency value, node order position information, node weight score, and permission centralized sorting result; the file permission processing order mapping table includes pre-processing node identifier, post-processing node identifier, processing order correspondence, and processing interval division result; and the file access continuation path set includes continuous access behavior sequence, repeated path connection pattern, operation behavior connection structure, and path stability characteristics.
[0007] As a further aspect of the present invention, the step of obtaining S1 is as follows: S101: Obtain continuously generated file access data frames in the microservice environment, and extract the access initiator identifier, access trigger timestamp and file storage location identifier from them. Use the access trigger timestamp as the sequence base, and combine the correspondence between the access initiator identifier and the file storage location identifier to separate multiple sets of continuous access actions in the data frames and generate a file access action sequence set. S102: Based on each set of data frames in the file access action sequence set, call the permission verification identifier and execution time parameter contained in the permission check field, arrange the permission verification identifiers linearly according to the order of the execution time parameters, and organize each permission identifier node in chronological order to generate a permission verification time sequence chain group. S103: Based on the permission identifier combinations contained in each time chain of the permission verification time chain group, remove the permission node combinations that appear repeatedly in different access actions, retain the unique combination structure, and sequentially concatenate the retained permission identifiers to form a directed path topology, generating a file access path list.
[0008] As a further aspect of the present invention, the process of obtaining continuously generated file access data frames in the microservice environment is limited to processing only file access data frames that appear more frequently than a set judgment benchmark within a unit time interval; in the process of extracting the access trigger timestamp as a sequence benchmark and combining it with the correspondence between the access initiator identifier and the file storage location identifier, only access actions that meet the access trigger timestamp continuity requirement are retained to generate a file access action sequence set; in the process of organizing each permission identifier node in chronological order, an order continuity restriction is imposed on the arrangement relationship between permission verification identifiers to ensure that each permission identifier node in the generated permission verification time sequence chain is correlated; in the process of sequentially concatenating permission identifiers to form a directed path topology, the retained permission identifier combination structure is filtered using topology path integrity rules.
[0009] As a further aspect of the present invention, the step of obtaining S2 is as follows: S201: Based on the file access path list, extract the permission verification node identifiers that appear in each access path, detect the frequency of the permission verification nodes in different access paths, organize the frequency results in a centralized manner according to the consistency of the node identifiers, and form a frequency statistics form distinguished by nodes to generate a set of permission node occurrence times. S202: Based on the set of occurrence times of the permission nodes, extract the position index of each permission verification node in the access trajectory in the file access path list, call the node frequency result as the weight benchmark, weight the position index and the corresponding weight, output the sequential weight expression of each permission verification node, and generate a set of node sequential weight values. S203: Based on the node order weight value set, the permission verification nodes are serialized and organized according to the size relationship between the weight expressions, and a unified permission verification order expression is formed according to the sequence result to generate a file permission check sorting list.
[0010] As a further aspect of the present invention, the step of obtaining S3 is as follows: S301: According to the file permission check sorting list, read the relative position number of each permission verification node in the sequence in turn, detect the distribution status of each group of numbers in the sorting range, set the position interval threshold according to the number increment relationship, and divide all numbers into two sets according to the interval boundary to generate permission node interval grouping set; S302: Call the set of numbers in the grouping set of the permission node interval, match the corresponding permission node identifier in the access trajectory according to the first part of the number interval set, uniformly mark the node of this type as access pre-processing, and uniformly mark the node identifier in the second part set as access deferred processing, and generate a permission node processing annotation set. S303: Based on the permission node processing annotation set, extract the sequential pairing combination of each pre-processing node and post-processing node in the access path, detect whether the corresponding positions of the node identifiers have a corresponding relationship in the same trajectory, and generate node mapping index data according to the detection results to generate a file permission processing order mapping table.
[0011] As a further aspect of the present invention, the step of obtaining S4 is as follows: S401: Call the file access path list, for multiple consecutive file operation paths associated with the same access initiator identifier, perform a sequential relationship judgment based on the operation trigger timestamp in the path, and perform a continuity judgment on adjacent path segments to obtain the operation connection status formed by the same access initiator, and generate a continuous path group of access initiators. S402: Based on the continuous path group of the access initiator, detect the file operation type identifiers appearing in each path, take the file open identifier as the starting node, sequentially determine the sequential association between the subsequent read identifier, modify identifier and close identifier, and extract the operation sequence that satisfies the sequential consistency to form a sequence unit, and generate a file operation sequence set; S403: Based on the file operation sequence set, perform consistency judgment on the operation sequence units that appear repeatedly in different access paths, and uniformly number and associate the consistent sequences to complete the expression of the coherent relationship between paths and generate a set of file access continuation paths.
[0012] As a further aspect of the present invention, the method further includes: S5: Based on the set of file access continuation paths and the pre- and post-processing structures in the file permission processing order mapping table, the operation steps required for the current access are sorted and merged in order to generate a file intelligent management execution list. The intelligent file management execution list includes access path combination structure, permission check execution order, file processing action arrangement, and execution strategy mapping rules.
[0013] As a further aspect of the present invention, the step of obtaining S5 is as follows: S501: Based on the data frames of each access path in the file access continuation path set, extract the corresponding file operation actions and access initiator identifiers in sequence, extract the permission verification nodes and file processing nodes nested in the access behavior from the path segment, and concatenate all node names in the order of action triggering to generate an access action node sequence string. S502: Call the preceding and following processing tag data in the mapping table between the access action node sequence and the file permission processing sequence, detect the sequence tag position of each permission node and processing node in the sequence, and adjust the node arrangement direction uniformly according to the tag content to form a node sequence set with consistent order, and generate an access path sequence mapping set. S503: Based on the node distribution status of each sequence in the access path sequence mapping set, extract the permission verification segment and file operation segment in each access path and classify them into the same access structure. Aggregate the paths according to the access initiator identifier, and output all the aggregated access structures in a unified manner to generate a file intelligent management execution list.
[0014] A file intelligent management system based on microservices and cloud-native architecture, the system comprising: The access trajectory collection module obtains the access initiator identifier, file storage location address and permission number from the microservice logs, sorts the permission numbers in ascending order by timestamp and removes duplicates, and combines the processed permission order with the access identifier to generate a list of file access paths. The permission centralized statistics module counts the number of occurrences of each permission number and the path index position based on the file access path list, calculates the weighted value of the two and sorts them, extracts the permission number sequence in the sorted structure, and generates a file permission check sorted list. The processing sequence mapping module calls the file permission check sorting list, divides the preceding and following permission numbers according to their positions in the sequence, establishes a mapping relationship, and generates a file permission processing sequence mapping table. The path coherence construction module, based on the file access path list, compares the operation order in consecutive paths under the same access initiator, classifies frequently occurring operation structure combinations, organizes them into consecutive access sequences, and generates a set of file access continuation paths. The intelligent execution list module, based on the set of file access continuation paths, calls the file permission processing order mapping table, inserts the permission processing order into the file operation structure, integrates the path order by initiator, and generates a file intelligent management execution list.
[0015] The beneficial effects of the technical solutions provided by the embodiments of the present invention include at least the following: In this invention, a continuous access trajectory is constructed by extracting visitor identifiers and file location identifiers. The time sequence and frequency of occurrence of permission nodes are combined to form a sorting result. The relationship between permission processing is divided according to the sorting interval. At the same time, read, modify and close operations are associated to form a coherent access link. The permission check order and access behavior path are organized in a unified manner, which improves the overall coordination and processing coherence of the access path, reduces the disconnect between permission processing and file operation, and enhances the process adaptability and scheduling stability in complex access scenarios. Attached Figure Description
[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart illustrating the acquisition process of S1 in this invention; Figure 3 This is a flowchart illustrating the acquisition process of S2 in this invention; Figure 4 This is a flowchart illustrating the acquisition process of S3 in this invention; Figure 5 This is a flowchart illustrating the acquisition process of S4 in this invention; Figure 6 This is a flowchart of the acquisition process for S5 of the present invention. Detailed Implementation
[0017] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0018] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0019] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0020] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0021] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0022] Please see Figure 1 This invention provides a technical solution: a file intelligent management method based on microservices and cloud-native architecture, comprising the following steps: S1: Obtain continuously generated file access records in the microservice environment, extract the access initiator identifier and file storage location identifier, compare the sequential permission check steps that appear in the same file access in sequence, organize the continuous triggering sequence according to the time relationship, form a non-repeating access trajectory, and generate a file access path list. S2: Based on the file access path list, count the cumulative number of times each permission check step appears in different access paths, record the position order of each step in the path, weight and merge the occurrence count and position order, sort them, complete the concentration sorting in the file permission verification process, and generate a file permission check sorting list. S3: Based on the file permission check sorting list, divide the sorting results into position intervals, mark the check steps in the preceding interval as access pre-processing, and mark the check steps in the following interval as access deferred processing. Organize the correspondence between the two types of processing order and generate a file permission processing order mapping table. S4: Call the file access path list, compare the paths formed by consecutive file operations from the same access initiator, identify the order of reading, modifying and closing after the file is opened, sort and summarize the repeated connection order, complete the path coherence relationship sorting, and generate a set of file access continuation paths. S5: Based on the set of file access continuation paths and the file permission processing order mapping table, the permission checks and file processing actions to be performed in a single file access are arranged in order. The arranged access paths and processing order are integrated and summarized to generate a file intelligent management execution list.
[0023] The file access path list includes access initiator identification information, file storage location identification information, permission check node sequence, and access behavior time tag. The file permission check sorting list includes permission node occurrence frequency value, node order position information, node weight score, and permission centralized sorting result. The file permission processing order mapping table includes pre-processing node identifier, post-processing node identifier, processing order correspondence, and processing interval division result. The file access continuation path set includes continuous access behavior sequence, repeated path connection pattern, operation behavior connection structure, and path stability characteristics. The file intelligent management execution list includes access path combination structure, permission check execution order, file processing action arrangement, and execution strategy mapping rules.
[0024] Please see Figure 2 The steps to obtain S1 are as follows: S101: Obtain continuously generated file access data frames in the microservice environment, and extract the access initiator identifier, access trigger timestamp and file storage location identifier from them. Use the access trigger timestamp as the sequence base, and combine the correspondence between the access initiator identifier and the file storage location identifier to separate multiple sets of continuous access actions in the data frames and generate a file access action sequence set. To obtain continuously generated file access data frames in a microservice environment, the process first filters the file access records, selecting those accessed more than 5 times within a given time interval. Each record must contain at least three fields: visitor identifier, file location identifier, and access timestamp. Access frequency data is extracted in minutes, with a threshold of 5. Within each minute window, the number of accesses to each file location by each visitor is calculated. If the number of accesses exceeds 5, the current data frame is retained. The visitor identifier field is then extracted and standardized, removing invalid characters and converting it to a uniform format (e.g., lowercase letters). Simultaneously, the timestamp field is extracted and converted to a standard integer format at the second level. For sorting and subsequent difference calculation, the file location identifier field is extracted and grouped by visitor and file identifier. Continuous actions of the same visitor accessing the same file are sorted by timestamp. The time interval between adjacent records is calculated, with a threshold of 20 seconds. If the time difference between two adjacent accesses is less than or equal to 20 seconds, it is considered a continuous access action. If the time difference is greater than the threshold, the current sequence is terminated, and a new sequence assembly begins. Each valid sequence contains at least two actions. For example, user A accesses file X consecutively at 15:01:10, 15:01:25, and 15:01:38, with intervals of 15 seconds and 13 seconds respectively, meeting the set threshold and forming a continuous access action. The generated sequence is: [Visitor A, File X, 15:01:10→15:01:25→15:01:38]. All sequences that meet the access frequency benchmark and time continuity judgment are integrated into a file access action sequence set.
[0025] S102: Based on each set of data frames in the file access action sequence set, call the permission verification identifier and execution time parameter contained in the permission check field, arrange the permission verification identifiers linearly according to the order of the execution time parameters, and organize each permission identifier node in chronological order to generate a permission verification time sequence chain group. Based on the data frames in the file access action sequence set, the permission check field carried by each access action is extracted. The permission check identifier and execution time parameter are obtained through field parsing. For example, the permission identifier is in the form of "read", "write", or "delete", and the execution time parameter is the second-level timestamp when the operation occurs. All permission identifiers within the same group are sorted in ascending order according to the timestamp value to form a preliminary permission permutation chain. The minimum interval between execution times is set to 1 second. Only permutations with an interval of less than or equal to 1 second between permission identifiers within a continuous time are retained. If the time interval exceeds 1 second, it is considered that there is no permission between the permission identifiers. For the relevance, the current arrangement is discarded, and only the combination of permission identifier nodes that meet the continuity requirement is retained. For each sequence of visitors and file locations, a chain of permission identifier nodes arranged in chronological order is constructed. For example, when visitor A accesses file X, he calls the read and write permissions in sequence, and the execution times are 10:02:11 and 10:02:12 respectively, forming a permission verification time sequence chain: [read→write]. If the third permission, delete, is triggered at 10:02:30, it will not be included in the chain because the set time interval has been exceeded. Finally, a valid permission verification time sequence chain group is formed.
[0026] S103: Based on the permission identifier combinations contained in each time chain of the permission verification time chain group, remove the permission node combinations that appear repeatedly in different access actions, retain the unique combination structure, and sequentially concatenate the retained permission identifiers to form a directed path topology, generating a file access path list. For each permission verification sequence chain, firstly, count the permission identifier combinations appearing in all access sequences. Remove duplicate combinations by determining which groups have completely identical permission identifier order. The criterion is that the permission identifiers are completely identical in order and the accessor is the same as the file identifier. For example, if there are three sequences [read→write], [read→write], and [read→write→delete], then only two unique combinations are retained: [read→write] and [read→write→delete]. For the retained combinations, concatenate them according to permission order to form a directed path, treating the permission identifier as a path node, and chain them together. The method connects to generate a permission path chain. For example, "read→write→delete" means that the visitor executes three permission operations in sequence during the process of accessing the file, forming a complete access path. For each path, a path integrity rule is used to judge it. The minimum path length is set to 2 and the maximum to 5. If the number of nodes in the path does not meet this range or there are isolated permission identifier nodes that are not connected to the previous or next step, the path combination is discarded. For example, the path [read→write→delete→share→update→remove] exceeds 5 nodes and is judged as an unqualified path and discarded. Finally, the file access path list is retained.
[0027] Please see Figure 3 The steps to obtain S2 are as follows: S201: Based on the file access path list, extract the permission verification node identifiers that appear in each access trajectory, detect the frequency of the permission verification nodes in different access trajectories, centrally organize the frequency results according to the consistency of the node identifiers, and form a frequency statistics form distinguished by nodes to generate a set of permission node occurrence times. The permission verification node identifier field is extracted from each path in the file access path list. Each path is treated as an independent access trajectory set. Each permission identifier is extracted and organized item by item in each access trajectory. For example, if path A is [read→write→delete] and path B is [read→update→delete], then the permission node identifiers of read, write, and delete are extracted from path A, and the same three nodes are extracted from path B. Next, all extracted node identifiers are categorized, and frequency statistics are performed. The number of times the same permission identifier appears in all path trajectories is accumulated. For example, read appears in both path A and path B with a frequency of 2, and delete appears in both paths. All of these also appear, with a frequency of 2. `write` appears only once in path A, with a frequency of 1. A key-value pair statistical table is created for the above node identifiers and their corresponding frequencies to form an intermediate statistical data set. Then, the statistical results are sorted by node identifiers from smallest to largest. After distinguishing the unique identifier name of each node, a frequency summary table is created. The frequency results are then organized and archived according to node identifiers. For example, the frequencies of all `read` permission identifiers are summarized and categorized as [read:2], `write` as [write:1], `delete` as [delete:2], and `update` as [update:1]. When multiple path trajectories appear, the frequency of each node appearing in each path trajectory is accumulated and its corresponding path number is identified. Finally, a set of the number of times permission nodes appear is generated by matching node identifiers with frequency results one by one.
[0028] S202: Based on the set of occurrence times of permission nodes, extract the position index of each permission verification node in the file access path list in the access trajectory, call the node frequency result as the weight benchmark, weight the position index and the corresponding weight, output the sequential weight expression of each permission verification node, and generate a set of node sequential weight values. Based on the set of frequency occurrences of permission nodes, each path in the file access path list is read sequentially, and the position index number of each permission verification node in the path is recorded. For example, if path C is [read→write→delete], then the position index of read is 1, write is 2, and delete is 3. The frequency of node occurrences in the aforementioned frequency set is used as the weight baseline value. For example, if the frequency of read is 2, the frequency of write is 1, and the frequency of delete is 2. During processing, the node index position is multiplied by its corresponding frequency to obtain the weight value. For example, the weight of the read node is 1×2=2, the write node is 2×1=2, and the delete node is 3×2=6. During the process, the weighted values within the path of each node are merged and stored. All path trajectories are traversed to summarize and calculate the weighted values of the same nodes. For example, if read appears at position index 2 in another path, its weighted value is 2×2=4. After summing, the cumulative weight of read is 2+4=6. Such weighted values are assigned to the weight value set of the corresponding node, and weight grading intervals are set, such as 0-3 being low weight, 4-6 being medium weight, and 7 and above being high weight. Through this partitioning standard, it can be determined that the current read is a medium weight node, delete is a high weight node, and write is a low weight node. Through the construction process of the weight value set, the comprehensive position weight performance of each node can be obtained, and finally the node ranking weight value set is formed.
[0029] S203: Based on the node order weight value set, the permission verification nodes are serialized and organized according to the size relationship between the weight expressions, and a unified permission verification order expression is formed according to the sequence result, generating a file permission check sorting list; Based on the node order weight value set, the weight value entries corresponding to all nodes are first read and sorted by value. The sorting order is set from largest to smallest, and all nodes are arranged in descending order of weight value. For example, if delete has a weight of 8, read has a weight of 6, and write has a weight of 3, then the sorting is [delete→read→write]. When multiple nodes have the same weight value, the average of their position indices in the path is used for auxiliary sorting. If the average index is smaller, it is prioritized. For example, read and write have the same weight value of 6, but read has an average index of 1.5 and write has an average index of 2.0, so read is arranged before write. After all node weight sorting and position order adjustment are performed, a unified permission order expression is formed, and finally a complete permission verification order list is constructed as the final output.
[0030] Please see Figure 4 The steps to obtain S3 are as follows: S301: Based on the file permission check sort list, read the relative position number of each permission verification node in the sequence, detect the distribution status of each group of numbers in the sorting range, set the position interval threshold according to the number increment relationship, and divide all numbers into two sets according to the interval boundary to generate permission node interval grouping set; The file permission checks are performed sequentially, reading the list of all permission verification nodes in the sorted order, and assigning a relative position number to each node. For example, if the sorting is [read, verify, write, ...] If `delete` is called, the numbers will be 1, 2, 3, 4 in sequence. After obtaining the numbers, they are stored as a list of integers. The list of numbers is traversed and analyzed to calculate the difference between the numbers and record their changing trends. It is determined whether there is a monotonically increasing relationship. If there is a change in the number order that violates this trend, an abnormal number group is marked. Ideally, the numbers should show a stable increasing state. The position interval threshold is set according to the length of the overall number sequence. The threshold is set by taking the median value to determine the dividing line. For example, if there are 4 nodes in the current sort, the position interval threshold is the second number, which has a value of 2. The number sequence is further divided into two sets according to this threshold. Numbers less than or equal to the threshold are assigned to the first set, and numbers greater than the threshold are assigned to the second set. For example, if the number sequence is [1,2,3,4], then numbers 1 and 2 are assigned to the first set, and numbers 3 and 4 are assigned to the second set. When performing the division, it is necessary to ensure that each number is unique, non-repeating, and completely assigned. After the division, two sets of numbers are formed, and the sets are bound to the corresponding permission nodes for storage. An interval grouping mapping set is constructed, and finally, the permission node interval grouping set is generated.
[0031] S302: Call the set of numbers in the grouping set of permission node intervals, match the corresponding permission node identifiers in the access trajectory according to the first set of the number interval, uniformly mark the nodes of this type as access pre-processing, and uniformly mark the node identifiers in the second set as access deferred processing, and generate a permission node processing annotation set. The system calls the set of numbers in the permission node interval grouping set. First, it reads the permission identifier content corresponding to the first set of numbers and classifies all permission nodes corresponding to numbers in the set as pre-access processing. For example, if the number set [1,2] corresponds to permission nodes [read, verify], then read and verify are marked as "pre-access processing". Similarly, it reads the second set of numbers [3,4] corresponding to permission nodes [write, delete] and marks them as "delayed processing". After completing the processing classification and labeling of the first and second sets, it performs the action of matching permission identifiers in the access trajectory. It compares the permission nodes in each access path with the pre-access processing and delayed processing identifiers and marks the corresponding matching nodes with processing identifiers. For example, if path A is [read, write, delete], where read matches the pre-access set and write and delete match the delayed processing set, then the processing label for the node of path A is [read-pre-access, write-delayed, ...]. [delete-delay] This process relies on comparing the names of nodes in the path with those in the annotation set one by one. If the names are completely identical, it is considered a successful match. After a match, a processing type attribute field is added to each node. This annotation process is repeated until all path trajectories are annotated, and finally, a permission node processing annotation set is generated.
[0032] S303: Based on the permission node processing annotation set, extract the sequential pairing combination of each pre-processing node and the post-processing node in the access path, detect whether the corresponding positions of the node identifiers have a corresponding relationship in the same trajectory, and generate node mapping index data based on the detection results to generate a file permission processing order mapping table. Based on the permission node processing annotation set, firstly, extract the nodes marked as pre-processing and post-processing in all access paths, and record the relative position of each node in the path. For example, path B is [read-pre-processing, verify-pre-processing, write-post-processing, ...]. [delete-delayed], then read and verify belong to the pre-processing set, and write and delete belong to the delayed processing set. Then, pairing the nodes before and after each other is performed on a path-by-path basis. Each pre-processing node is paired with each node in the subsequent segment. For example, read and write are paired, read and delete are paired, verify and write are paired, and verify and delete are paired, forming a total of four pairings. After performing the pairing, the specific sequence position number of each group of nodes in the path is obtained. After reading the number, the position is compared. If the number of the pre-processing node is less than the number of the delayed node, it is marked as a valid pairing. Otherwise, it is considered an abnormal pairing and is removed. Continue to perform the pairing and position judgment action on all paths, record the node pair name and corresponding position number of all valid pairings, construct the mapping entry structure, organize the node pairing index structure according to the path, and merge all valid pairing sets to form a complete data mapping set. Finally, the generated file permission processing order mapping table is output.
[0033] Please see Figure 5 The steps to obtain S4 are as follows: S401: Call the file access path list, for multiple consecutive file operation paths associated with the same access initiator, determine the order of operations based on the operation trigger timestamps in the path, and perform continuity determination on adjacent path segments to obtain the operation connection status formed by the same access initiator, and generate a continuous path group of access initiators. Based on the access initiator identifier field recorded in each path of the file access path list, all paths are grouped and organized. Paths with the same accessor are grouped into the same set. Within each set, the operation trigger timestamp field of multiple paths is extracted and converted into a uniform numerical time format for sorting. The time sorting granularity is set to the second level. The sorted path sequence is compared based on the timestamp difference between adjacent paths. A continuity determination time threshold of 300 seconds is set. If the trigger time difference between two paths is less than or equal to this threshold, they are considered continuous path segments; otherwise, they are considered independent segments. For example, user X triggered three paths with timestamps of 1000, 1250, and 1600 seconds. The time difference between path 1 and path 2 is 250 seconds, which satisfies the continuity requirement. The time difference between path 2 and path 3 is 350 seconds, which exceeds the set threshold. Therefore, path 3 is considered a new starting segment. As a result, user X has two consecutive path groups: [path 1, path 2] and [path 3]. This operation is repeated to process all visitor identifiers and their corresponding path sets, analyzing the time difference for each group and marking the path group's affiliation number. A consecutive path grouping identifier field is added to all paths, ultimately generating the visitor's consecutive path group.
[0034] S402: Based on the continuous path group of the access initiator, detect the file operation type identifiers appearing in each path, take the file open identifier as the starting node, and sequentially determine the sequential association between the subsequent read identifier, modify identifier and close identifier, and extract the operation sequence that satisfies the sequential consistency to form a sequence unit, and generate a file operation sequence set; Based on the continuous path group initiated by the access, the file operation type identifier field carried in each path is first read. Common operation types include open, read, write, close, etc. The operations in the path are arranged in chronological order, and the operation sequence with the open operation as the first node is identified. Then, the next operation type is read one by one and it is determined whether it is read or write. The order is checked to see if it conforms to the standard process of "open→read→write→close". If the order deviates from this standard pattern at any time in the path, such as write appearing before read or close appearing before write, it is considered to fail to meet the order consistency and is discarded. The order consistency judgment rule is that the node type must strictly follow the order of open first, followed by read and write (the order can be interchanged), and close last. If any node is missing, it is marked as an incomplete sequence and skipped. If all requirements are met, the operation sequence is extracted and the original path number and the time node and operation type in the operation sequence are recorded to construct a standard operation sequence unit structure. After all paths are executed, the operation sequences that meet the conditions are uniformly stored in the sequence set. For example, the operation sequence in path A is [open, read, write, close], which is considered a valid operation sequence unit. The operation sequence in path B is [open, read, write, close]. The write and close operations also satisfy the standard order and are considered as another unit of operation, ultimately generating a set of file operation order sequences.
[0035] S403: Based on the file operation sequence set, perform consistency judgment on the operation sequence units that appear repeatedly in different access paths, and uniformly number and associate the consistent sequences to complete the expression of the coherent relationship between paths and generate a set of file access continuation paths. Based on the file operation sequence set, the operation type composition and sequence structure of each sequence unit are first extracted, and a mapping index is constructed with the operation type string as the key. For example, the sequence [open, read, write, close] is converted to the operation key "open-read-write-close", and the sequence [open, write, close] is converted to "open-write-close". Next, all sequence keys are scanned for duplicates, and a list of their occurrence path numbers is compiled. For sequence keys that appear more than once, a unified number is assigned. For example, number S01 corresponds to "open-read-write-close", and number S02 corresponds to "open-write-close". All sequence units with the same operation order are aggregated and classified and marked with a unified number. At the same time, the path number corresponding to each number is recorded to complete the correspondence between operation behaviors across different paths. Sequence keys that do not appear repeatedly are assigned independent numbers to ensure the integrity of the identification. Finally, a path coherence structure is constructed through the bidirectional index relationship between the number and the path to realize the corresponding expression of operation behaviors across paths, and finally a set of file access continuation paths is generated.
[0036] Please see Figure 6 The steps to obtain S5 are as follows: S501: Based on the data frames of each access path in the file access continuation path set, extract the corresponding file operation actions and access initiator identifiers in sequence, and extract the permission verification nodes and file processing nodes nested in the access behavior from the path segment. Concatenate all node names in the order of action triggering to generate an access action node sequence string. Based on the data frames of each access path in the file access continuation path set, the file operation action field and access initiator identifier field are extracted from each path data frame. The file operation actions are then standardized by mapping the operation fields in the original log records to standardized operation identifiers; for example, "open_file" and "openDoc" are all grouped as "open". Next, the triggering order of the operation actions is extracted for each path, and the trigger times are sorted in ascending order to ensure that the operation actions are arranged in chronological order. Then, the nested fields within each path segment are read to obtain the names of the permission verification node and file processing node. If the permission node field has multiple nested levels, the permission identifier of each level is extracted sequentially. To ensure completeness, the complete identifiers of processing nodes such as read / write caches and file lock operations must also be extracted. For example, if the node sequence "open→auth_check→read→buffer_write→close" is detected in a path segment, it is recorded as the operation "open", the permission node "auth_check", the processing node "buffer_write", the operation "read", and "close" in sequence. Then, all the above node names are concatenated according to the order in which the operation actions are triggered. The connection order is entirely based on the timestamp field from earliest to latest and the original order must not be changed. Finally, a complete sequence of access action nodes is obtained. For example, in the example above, the generated sequence is [open, auth_check, read, buffer_write, close]. Each path corresponds to a sequence, and the content of the sequence is obtained by traversing the node fields and concatenating the node names.
[0037] S502: Call the preceding and following processing tag data in the access action node sequence list and file permission processing sequence mapping table, detect the sequence tag position of each permission node and processing node in the sequence list, and adjust the node arrangement direction uniformly according to the tag content to form a node sequence set with consistent order, and generate an access path sequence mapping set. The process involves mapping the access action node sequence to the file permission processing order using pre- and post-processing label data. First, it reads the list of node names and their corresponding position indices for each sequence. Then, it retrieves the processing label for each node from the mapping table, with the label value being either "preceding" or "postponing". A one-to-one correspondence table is built between the processing labels and node positions. Next, the processing labels of all nodes in the sequence are compared. If there is a mismatch between the node position order and the label type (e.g., a preceding label node is placed after a postponing label node), its position in the sequence needs to be adjusted. The adjustment rule is to move the preceding label node before all postponing nodes, maintaining the original order among preceding nodes. Similarly, the relative order of postponing nodes remains unchanged, only reordering them between the two main categories. For example, if the original sequence of a sequence is [auth_check(postponed), open(preceding), read(preceding), write(postponed)], the adjusted sequence should be [open, read, auth_check, ...]. [write] When sorting, it is necessary to call the label data and cluster based on the node labels. First, sort the front group and then concatenate the back group to finally form a node sequence with consistent order. Record the processed node sequence as the adjusted sequence. Each original string and its adjusted sequence constitute a mapping entry. After repeating the processing of all path strings, summarize all adjustment results to generate an access path order mapping set.
[0038] S503: Based on the node distribution status of each sequence in the access path sequence mapping set, extract the permission verification segment and file operation segment in each access path and classify them into the same access structure. Aggregate the paths according to the access initiator identifier, summarize and output all the collected access structures in a unified manner, and generate a file intelligent management execution list. Based on the node distribution status of each sequence in the access path sequence mapping set, the permission verification segment and file operation segment in each node sequence are first partitioned and labeled. The judgment criteria are set as follows: nodes with keywords such as auth, verify, and check in their names are classified as permission verification segments, and nodes with keywords such as open, read, write, and close in their names are classified as file operation segments. All nodes are classified and labeled accordingly. Then, the node sequence of each path is segmented, and the previously classified permission nodes and operation nodes are extracted to form two sub-sequences. The two are included in the same access structure record. The access initiator identifier is used as the aggregation basis. The access structures of the same visitor are combined and stored to form a structure mapping group with the visitor as the key. For example, if user A has three paths, each corresponding to a different permission and operation segment combination, then these three sub-sequences are combined under user A's name. This ensures that the original path source number and time order are preserved during the aggregation process, avoiding the loss or duplication of node information. Finally, the structure groups of all visitors are output centrally to generate a file intelligent management execution list.
[0039] A file intelligent management system based on microservices and cloud-native architecture, the system includes: The access trajectory collection module obtains the access initiator identifier, file storage location address and permission number from the microservice logs, sorts the permission numbers in ascending order by timestamp and removes duplicates, and combines the processed permission order with the access identifier to generate a list of file access paths. The centralized permission statistics module counts the frequency of each permission number and its path index position based on the file access path list, calculates the weighted value of the two and sorts them, extracts the permission number sequence from the sorted structure, and generates a file permission check sorted list. The sequence mapping module calls the file permission check sorting list, divides the permissions into preceding and following permissions according to their positions in the sequence, establishes a mapping relationship, and generates a file permission processing sequence mapping table. The path coherence construction module, based on the file access path list, compares the operation order in consecutive paths under the same access initiator, classifies the frequently occurring operation structure combinations, organizes them into consecutive access sequences, and generates a set of file access continuation paths. The intelligent execution list module, based on the set of file access continuation paths, calls the file permission processing order mapping table, inserts the permission processing order into the file operation structure, integrates the path order by initiator, and generates an intelligent file management execution list.
[0040] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for intelligent management of files based on microservices and cloud native architecture, characterized in that, Comprise the following steps: S1: access records generated in the microservice environment are obtained, the access initiator and target file location identifier are extracted, the time sequence of the permission links appearing in the same access is sorted, the continuous path trajectory is established after excluding duplicates, and a file access path list is generated; S2: based on the file access path list, the number of times each permission check link appears in the path is counted, the average position of each permission check link in the path is recorded, the cumulative frequency and the average position order are sorted, and a file permission check sorting list is generated; S3: According to the file permission check sorting list, set the sorting limit to divide the front links into access pre-processing, and divide the rest into access delay processing, mark the processing position and sequence label, and generate a file permission processing sequence mapping table; S4: Call the file access path list, compare the access paths of the same initiator, sort the sequence of file opening, reading and modifying, and screen out repeated structure paths for combined processing to generate a file access continuation path set.
2. The method for intelligent management of files based on microservices and cloud native architecture according to claim 1, characterized in that: The file access path list includes access initiator identification information, file storage location identification information, permission check node sequence, access behavior time label, the file permission check sorting list includes permission node frequency value, node sequence position information, node weight score, and permission set sorting result, the file permission processing sequence mapping table includes pre-processing node identifier, delay processing node identifier, processing sequence correspondence relationship, and processing interval division result, and the file access continuation path set includes continuous access behavior sequence, repeated path connection mode, operation behavior connection structure and path stability characteristics. 3.The method of claim 1, wherein, The S1 acquisition step is: S101: Obtain the continuously generated file access data frame in the microservice environment, and extract the access initiator identification, access trigger timestamp and file storage location identification from the data frame, call the access trigger timestamp as the sequence reference, combine the corresponding relationship between the access initiator identification and the file storage location identification, and separate multiple groups of continuous access actions in the data frame to generate a file access action sequence set; S102: Based on each group of data frames in the file access action sequence set, call the permission check identifier and execution time parameter contained in the permission check field, linearly arrange the permission check identifier according to the sequence of the execution time parameter, and organize each permission identifier node in time sequence to generate a permission check time sequence chain group; S103: According to the permission identifier combination contained in each time sequence chain in the permission check time sequence chain group, remove the repeated permission node combination in different access actions, retain the unique combination structure, and concatenate the remaining permission identifier sequence to form a directed path topology to generate a file access path list.
4. The file intelligent management method based on microservice and cloud native architecture according to claim 3, characterized in that: The process of obtaining the continuously generated file access data frame in the microservice environment is limited to only processing the file access data frame whose frequency of occurrence in a unit time interval exceeds a set judgment reference; In the process of extracting the access trigger time stamp as a sequence reference and combining the access initiator identification with the corresponding relationship of the file storage location identification, only the access actions that meet the access trigger time stamp continuity requirement are reserved for generating the file access action sequence set; In the process of organizing the permission identification nodes in chronological order, a sequential continuity restriction is imposed on the arrangement relationship between the permission verification identifications to ensure that the permission identification nodes in the generated permission verification timing chain group have relevance; In the process of concatenating the remaining permission identifications to form a directed path topology, a topology path integrity rule is used to filter the remaining permission identification combination structure. 5.The method of claim 1, wherein, The obtaining step S2 comprises: S201: Based on the file access path list, the permission verification node identification appearing in each access track is extracted, the frequency of the permission verification node appearing in different access tracks is detected, the frequency results are centrally organized according to the node identification consistency, and a frequency statistical form distinguished by nodes is formed, and a permission node appearance number set is generated; S202: According to the permission node appearance number set, the position index of each permission verification node in the access track in the file access path list is extracted, the node frequency result is called as a weight reference, the position index and the corresponding weight are weighted and synthesized, the corresponding order weight expression of each permission verification node is output, and a node order weight value set is generated; S203: Based on the node order weight value set, the permission verification nodes are sequentially organized according to the size relationship between the weight expressions, and a unified permission verification order expression is formed according to the sequence result, and a file permission check sorting list is generated. 6.The method of claim 1, wherein, The obtaining step S3 comprises: S301: According to the file permission check sorting list, the relative position number of each permission verification node in the sequence is read in sequence, the distribution state of each group of numbers in the sorting range is detected, the position interval threshold is set according to the number increasing relationship, and all numbers are divided into two sets according to the interval boundary, and a permission node interval grouping set is generated; S302: The number set in the permission node interval grouping set is called, the corresponding permission node identification in the access track is matched according to the front set of the number interval, the nodes of this type are uniformly marked as access pre-processing, and the node identifications in the rear set are uniformly marked as access post-processing, and a permission node processing annotation set is generated; S303: Based on the permission node processing annotation set, the order pair combination of each pre-processing node and post-processing node in the access path is extracted, it is detected whether the node identification corresponding position has a corresponding relationship in the same track, and the node mapping index data is generated according to the detection result, and a file permission processing order mapping table is generated.
7. The method of claim 1, wherein the micro-service and cloud-native architecture-based file intelligent management method is characterized by, The obtaining step S4 comprises: S401: The file access path list is called, and for multiple continuous file operation paths associated with the same access initiator identification, the operation trigger time stamp in the path is judged according to the execution order, and the continuity of adjacent path paragraphs is judged, the operation connection state formed by the same access initiator is obtained, and an access initiator continuous path group is generated; S402: Based on the access initiator continuous path group, the file operation type identifier appearing in each path is detected, the order correlation between the read identifier, the modification identifier and the close identifier appearing in sequence is judged according to the file opening identifier as the starting node, and the operation sequence meeting the order consistency is extracted to form a sequence unit, and a file operation order sequence set is generated; S403: According to the file operation order sequence set, the operation sequence unit repeatedly appearing in different access paths is judged for consistency, and the consistent sequence is uniformly numbered and associated, the coherent relationship between paths is expressed, and a file access continuation path set is generated. 8.The method of claim 1, wherein, The method further comprises: S5: According to the file access continuation path set, combining the before and after processing structure in the file permission processing order mapping table, the operation steps required for current access are sequentially arranged and merged to generate a file intelligent management execution list; The file intelligent management execution list includes access path combination structure, permission check execution order, file processing action arrangement, and execution strategy mapping rule. 9.The method of claim 8, wherein, The acquisition step S5 is: S501: According to the file access continuation path set, the corresponding file operation action and access initiator identifier are extracted in sequence, and the permission check node and file processing node embedded in the access behavior are extracted from the path segment, and all node names are spliced in the order of action triggering to generate an access action node order sequence; S502: The access action node order sequence and the before and after processing label data in the file permission processing order mapping table are called, the order label position corresponding to each permission node and processing node in the sequence is detected, and the node arrangement direction is uniformly adjusted according to the label content to form a sequence consistent node sequence set, and an access path order mapping set is generated; S503: Based on the node distribution state of each sequence in the access path order mapping set, the permission check segment and the file operation segment in each access path are extracted and attributed to the same access structure, the paths are aggregated according to the access initiator identifier, and all the aggregated access structures are uniformly summarized and output to generate a file intelligent management execution list.
10. A file intelligent management system based on microservices and cloud native architecture, characterized in that, The system is used for the file intelligent management method based on microservice and cloud native architecture in any one of claims 1-9, and the system comprises: An access trajectory acquisition module acquires the access initiator identifier code, the file storage location address and the permission number in the microservice log, arranges the permission numbers in ascending order according to the timestamp and removes the duplicates, combines the processed permission order and the access identifier, and generates a file access path list; A permission set statistical module, according to the file access path list, counts the number of times each permission number appears and the path index position, calculates the weighted value and sorts them, extracts the permission number sequence in the sorted structure, and generates a file permission check sorting list; A processing order mapping module calls the file permission check sorting list, divides the front and late permission numbers according to their positions in the sequence, and establishes a mapping relationship, and generates a file permission processing order mapping table; The file intelligent management execution list includes access path combination structure, permission check execution order, file processing action arrangement, and execution strategy mapping rule. The acquisition step S5 is: S501: According to the file access continuation path set, the corresponding file operation action and access initiator identifier are extracted in sequence, and the permission check node and file processing node embedded in the access behavior are extracted from the path segment, and all node names are spliced in the order of action triggering to generate an access action node order sequence; S502: The access action node order sequence and the before and after processing label data in the file permission processing order mapping table are called, the order label position corresponding to each permission node and processing node in the sequence is detected, and the node arrangement direction is uniformly adjusted according to the label content to form a sequence consistent node sequence set, and an access path order mapping set is generated; S503: Based on the node distribution state of each sequence in the access path order mapping set, the permission check segment and the file operation segment in each access path are extracted and attributed to the same access structure, the paths are aggregated according to the access initiator identifier, and all the aggregated access structures are uniformly summarized and output to generate a file intelligent management execution list. A path coherence construction module, based on the file access path list, compares the operation sequence in the continuous path under the same access initiator, classifies the frequently occurring operation structure combination, arranges the continuous access sequence, and generates a file access continuation path set; An intelligent execution list module, according to the file access continuation path set, calls a file permission processing sequence mapping table, inserts the permission processing sequence into the file operation structure, groups and integrates the path sequence according to the initiator, and generates a file intelligent management execution list.
Citation Information
Patent Citations
High-speed distributed storage system and method
CN121209780A
File server, file management system and file management method
EP2216711A2
Masterless backup and restore of files with multiple hard links
US20200250141A1