An enterprise-level image and document management method, medium and system based on dynamic permission control
By constructing a virtual node permission matrix and a cache dynamic residency vector, and combining a game theory model and an image semantic understanding model, the problem of unreasonable cache resource allocation in enterprise-level image and document management systems was solved, achieving efficient image content retrieval and load balancing, and improving system performance and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING NANCAL RUIYUAN DIGITAL TECH CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-28
AI Technical Summary
Enterprise-level image and document management systems suffer from unreasonable cache resource allocation in multi-user concurrent access scenarios, resulting in low cache hit rate and low retrieval efficiency, making it impossible to effectively process image content. Furthermore, they lack load balancing mechanisms in distributed storage environments.
By constructing a virtual node permission matrix and a cache dynamic residency vector, establishing a cache cross-index matrix and a storage slice allocation vector, and using a game theory model to optimize the cache allocation strategy, combined with an image semantic understanding model and a distributed lock algorithm, dynamic permission control and load balancing are achieved.
It significantly improves the caching efficiency and retrieval performance of the system in multi-user concurrent access scenarios, solves the problem of unreasonable allocation of cache resources, and improves the retrieval accuracy of image content and the high availability of the system.
Smart Images

Figure CN121434113B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image and document technology, and more specifically, relates to an enterprise-level image and document management method, medium, and system based on dynamic access control. Background Technology
[0002] Enterprise-level image and document management systems, as core infrastructure of modern information-based office work, traditionally employ static access control mechanisms combined with fixed caching strategies to achieve document storage and retrieval functions. Access control is achieved through pre-defined user role permission tables, and classic cache replacement algorithms such as LRU or LFU manage memory resources. Document search is implemented using keyword indexing and metadata retrieval. However, traditional technologies exhibit significant shortcomings when facing large-scale enterprise applications. Static access control cannot adapt to dynamic changes in user access patterns, fixed caching strategies struggle to optimize resource allocation based on actual access frequency and document importance, single text retrieval methods cannot effectively handle complex documents with rich image content, and the lack of a unified load balancing mechanism in distributed storage environments leads to uneven load distribution across storage nodes. In existing technologies, due to the lack of dynamic access control mechanisms and intelligent cache allocation strategies, when multiple users concurrently access image and document files, the system cannot dynamically optimize cache resource allocation based on user access frequency, document importance, and system load status, resulting in low cache hit rates. Simultaneously, retrieval operations cannot fully utilize image semantic information, leading to low retrieval efficiency and a poor user experience. In other words, existing technologies have a technical problem with the unreasonable allocation of cache resources in enterprise-level document management systems under multi-user concurrent access scenarios. Summary of the Invention
[0003] In view of this, the present invention provides an enterprise-level image and document management method, medium and system based on dynamic permission control, which can solve the technical problem of unreasonable allocation of cache resources in the existing enterprise-level image and document management system under multi-user concurrent access scenarios.
[0004] The present invention is implemented as follows: The first aspect of the present invention provides an enterprise-level image and document management method based on dynamic access control, including constructing a virtual node permission matrix and a cache dynamic residency vector; mathematically mapping user identity identifiers to permission levels to form a two-dimensional permission matrix structure; calculating residency time weights based on image and document access frequency data and document size information to generate a one-dimensional time vector; establishing an access verification system and a cache management mechanism; establishing a cache cross-index matrix, a storage slice allocation vector, and a storage block management matrix; collecting user access frequency data, document size information, system load parameters, and network latency indicators; optimizing cache allocation strategies based on a game theory model; constructing an upper-layer model aimed at maximizing cache hit rate and a lower-layer model aimed at minimizing storage cost; calculating an image and document similarity matrix through vector operations; using a pre-trained image semantic understanding model to perform multi-level interpretation of image content in image and document documents; implementing distributed storage and retrieval operations; monitoring system load status; and controlling resource access based on a distributed lock algorithm.
[0005] The virtual node permission matrix is a two-dimensional matrix structure formed by mathematically mapping user identity identifiers to permission levels. It is used to quickly verify user access permissions to graphs and documents.
[0006] The cache dynamic residency vector is a one-dimensional vector calculated based on graph document access frequency data, document size information, and system load parameters. It is used to dynamically adjust the retention time of each graph document in the cache.
[0007] Among them, the cache cross-index matrix is a matrix structure that establishes a relationship between image and document metadata information and multi-level cache locations, enabling fast location and verification of cached data.
[0008] The storage slice allocation vector is an allocation strategy vector calculated based on the graph document type, document size information, and storage node load. It is used to guide the slicing and storage of graph documents in the distributed storage system.
[0009] The storage block management matrix is a management structure matrix formed by dividing the content of the graph and document into blocks of fixed size, and is used to realize the block storage and parallel processing of graph and document.
[0010] Furthermore, it also includes a data acquisition module, which is a functional component responsible for collecting system operation status information in real time. The collected user access frequency data is used for cache dynamic residence period vector calculation, and the document size information is used for storage slice allocation vector generation.
[0011] Furthermore, it also includes a strategy of using a cache allocation optimization function instead of a game model for cache allocation optimization. The cache allocation optimization function takes into account user access frequency data, document size information, available cache capacity, network bandwidth limitations, and storage cost coefficients, and outputs the optimal cache allocation scheme.
[0012] The upper-level model aims to maximize the cache hit rate, and the objective function is the product of the cache hit rate and the user access frequency data minus the network latency penalty term.
[0013] The lower-level model aims to minimize storage costs, and the objective function is the product of the storage cost coefficient and the storage space usage plus the square root of the data migration cost.
[0014] Among them, the graph document feature vector is a multi-dimensional vector composed of key feature information extracted from the graph document, which includes document content, structure and metadata feature information.
[0015] The cosine similarity algorithm is a mathematical method for calculating the cosine value of the angle between the feature vectors of two graph documents, and outputs the correlation value for constructing the document clustering index matrix.
[0016] Among them, the image semantic understanding model is a deep learning model built on convolutional neural networks and the Transformer architecture, used to automatically identify and interpret image content in graph documents.
[0017] The real-time data processing mechanism is a continuous data processing system based on the Apache Storm streaming computing framework, which uses an event-driven processing model to perform real-time analysis of access request data streams.
[0018] Among them, the matrix rank deficit detection algorithm is a mathematical method that uses the singular value decomposition of the memory allocation vector to determine whether the matrix rank meets the expected requirements.
[0019] Among them, the distributed lock algorithm is a resource mutual exclusion access control mechanism based on the Raft consensus protocol, which ensures data consistency in a distributed environment through lease mechanism and heartbeat detection.
[0020] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described enterprise-level document management method based on dynamic access control.
[0021] A third aspect of the present invention provides an enterprise-level document management system based on dynamic access control, comprising the aforementioned computer-readable storage medium. The system is any one of a computer, a server, or a microcontroller. The computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0022] This invention provides a technical solution by constructing a virtual node permission matrix and a cache dynamic residency vector, establishing a cache cross-index matrix and storage slice allocation vector management mechanism, optimizing cache allocation strategies using a game theory model, achieving integrated image and text retrieval using an image semantic understanding model, and implementing dynamic resource scheduling by combining distributed lock algorithms and load balancing mechanisms. This invention overcomes the limitations of static permission management through a dynamic permission control mechanism, addresses the unreasonable resource allocation problem of traditional fixed caching strategies through game theory model-optimized cache allocation strategies, overcomes the inability of traditional text retrieval to effectively handle image content through image semantic understanding and feature vector fusion technology, and solves the system performance bottleneck problem under multi-user concurrent access through real-time load monitoring and distributed lock control mechanisms. By establishing an upper-level model aimed at maximizing cache hit rate and a lower-level model aimed at minimizing storage cost, this invention achieves intelligent allocation and dynamic optimization of cache resources. Simultaneously, by combining image semantic understanding technology to construct a comprehensive retrieval index, it significantly improves the system's caching efficiency and retrieval performance in multi-user concurrent access scenarios, solving the technical problem of unreasonable cache resource allocation in existing technologies. Attached Figure Description
[0023] Figure 1 This is a flowchart of the method of the present invention.
[0024] Figure 2 This is a schematic diagram of the structure of the image semantic understanding model involved in the present invention.
[0025] Figure 3 This is a dynamic change graph of cache hit rate in Example 2.
[0026] Figure 4 This is a diagram showing the effect of cache adjustment during high-load periods in Example 2.
[0027] Figure 5 This is a diagram showing the change in storage capacity during the data migration process in Example 2. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0029] like Figure 1The diagram shown is a flowchart of an enterprise-level document management method based on dynamic access control provided by the first aspect of the present invention. This method includes the following steps:
[0030] S01. Construct a virtual node permission matrix and a cache dynamic residence period vector. Mathematically map user identity identifiers and permission levels to form a two-dimensional permission matrix structure. Calculate residence time weights based on graph and document access frequency data and document size information and generate a one-dimensional time vector. Establish a permission verification system and cache management mechanism.
[0031] S02. Establish a cache cross-index matrix, storage shard allocation vector, and storage block management matrix. Associate and map graph and document metadata information with multi-level cache locations. Calculate the sharding strategy and generate allocation vectors based on graph and document type and document size information. Use consistent hashing algorithm to allocate storage nodes and establish a block index relationship table to achieve block storage.
[0032] S03. Collect user access frequency data, document size information, system load parameters and network latency indicators, obtain real-time system status information through the data acquisition module, and establish a system performance monitoring database to store historical operating data.
[0033] S04. Optimize cache allocation strategy based on game theory model, construct upper-level model with the goal of maximizing cache hit rate and lower-level model with the goal of minimizing storage cost, and calculate the optimal cache configuration scheme through cache allocation optimization function;
[0034] S05. Calculate the image-document similarity matrix through vector operations, extract the image-document feature vectors and perform standardization processing, use the cosine similarity algorithm to calculate the correlation values between documents, and establish a document clustering index matrix to optimize the retrieval path.
[0035] S06. Use a pre-trained image semantic understanding model to perform multi-level interpretation of the image content in the image document, extract image feature vectors and generate semantic tags, establish an image content index table, and fuse the image interpretation results with the text content to generate a comprehensive retrieval index.
[0036] S07. Implement distributed storage and retrieval operations, use the MapReduce framework to achieve parallel processing, reduce query overhead through the Bloom filter pre-screening mechanism, build an inverted index to improve retrieval efficiency, and perform sliding window analysis on the continuous access request data stream based on the real-time data processing mechanism of streaming computing.
[0037] S08. Monitor the system load status. When the number of concurrent user accesses exceeds the preset threshold of 1000, adjust the weight factor of the corresponding document in the cache dynamic residence period vector and use the matrix rank deficit detection algorithm to monitor the storage slice allocation vector status.
[0038] S09. Based on the distributed lock algorithm, resource access is controlled. When the load rate of a single storage chip is in the range of [0.85, 1.0], the storage chip rebalancing mechanism is triggered. When a rank deficit is detected in the storage chip allocation vector, the load balancing vector is automatically supplemented to restore the full rank characteristic of the matrix. The storage chip allocation vector is recalculated and the data migration operation is performed.
[0039] The virtual node permission matrix is a two-dimensional matrix structure formed by mathematically mapping user identity identifiers to permission levels. It is used to quickly verify user access permissions to graphs and documents.
[0040] The cache dynamic residency vector is a one-dimensional vector calculated based on factors such as graph document access frequency data, document size information, and system load parameters. It is used to dynamically adjust the retention time of each graph document in the cache.
[0041] Among them, the cache cross-index matrix is a matrix structure that establishes a relationship between image and document metadata information and multi-level cache locations, enabling fast location and verification of cached data.
[0042] The storage slice allocation vector is an allocation strategy vector calculated based on the graph document type, document size information, and storage node load. It is used to guide the slicing and storage of graph documents in the distributed storage system.
[0043] The storage block management matrix is a management structure matrix formed by dividing the content of the graph and document into blocks of fixed size, and is used to realize the block storage and parallel processing of graph and document.
[0044] Among them, the data acquisition module is a functional component responsible for collecting system operation status information in real time. The collected user access frequency data is used for cache dynamic residence period vector calculation, document size information is used for storage slice allocation vector generation, system load parameters are used for game model optimization, and network latency indicators are used for performance monitoring and evaluation.
[0045] Among them, the system performance monitoring database is a data storage system that stores and manages historical data on the system's operating status, providing historical data support and decision-making basis for cache allocation optimization functions.
[0046] The cache allocation optimization function is used to calculate the optimal cache resource configuration scheme. The inputs include user access frequency data, document size information, available cache capacity, network bandwidth limit and storage cost coefficient. The output is the optimal cache allocation scheme to guide the adjustment of the cache dynamic residence period vector.
[0047] The upper-level model aims to maximize the cache hit rate. The objective function is the product of the cache hit rate and the user access frequency data minus the network latency penalty term. The constraints are the available cache capacity limit and the user permission level constraint.
[0048] The lower-level model aims to minimize storage costs. The objective function is the product of the storage cost coefficient and the storage space usage, plus the square root of the data migration cost. The constraints are storage capacity limitations and data consistency requirements.
[0049] Among them, the coupling term is a shared variable connecting the upper-level model and the lower-level model, representing the impact of cache space allocation on storage cost. The value is obtained by the inner product of the cache dynamic residency vector and the storage slice allocation vector.
[0050] Among them, the graph document feature vector is a multi-dimensional vector composed of key feature information extracted from graph documents. It contains feature information such as document content, structure and metadata, and is used for similarity matrix calculation.
[0051] The image-document similarity matrix is a symmetric matrix formed by calculating the similarity between the feature vectors of images and documents. It is used to quickly locate related documents and optimize retrieval efficiency.
[0052] The cosine similarity algorithm is a mathematical method for calculating the cosine value of the angle between the feature vectors of two graph documents, and outputs the correlation value for constructing the document clustering index matrix.
[0053] The document clustering index matrix is a classification index structure built based on relevance values and similarity matrices. It uses clustering algorithms to group similar documents to improve retrieval efficiency.
[0054] like Figure 2 As shown, the image semantic understanding model is a deep learning model built on a convolutional neural network architecture. It is used to automatically identify and interpret the image content in image documents and output image feature vectors and semantic labels for retrieval index construction.
[0055] Among them, the image feature vector is a high-dimensional numerical representation extracted from the image, which contains information such as the image's visual features, semantic features, and structural features, and is fused with the document feature vector to form a comprehensive feature representation.
[0056] Semantic tags are textual descriptions of image content, including semantic information at multiple levels such as object recognition, scene description, and relationship annotation, which are used to construct a comprehensive retrieval index.
[0057] The image content index table is a data structure that maps image feature vectors and semantic tags to image document location information, and is used to quickly retrieve documents containing specified image content.
[0058] The comprehensive search index is a unified search data structure that integrates image interpretation results with text content, supporting integrated image and text search operations.
[0059] The real-time data processing mechanism is a continuous data processing system based on the Apache Storm streaming computing framework, which uses an event-driven processing model to perform real-time analysis of access request data streams.
[0060] Sliding window analysis is a technique that segments a continuous stream of access request data according to time intervals. Each window contains a fixed number of access request records for load statistical analysis.
[0061] The preset threshold is a critical value of 1000 determined based on statistical analysis of historical access data in the system performance test and system performance monitoring database. It is used to trigger the cache dynamic residency vector adjustment mechanism.
[0062] The weighting factor is a numerical parameter used in the adaptive cache replacement algorithm to balance the LRU and LFU strategies. It is dynamically adjusted based on the sliding window analysis results to optimize the cache hit rate.
[0063] Among them, the matrix rank deficit detection algorithm is a mathematical method that uses the singular value decomposition of the memory allocation vector to determine whether the matrix rank meets the expected requirements. When the matrix rank is less than the theoretical value, it indicates that there are linearly dependent components.
[0064] The load balancing vector is a balanced distribution vector calculated based on the system load parameters and capacity information of each storage node, used to guide the redistribution of data among storage nodes.
[0065] Among them, the distributed lock algorithm is a resource mutual exclusion access control mechanism based on the Raft consensus protocol, which ensures data consistency in a distributed environment through lease mechanism and heartbeat detection.
[0066] Among them, the storage chip rebalancing mechanism is a data redistribution process that is automatically triggered when the storage nodes are unbalanced. It achieves load balancing by calculating the differences in system load parameters of each storage node.
[0067] The data migration operation is the process of transferring some graph documents from high-load storage nodes to low-load storage nodes, reducing the impact on system performance through asynchronous processing mechanisms.
[0068] The image semantic understanding model is structured as a multi-stage feature extraction network, which includes convolutional layers, pooling layers, multi-head attention mechanisms, and fully connected classification layers. The number of heads in the multi-head attention mechanism is determined by the dimension of the cache dynamic residence period vector, the standard deviation of user access frequency data, and the mean of system load parameters. The calculation formula is: the number of attention heads equals the square root of the dimension of the cache dynamic residence period vector multiplied by the standard deviation of user access frequency data and then divided by the mean of system load parameters.
[0069] The steps for establishing the training dataset for the image semantic understanding model include collecting enterprise-level image document samples, manually annotating the image content to generate multi-level semantic labels, classifying the images according to type and complexity, establishing a database of correspondence between image feature vectors and semantic labels, expanding the number of training samples through data augmentation techniques, and forming a complete training dataset containing image samples, feature labels, and semantic descriptions.
[0070] The steps for training the image semantic understanding model include initializing network weight parameters, optimizing parameters using the stochastic gradient descent algorithm, setting a learning rate decay strategy to control the training process, evaluating model performance using cross-validation, using an early stopping mechanism to prevent overfitting, and saving the trained model parameter weight file to obtain a pre-trained model for image semantic understanding.
[0071] The specific implementation methods of the above steps are described in detail below.
[0072] The specific implementation of step S01 involves first initializing the user identity database, classifying internal user roles into three levels: management, business, and operational, and assigning each user a unique identity code. Next, a virtual node permission matrix is constructed, using a matrix mapping algorithm to mathematically map user identities to permission levels. Permission levels are divided into four categories: read, write, modify, and delete, corresponding to values 1 to 4 respectively, forming... A two-dimensional permission matrix structure is constructed, where m represents the number of users and n represents the number of permission types. Then, historical access frequency data for graphs and documents is collected, counting the number of times each document has been accessed in the past 30 days, and obtaining document size information including file size in bytes and number of pages. A weighted average algorithm is used to calculate the dwell time weight, combining access frequency, document size, and user priority in a 4:3:3 weight ratio to generate a one-dimensional time vector. Finally, a permission verification system is established, using a hash table data structure for fast permission lookup, and a cache management mechanism employing the Least Recently Used (LRU) algorithm for cache replacement. The purpose of this step is to establish a complete user permission control framework and cache time control mechanism, providing a foundation for security and performance optimization for subsequent graph and document storage and retrieval.
[0073] The specific implementation of step S02 involves establishing a cache cross-index matrix. A multi-dimensional hash algorithm is used to map graph and document metadata information, including document name, creation time, and file type, to multi-level cache locations. The cache levels are divided into three levels: memory cache, solid-state drive cache, and hard disk drive cache, forming a cross-referenced matrix structure. Next, a storage shard allocation vector is constructed. Documents are categorized into three types based on their graph and document type: text-intensive, image-intensive, and hybrid. A linear programming algorithm is used to calculate the optimal sharding strategy, combined with document size information, generating an allocation vector containing shard size and distribution location. The size of a single shard is set between 64MB and 256MB. Then, a consistent hash algorithm is used to allocate storage nodes, setting the number of virtual nodes to 150 times the number of actual physical nodes to ensure load balancing and fault tolerance. Finally, a storage block management matrix is established, dividing the graph and document content into blocks of fixed size (4MB). A block indexing algorithm is used to establish a mapping table between blocks and documents, enabling block storage and parallel access. The purpose of this step is to construct a distributed storage architecture, improving system storage efficiency and access performance through multi-level caching and shard storage.
[0074] The specific implementation of step S03 involves deploying a data acquisition module and using an event-driven data collection mechanism to acquire system operating status information in real time. First, user access frequency data is collected. An access log parsing algorithm is used to count the number of times each user accesses different image documents per unit time, with a sampling frequency set to 10 times per second. Next, document size information is collected, using a file system monitoring interface to obtain attribute information such as document byte size, number of pages, and number of images. Then, system load parameters are monitored, including CPU utilization, memory usage, disk I / O throughput, and network bandwidth utilization, with data collected every 5 seconds via a system call interface. Simultaneously, network latency is measured, using a network probing algorithm to test the round-trip latency from the client to the server, with a timeout threshold set to 500ms. Finally, a system performance monitoring database is established, using a time-series database to store historical operating data, with a data retention period of 90 days, providing data support for subsequent performance analysis and optimization decisions. The purpose of this step is to establish comprehensive system status awareness capabilities, providing a real-time data foundation for dynamic optimization strategies.
[0075] The specific implementation of step S04 involves constructing a two-layer optimization model based on game theory to optimize the cache allocation strategy. First, an upper-layer model is established with the objective of maximizing the cache hit rate. The objective function includes a product term of the cache hit rate and user access frequency data, and a penalty term for network latency. Constraints include available cache capacity limits and user permission level constraints. Next, a lower-layer model is constructed with the objective of minimizing storage costs. The objective function includes a product term of the storage cost coefficient and storage space usage, and a square root term for data migration costs. Constraints include storage capacity limits and data consistency requirements. Then, a coupling term is established to connect the upper and lower-layer models. The impact of cache space allocation on storage costs is calculated through the inner product operation of the cache dynamic residency vector and the storage slice allocation vector. An iterative optimization algorithm is used to solve the two-layer optimization problem, and the constraints are handled using the Lagrange multiplier method. The convergence accuracy is set to [value missing]. The maximum number of iterations is 1000. Finally, the optimal cache configuration scheme is output, including the cache allocation ratio and cache residency time for various document types, to guide the adjustment of the cache dynamic residency vector. The purpose of this step is to establish a scientific cache resource allocation mechanism that minimizes storage costs while ensuring a high cache hit rate.
[0076] The specific implementation of step S05 involves extracting image-document feature vectors and calculating similarity. First, multi-dimensional feature information is extracted from the image-document pair, including document content features such as keyword frequency, document length, and number of images; structural features such as number of paragraphs, heading levels, and number of tables; and metadata features such as creation time, modification time, and file format. Next, the extracted feature vectors are standardized using a zero-mean unit variance standardization algorithm to map each feature value to the same numerical range, eliminating dimensional differences between different features. Then, a cosine similarity algorithm is used to calculate the correlation between documents, measuring document similarity by calculating the cosine of the angle between two feature vectors, with a similarity value range of 0 to 1. Based on the similarity calculation results, an image-document similarity matrix is constructed, using a symmetric matrix storage structure to reduce storage space usage. Finally, a K-means clustering algorithm is used to group similar documents, with the number of clusters adaptively determined based on the total number of documents and the similarity distribution. A document clustering index matrix is established to optimize the retrieval path, redirecting retrieval requests for similar documents to the same storage area. The purpose of this step is to establish relationships between documents and improve retrieval efficiency and system response speed through clustering indexing.
[0077] The specific implementation of step S06 involves using a pre-trained deep learning model to perform semantic understanding of the image content in the document. First, a pre-trained image semantic understanding model is loaded. This model employs a hybrid architecture of convolutional neural networks and Transformers, comprising three main components: a feature extraction layer, a semantic understanding layer, and a label generation layer. Next, the image is pre-processed, with the image size uniformly adjusted to 224×224 pixels, and a normalization algorithm mapping pixel values to the range of 0 to 1. Then, image feature vectors are extracted through the model's forward propagation process. These feature vectors have a 512-dimensional dimension and contain visual, semantic, and structural features of the image. Simultaneously, multi-level semantic labels are generated, including object recognition labels such as people, buildings, and vehicles; scene description labels such as offices, meeting rooms, and outdoors; and relationship labeling labels such as inclusion relationships and spatial relationships. Next, an image content index table is established, using an inverted index structure to map image feature vectors and semantic labels to document location information, supporting fast retrieval based on image content. Finally, the image interpretation results are fused with the text content, and a feature fusion algorithm is used to generate a comprehensive retrieval index, achieving integrated image and text retrieval functionality. The purpose of this step is to achieve a deep understanding and semantic annotation of image content, expand the search dimensions, and improve search accuracy.
[0078] The specific implementation of step S07 involves implementing distributed storage and retrieval operations. First, the MapReduce distributed computing framework is used to achieve parallel processing, decomposing the retrieval task into a Map phase and a Reduce phase. The Map phase executes local searches in parallel on each storage node, while the Reduce phase aggregates the search results from each node. Next, a Bloom filter is deployed as a pre-screening mechanism, setting the false positive probability to 1%. Multiple hash functions are used to determine whether the query keywords are likely to exist in a document, reducing unnecessary disk access overhead. Then, an inverted index is built to improve retrieval efficiency, employing a word-to-document mapping structure and recording the frequency and location information of each index entry, achieving an index compression rate of over 70%. Next, a real-time data processing mechanism is implemented based on the Apache Storm streaming computing framework, using an event-driven processing model to analyze the continuous access request data stream. Finally, a sliding window analysis technique is used, setting the window size to 1000 access requests and the window sliding interval to 100 requests. Statistical analysis of the access patterns within each window is performed to identify hot documents and access trends. The purpose of this step is to establish an efficient distributed retrieval architecture, improving retrieval performance and system throughput through parallel processing and intelligent pre-screening.
[0079] The specific implementation of step S08 involves monitoring the system load status and making dynamic adjustments. First, a concurrent access monitoring mechanism is set up to count the number of users accessing the system simultaneously in real time. When the concurrent access volume exceeds a preset threshold of 1000, a load adjustment process is triggered. Next, the weight factors of the corresponding documents in the cache dynamic residency vector are adjusted. An adaptive weight adjustment algorithm dynamically modifies the priority of documents in the cache based on the current load, increasing the weight factor of frequently accessed documents by 20% to 50%. Then, a singular value decomposition algorithm is used to monitor the storage slice allocation vector status. The rank of the matrix is calculated to detect the existence of linearly dependent components. When the matrix rank is less than 90% of the theoretical full rank, it is determined to be a rank-deficient state. Simultaneously, the load rate of each storage node is monitored, including indicators such as CPU utilization, memory usage, and disk I / O utilization. The load rate monitoring threshold is set to 85%. Finally, a load warning mechanism is established. When the overall system load rate exceeds 80%, a warning message is sent; when it exceeds 95%, an emergency load transfer process is initiated. The purpose of this step is to establish a proactive load monitoring and adjustment mechanism to ensure the stability and responsiveness of the system under high concurrency access conditions.
[0080] The specific implementation of step S09 is based on a distributed lock algorithm to control resource access and achieve load balancing. First, the Raft consensus protocol is used to implement the distributed lock algorithm. Leader election and log replication mechanisms ensure data consistency in the distributed environment, with a heartbeat interval of 150ms and an election timeout of 1000ms. Next, the storage segment load rate is monitored. When the load rate of a single storage segment enters the range of 85% to 100%, a storage segment rebalancing mechanism is triggered to reduce the pressure on high-load nodes through load transfer. Then, the rank deficit status of the storage segment allocation vector is detected. When insufficient matrix rank is detected, the load balancing vector is automatically calculated, and the least squares method is used to solve the linear equation system to obtain the optimal load distribution scheme. Next, a load balancing vector supplementation operation is performed, weighting and fusing the calculated balancing vector with the original allocation vector to restore the full-rank characteristic of the matrix. The weight ratio is dynamically determined according to the current load situation. Then, the storage segment allocation vector is recalculated, and an integer linear programming algorithm is used to optimize the data distribution strategy to ensure load balancing across storage nodes. Finally, a data migration operation is performed, using an asynchronous migration mechanism to transfer some data from high-load nodes to low-load nodes. During the migration process, an incremental synchronization algorithm is used to ensure data consistency, and the amount of data migrated in a single step is controlled within 10% of the total data volume. The purpose of this step is to establish an automated load balancing and fault-tolerant recovery mechanism, ensuring high availability and load balancing of the distributed storage system.
[0081] It's important to explain that the image semantic understanding model employs a multi-stage feature extraction network architecture, comprising four main components: a convolutional feature extraction layer, a spatial attention layer, a multi-head attention mechanism layer, and a fully connected classification layer. The convolutional feature extraction layer uses ResNet-50 as its backbone, extracting low-level visual features of the image through multiple convolutional operations and residual connections, outputting a feature map of size 14×14×2048. The spatial attention layer uses a self-attention mechanism to weight spatial locations, highlighting key regions in the image and enhancing the model's ability to perceive important visual information. The number of attention heads in the multi-head attention mechanism layer is determined by the dimension of the cache dynamic residence period vector, the standard deviation of user access frequency data, and the mean of the system load parameters. The calculation method is: the square root of the cache dynamic residence period vector dimension multiplied by the standard deviation of user access frequency data, then divided by the mean of the system load parameters; the number of attention heads is typically between 8 and 16. The fully connected classification layer contains three fully connected layers, used for object recognition, scene classification, and relationship labeling, respectively. A Dropout mechanism is used to prevent overfitting, with a dropout rate set to 50%.
[0082] Optionally, the multi-level semantic tags output by the model are associated with the virtual node permission matrix, and the accessible semantic tag categories are restricted according to the user's permission level. This is combined with the graph document similarity matrix to achieve semantic-based document clustering, and associated with the cache dynamic residence period vector to determine the priority of documents containing different semantic tags in the cache.
[0083] The detailed steps for establishing the training dataset for the image semantic understanding model include five stages: enterprise-level image and document sample collection, manual annotation, classification and organization, data augmentation, and dataset construction. The sample collection stage involves selecting documents with rich image content from the enterprise's internal document library, covering various types such as technical documents, business reports, and product manuals, ensuring the diversity and representativeness of the samples. A total of 50,000 image samples were collected. The manual annotation stage involves professional annotators performing multi-level semantic annotation on the image content, including object-level annotation to identify specific objects in the image, such as people, equipment, and buildings; scene-level annotation to describe the overall environment of the image, such as conference rooms, factories, and office areas; and relation-level annotation to describe the spatial and semantic relationships between objects in the image. An average of 15 to 25 semantic tags are generated for each image. The classification and organization stage categorizes images into three levels of complexity (simple, medium, and complex) and four categories according to image type: images of people, scenes, equipment, and documents. A database mapping image feature vectors to semantic tags is established, and the annotation information is stored using a relational database structure. In the data augmentation stage, techniques such as rotation, scaling, flipping, brightness adjustment, and contrast adjustment are used to expand the number of training samples, increasing the original number of samples to 200,000, thereby enhancing the model's generalization ability and robustness. In the dataset construction stage, the processed image samples, feature labels, and semantic descriptions are organized into a standard training data format and stored in TensorFlow Record format. Training, validation, and test sets are established in a 7:2:1 ratio, forming a complete dataset for training the image semantic understanding model.
[0084] It should be noted that the key technical ideas of this invention mainly include three core innovations: a two-layer caching optimization mechanism based on game theory, a multi-modal feature fusion-based integrated image and text retrieval technology, and a dynamic load balancing distributed storage architecture.
[0085] A game theory-based two-layer caching optimization mechanism achieves Pareto optimality in cache resource allocation by constructing an upper-layer cache hit rate maximization model and a lower-layer storage cost minimization model. Compared to traditional single-objective optimization methods, this mechanism effectively controls storage costs while ensuring high cache hit rates, finding the optimal balance between two competing objectives through Nash equilibrium theory in game theory. Traditional methods often focus only on a single indicator, either cache hit rate or storage cost, which can easily lead to unintended consequences. This approach, however, considers both objectives uniformly through mathematical modeling, resulting in a significant improvement in resource allocation efficiency.
[0086] Multimodal feature fusion-based image-text integrated retrieval technology extracts semantic features from images using deep learning models and fuses them with text features, overcoming the limitation of traditional retrieval systems that can only perform searches based on text content. This technology extracts multi-level semantic information and uses feature fusion algorithms to associate image semantic tags with document text content, achieving a comprehensive understanding and retrieval of both image and document content. Compared to traditional keyword-matching-based retrieval methods, this technology can understand the semantic content of images, significantly improving retrieval accuracy and recall, especially for enterprise documents with a high proportion of images, where the improvement in retrieval performance is even more pronounced.
[0087] The dynamic load-balanced distributed storage architecture achieves adaptive adjustment and optimization of storage resources by monitoring system load status in real time and using a matrix rank deficit detection algorithm to identify load imbalances. This architecture combines consistent hashing and the Raft consensus protocol to achieve dynamic load migration and balancing while ensuring data consistency. Traditional static sharding storage methods cannot cope with dynamic changes in access patterns and are prone to performance bottlenecks caused by the concentration of hot data. This technology, through mathematical modeling and algorithm optimization, achieves intelligent load allocation, significantly improving the system's concurrent processing capabilities and response speed.
[0088] The synergistic effect of these three key technological approaches forms a complete enterprise-level document management solution, achieving intelligent management across the entire process from data storage and content understanding to retrieval optimization. Game theory optimization mechanisms provide the system with a scientific resource allocation strategy, multimodal feature fusion technology expands the system's understanding and retrieval capabilities, and a dynamic load balancing architecture ensures high performance and high availability. The cooperation of these three elements creates significant technological advantages compared to traditional enterprise document management systems, not only improving the accuracy and efficiency of document retrieval but also reducing system operating costs, providing a more intelligent and efficient solution for enterprise knowledge management.
[0089] It should be noted that this invention also solves the following technical problems: the difficulty in ensuring data consistency and unbalanced load on storage nodes in distributed graph and document storage systems. In traditional distributed storage systems, graph and document data are typically stored using a simple hash sharding strategy. When there are differences in hardware configurations or uneven distribution of access load among different storage nodes, some storage nodes are prone to overload while other nodes are idle. Furthermore, in scenarios with concurrent access by multiple users and data updates, the lack of an effective data consistency guarantee mechanism easily leads to data conflicts and system instability. This invention establishes a storage shard allocation vector and a storage block management matrix, dynamically calculates allocation strategies based on graph and document type, document size information, and storage node load, uses a consistent hashing algorithm to achieve intelligent allocation of storage nodes, monitors the storage shard allocation status in real time using a matrix rank deficit detection algorithm, automatically triggers a storage shard rebalancing mechanism when load imbalance is detected, combines a distributed lock algorithm based on the Raft consistency protocol to control mutually exclusive access to resources, and ensures data consistency in a distributed environment through a lease mechanism and heartbeat detection, thereby effectively solving the technical challenges of load balancing and data consistency in distributed storage environments.
[0090] This invention addresses the technical challenges of low efficiency in image content understanding and multimodal retrieval. Traditional enterprise document management systems primarily rely on text keywords and metadata for retrieval. However, for complex documents containing a large amount of image content, they cannot effectively extract and utilize semantic information from the images, leading to inaccurate retrieval results and omissions of relevant documents. This is particularly problematic when cross-modal retrieval based on image content is required, where system performance is severely inadequate. This invention constructs an image semantic understanding model based on convolutional neural networks and the Transformer architecture. It employs a multi-stage feature extraction network including convolutional layers, pooling layers, a multi-head attention mechanism, and a fully connected classification layer. The number of heads in the multi-head attention mechanism is dynamically determined based on the dimension of the cache dynamic residency vector, the standard deviation of user access frequency data, and the mean of system load parameters. This enables multi-level semantic interpretation of image content, extracting image feature vectors and generating multi-level semantic labels that include object recognition, scene description, and relationship annotation. An image content index table is established to map image feature vectors to document location information. The image interpretation results are then integrated with text content to form a comprehensive retrieval index, supporting integrated image and text retrieval operations and significantly improving the accuracy and efficiency of multimodal content retrieval.
[0091] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described enterprise-level document management method based on dynamic access control.
[0092] A third aspect of the present invention provides an enterprise-level document management system based on dynamic access control, comprising the aforementioned computer-readable storage medium. The system is any one of a computer, a server, or a microcontroller. The computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0093] Specifically, the principle of this invention is as follows: The fundamental principle that enables this invention to solve the aforementioned technical problems lies in establishing a collaborative optimization mechanism for dynamic access control and intelligent cache management. First, by constructing a virtual node permission matrix, a mathematical mapping between user identity and permission levels is achieved, establishing a two-dimensional permission matrix structure to support rapid permission verification. Simultaneously, a dynamic cache residency vector is constructed, calculating residency time weights based on document access frequency data, document size information, and system load parameters to achieve dynamic allocation of cache resources. Second, a game theory model is used to establish a two-layer optimization framework. The upper-layer model aims to maximize cache hit rate, while the lower-layer model aims to minimize storage cost. A coupling term connects the two models to mathematically model the relationship between cache space allocation and storage cost. The cache allocation optimization function calculates the optimal configuration scheme based on multi-dimensional parameters such as user access frequency, document size, and available cache capacity. Third, an image semantic understanding model extracts image feature vectors and generates semantic tags. The image interpretation results are then fused with text content to establish a comprehensive retrieval index supporting integrated image and text retrieval operations, significantly improving retrieval efficiency. Finally, through a real-time system load monitoring mechanism, when the number of concurrent user accesses exceeds a preset threshold, a dynamic cache residency vector adjustment is triggered. A matrix rank deficit detection algorithm is used to monitor the storage slice allocation status, and a distributed lock algorithm and load balancing mechanism are combined to achieve dynamic resource reallocation. This multi-level collaborative optimization mechanism ensures that the system can adaptively adjust according to actual access patterns and load conditions, guaranteeing the rationality of cache resource allocation and the efficiency of retrieval operations from a technical logic perspective.
[0094] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0095] The specific implementation of step S01 is to construct a virtual node permission matrix. and cache dynamic residency vector The mathematical expression for the virtual node permission matrix is:
[0096] ;
[0097] In the formula, for The permission matrix; For the first The user on the first Access levels for class permissions; This represents the total number of users in the system. This represents the total number of permission types, with a value of 4. The formula for calculating the cache dynamic residency vector is:
[0098] ;
[0099] In the formula, For the first The cache dwell time of each image document; For the first The access frequency of each document; For the first The file size of each image document; Priority weights for users accessing the service; These are weighting coefficients, with values of 0.4, 0.3, and 0.3 respectively. The base dwell time constant is set to 300 seconds. The access frequency is also considered. The method for obtaining the data is to count the total number of times the document has been accessed in the past 30 days, divide by 30, and then calculate the file size. The number of bytes is obtained directly through the file system interface, along with the user priority weight. The weight of users is determined based on their permission level in the permission matrix: management layer users have a weight of 1.0, business layer users have a weight of 0.8, and operation layer users have a weight of 0.6.
[0100] The specific implementation of step S02 is to establish a cache cross-index matrix. Memory slice allocation vector and storage block management matrix The cache cross-index matrix is represented as:
[0101] ;
[0102] In the formula, for The cache index matrix; For the first The document in the first image document The storage status in the level cache, with a value of 0 or 1; This represents the total number of image documents. The formula for calculating the storage slice allocation vector is:
[0103] ;
[0104] In the formula, For the first The number of storage slices allocated to each storage node; For the first Weighting factors for each storage node; For the first Available capacity of each storage node; This represents the total number of memory chips. This represents the total number of storage nodes. The storage block management matrix is represented as follows:
[0105] ;
[0106] In the formula, for Block management matrix; For the first The first image document Location identifier of each storage block; This represents the maximum number of blocks in a single document. The storage node weight factor is also relevant. The results were obtained through experiments, including step 1: testing the read and write performance of the storage nodes and recording the number of input and output operations per second; step 2: assigning weights to high-performance nodes (1.2), medium-performance nodes (1.0), and low-performance nodes (0.8) based on the performance test results.
[0107] The specific implementation method of step S03 is the same as described above, and will not be repeated in detail here.
[0108] The specific implementation of step S04 is based on optimizing the cache allocation strategy using a game theory model. The objective function of the upper-level model is:
[0109] ;
[0110] In the formula, This is the target value of the upper-level model; For the first Cache allocation weights for each graph document; For the first The cache hit flag for each image document is set to 1 if a cache hit occurs and 0 if a cache miss occurs. This is the network latency penalty coefficient, with a value of 0.01. For the first The network latency of each graph document. The objective function of the lower-level model is:
[0111] ;
[0112] In the formula, The target value for the lower-level model; For the first Cost coefficient of each storage node; For the first The unit storage cost per storage node; For the first The data migration cost of each graph document. The formula for calculating the coupling term is:
[0113] ;
[0114] In the formula, The numerical value of the coupling term; This is the transpose of the cache dynamic residency vector. Wherein, the cache hit flag is... This is obtained through monitoring the caching system; when a user accesses... If the image document is found in the cache, then ,otherwise Network latency Measure round-trip latency from the client to the storage server using network probing tools; assign cache weights. Based on document importance levels, important documents have a weight of 1.5, general documents have a weight of 1.0, and temporary documents have a weight of 0.5; storage node cost coefficient. The data was obtained experimentally, including step 1: calculating the hardware procurement and maintenance costs of storage nodes; step 2: assigning values according to a coefficient of 1.2 for high-cost nodes, 1.0 for medium-cost nodes, and 0.8 for low-cost nodes; and unit storage cost. Calculate the monthly operating cost per GB of storage space and data migration costs using financial data. The formula is calculated based on document size and network bandwidth. ,in This refers to network bandwidth, measured using network monitoring tools, in MB / s. The base cost for input / output operations is determined based on the read / write latency of the storage device, with a value of 0.1 for solid-state drives and 0.5 for hard disk drives.
[0115] The specific implementation of step S05 is to calculate the image-document similarity matrix. The formula for calculating cosine similarity is:
[0116] ;
[0117] In the formula, For the first The document and the first The similarity between individual image documents; and The first The and the first Feature vectors of a graph document; It is the inner product of two eigenvectors; and These are the Euclidean norms of the two eigenvectors. The standardization formula for the eigenvectors of a document is:
[0118] ;
[0119] In the formula, For the first The first image document Standardized values of 3D features; These are the original eigenvalues; For the first The mean of the dimensional features; For the first The standard deviation of the dimensional features. The similarity matrix is represented as:
[0120] .
[0121] Among them, feature vector This is achieved through document content analysis, including: Step 1: Extracting content features such as word frequency statistics, document length, and number of images; Step 2: Extracting structural features such as the number of paragraphs, heading levels, and number of tables; Step 3: Combining all features into a high-dimensional vector; and Feature Mean. and standard deviation By analyzing the first of all image documents The dimensional features are obtained through statistical calculations.
[0122] The specific implementation of step S06 involves using a pre-trained image semantic understanding model to semantically annotate image content, achieving deep association between multi-level semantic tags and various system components. The image semantic understanding model automatically extracts semantic features from images using a hybrid architecture of convolutional neural networks and Transformers, generating a set of semantic tags encompassing three levels: object recognition, scene description, and relationship annotation. Each image document can generate 15 to 25 semantic tags of different granularities. The association between semantic tags and the permission matrix is achieved through a permission matching algorithm. The range of semantic tags a user can view is determined based on their access level in the permission matrix. High-privilege users can access all content, including confidential semantic tags, while low-privilege users can only access public semantic tags, thus achieving fine-grained access control at the semantic level. The document clustering mechanism based on semantic tags intelligently groups documents by calculating the weighted importance of common semantic tags, classifying documents with similar semantic content into the same storage area, optimizing storage layout and retrieval paths. The semantic tag-based cache priority mechanism dynamically adjusts document cache retention time based on the business value and access urgency of different semantic tags. Documents containing important business tags, such as contracts, finance, and core technical content, receive higher cache priority and longer retention time, while documents containing general tags, such as daily notifications and temporary files, receive lower cache priority. The formula for the association between semantic tags and the permission matrix is:
[0123] ;
[0124] In the formula, For the first The user on the first Access permission identifier for each semantic tag, with a value of 0 or 1; For the first The semantic tag corresponding to the first Class-based permission requirements, with values of 0 or 1. The formula for calculating document clustering weights based on semantics is:
[0125] ;
[0126] In the formula, For the first The and the first Clustering weights for each graph document based on semantic tags; For the first The importance weight of each semantic label; For the first Does the document contain the first...? The identifier of each semantic tag, set to 1 if it is included, otherwise set to 0; This represents the total number of semantic tags. The formula for adjusting cache priority based on semantic tags is:
[0127] ;
[0128] In the formula, To consider semantic tags, the first Adjust the cache dwell time for individual image documents; For the first The caching priority adjustment coefficient for each semantic tag is set, with high-priority tags taking values from 0.1 to 0.3 and low-priority tags taking values from -0.1 to -0.3. Semantic tag permission requirements are also considered. Based on expert experience, semantic tags are categorized into three levels of sensitivity: public, internal, and confidential, each corresponding to different access requirements; semantic tag importance weights are also determined. The cache priority adjustment coefficient is determined by statistically analyzing the frequency of this tag's appearance in enterprise documents and its business importance. The semantic tags are set according to their business value and access urgency. Important business tags are set to positive values to increase cache priority, general tags are set to zero values to remain unchanged, and low-value tags are set to negative values to decrease priority.
[0129] The specific implementation method of step S07 is the same as described above, and will not be repeated in detail here.
[0130] The specific implementation of step S08 is to adjust the weighting factor when the number of concurrent user accesses exceeds a preset threshold of 1000. The calculation formula is:
[0131] ;
[0132] In the formula, For the adjusted number Each document weight factor; The weighting factor before adjustment; The adjustment factor is set to 0.2. This represents the current concurrent access volume. The preset threshold is 1000. The judgment condition for matrix rank deficiency detection is:
[0133] ;
[0134] In the formula, Assign the rank of the matrix formed by the vectors to the memory slices; This is the threshold for determining rank deficit. Among them, the current concurrent access volume... Data is obtained in real-time through the system monitoring module, with a statistical time window of 60 seconds; initial value of weighting factor. Based on document type settings, text-intensive documents have a weight of 0.8, image-intensive documents have a weight of 1.2, and mixed documents have a weight of 1.0.
[0135] The specific implementation of step S09 is that when a rank deficit is detected in the memory slice allocation vector, the load balancing vector... The calculation formula is:
[0136] ;
[0137] In the formula, For the first Load balancing adjustment for each storage node; This represents the average load rate of all storage nodes. For the first The current load rate of each storage node; This is the total adjustment constant, taken as 10% of the current load imbalance level. The recalculation formula for the memory slice allocation vector is:
[0138] ;
[0139] In the formula, For the first The adjusted number of storage slices allocated to each storage node; This represents the allocation quantity before adjustment. The formula for calculating the data migration amount is:
[0140] ;
[0141] In the formula, For from the first The amount of data migrated from each storage node; This represents the average document size. Storage node load rate is also included. Data is obtained through system monitoring, including: Step 1: Monitoring CPU utilization, memory usage, and disk I / O utilization; Step 2: Calculating the weighted average of the three metrics as the overall load rate, with weights of 0.4, 0.3, and 0.3 respectively; Average document size. This was obtained by counting the file sizes of all image documents and calculating the average.
[0142] It should be explained that the formula for calculating the number of heads in the multi-head attention mechanism of the image semantic understanding model is as follows:
[0143] ;
[0144] In the formula, For the number of attention heads; The dimension for caching dynamic residency vectors; The standard deviation of user access frequency data; This represents the average value of the system load parameters; This is the floor function. Where, the vector dimension... Equal to the total number of diagram documents in the system Standard deviation of access frequency The average system load parameter was calculated by statistically analyzing the standard deviation of access frequencies for all documents and images. The average values of four metrics—CPU, memory, disk, and network—are used for calculation, with each metric having a weight of 0.25.
[0145] The mathematical model of the virtual node permission matrix is based on matrix mapping theory in discrete mathematics. By representing user identity and permission level using a two-dimensional matrix, the time complexity of permission verification is reduced from... Reduce to It achieves constant-level query efficiency, significantly improving the system's concurrent access capabilities compared to traditional linked list or tree-structured permission management methods.
[0146] Cache dynamic residence time vector calculation formula The multi-factor linear weighted model comprehensively considers three key influencing factors: document access frequency, file size, and user weight. By introducing the inverse term of file size, it avoids the problem of large files occupying cache resources for a long time. Compared with the traditional least recently used or least frequently used single-strategy caching algorithm, it can more accurately predict the cache value of a document.
[0147] Formula for calculating memory slice allocation vector Based on load balancing theory, the allocation is based on the product of node weight and available capacity, which ensures that high-performance nodes undertake more storage tasks while avoiding single-point overload. Compared with traditional round-robin or random allocation strategies, it can better utilize the performance differences of heterogeneous storage resources.
[0148] The two-layer objective function design of the game theory model embodies the application of multi-objective optimization theory. The upper-layer model ensures system response performance by maximizing cache hit rate, while the lower-layer model achieves economical resource utilization by minimizing storage cost. The two objective functions are coupled through a term. By establishing correlations, the optimal balance between performance and cost can be found compared to traditional single-objective optimization methods.
[0149] Cosine similarity calculation formula Based on vector geometry theory, this method measures document similarity by calculating the cosine of the angle between feature vectors, thus avoiding the influence of document length on similarity judgment. This is combined with feature vector standardization. It eliminates the magnitude difference between features of different dimensions and has better discrimination performance in high-dimensional sparse feature spaces compared with traditional Euclidean distance or Manhattan distance metrics.
[0150] Semantic tag and permission matrix association formula Based on matrix operation theory, fine-grained semantic content access control is achieved by matching and calculating user permission levels with semantic tag permission requirements. Compared with the traditional file-level permission management method, it can perform precise permission control at the document content level.
[0151] Semantic-based document clustering weight formula By employing the weighted co-occurrence statistical principle, the semantic relevance between documents is quantified by calculating the semantic tags shared by two documents and their importance weights. Combined with cosine similarity calculation, a multi-dimensional similarity measure is formed, which can more accurately identify semantically related document groups compared with clustering methods based solely on text features.
[0152] Semantic tag caching priority adjustment formula Based on the principle of weight accumulation, this method optimizes the caching strategy based on the semantic value of a document by summing the priority coefficients of the included semantic tags and using them as multiplicative factors to adjust the original cache time. Combined with the calculation of the dynamic residence period vector of the cache, a multi-level caching decision mechanism is formed. Compared with the traditional single-dimensional caching algorithm based on access frequency or file size, this method can more comprehensively evaluate the caching value of a document.
[0153] Weighting factor dynamic adjustment formula Adopting the principle of adaptive feedback control, the document cache priority is adjusted in real time according to the system load status. By introducing the ratio of the current concurrency to the threshold as an adjustment coefficient, the system can automatically optimize the caching strategy under high load, which significantly improves the stability of the system under load fluctuations compared with the static weight configuration method.
[0154] Load balancing vector calculation formula Based on load distribution theory, the adjustment direction and magnitude are determined by calculating the difference between the load rate of each node and the average load rate. Absolute difference normalization is used to ensure the reasonable allocation of adjustment amount. Compared with the traditional threshold-triggered load balancing method, it can achieve smoother load distribution adjustment.
[0155] It needs to be explained that the formula for calculating the number of heads in a multi-head attention mechanism is... By combining system state parameters with model structure parameters, using the square root of the cache vector dimension to provide the basic head size, the standard deviation of access frequency to reflect the complexity of data distribution, and the system load mean as a computational resource constraint, this method of dynamically determining the number of attention heads can better balance model performance and computational efficiency compared to a fixed head configuration.
[0156] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2:
[0157] The company has approximately 1.5 million documents, including CAD drawings, process flow diagrams, and quality inspection reports, with an average daily access volume of 12,000 times, involving 850 users from multiple departments such as R&D, production, quality, and procurement.
[0158] First, a virtual node permission matrix and a cache dynamic residency vector were constructed. The technical team divided 850 user identities into five permission levels according to departmental functions: R&D engineers, process technicians, quality inspectors, production operators, and managers, constructing an 850×5 two-dimensional permission matrix. Based on statistical document access frequency data, the average access frequency of CAD drawings was 85 times / day, process flow diagrams 62 times / day, and quality inspection reports 43 times / day. Combining this with document size information (CAD drawings average 15.6MB, process flow diagrams 8.3MB, and quality inspection reports 2.1MB), the weight coefficients for each type of document in the cache dynamic residency vector were calculated to be 0.45, 0.32, and 0.23, respectively.
[0159] A cache cross-index matrix, storage slice allocation vector, and storage block management matrix were established. The technical team adopted a three-level caching architecture, including 64GB of memory cache, 512GB of SSD cache, and 2TB of HDD cache, constructing a 1.5 million × 3 cache cross-index matrix. Based on the characteristics of different document types, a consistent hashing algorithm was used to allocate drawing documents to 8 storage nodes, with each storage node configured with 32TB of storage capacity. For large CAD drawings, a fixed-size block strategy of 4MB was adopted, process flow diagrams used 2MB blocks, and quality inspection reports used 1MB blocks, forming a storage block management matrix for parallel processing.
[0160] During system operation, the data acquisition module monitors the system status in real time. Through monitoring agents distributed across various storage nodes, system load parameters are collected every second, including CPU utilization, memory usage, disk I / O throughput, and network bandwidth utilization. Network latency monitoring shows an average latency of 3.2ms between nodes, with a maximum latency not exceeding 8.5ms. The established system performance monitoring database stores nearly six months of historical operational data, totaling 78GB.
[0161] In implementing the cache allocation strategy optimization based on a game theory model, the technical team constructed a two-layer optimization model. The upper-layer model aims to maximize the cache hit rate, determining it to be 87.3% by analyzing historical access patterns. The lower-layer model aims to minimize storage costs, calculating the current storage cost coefficient to be 0.08 yuan / GB / day. Through iterative calculations using the cache allocation optimization function, the optimal cache configuration was determined: 68% of the memory cache is allocated to frequently accessed documents, 72% is allocated to medium-frequency accessed documents via SSD cache, and low-frequency accessed documents are handled by mechanical hard drive cache.
[0162] In the document similarity calculation and clustering analysis phase, the technical team extracted a 256-dimensional feature vector containing document titles, keywords, creation times, and modification records. The cosine similarity algorithm was used to calculate the relevance between documents, establishing a 1.5 million × 1.5 million similarity matrix. The K-means clustering algorithm was then used to divide similar documents into 128 clusters, as shown in Table 1.
[0163] Table 1. Statistical table of cluster distribution of images and documents
[0164]
[0165] The image semantic understanding model was implemented using a deep learning model based on the ResNet-50 backbone and Transformer architecture. The model comprises 26 convolutional layers, 4 pooling layers, an 8-head attention mechanism, and 3 fully connected classification layers. Based on the cache dynamic residence time vector dimension of 1024, the standard deviation of user access frequency data of 23.6, and the mean of the system load parameter of 0.67, the number of attention heads was calculated to be 48. The training dataset contains 450,000 image samples collected internally by the enterprise, covering types such as mechanical part drawings, assembly drawings, circuit diagrams, and process diagrams. After 300 epochs of training, the model achieved an accuracy of 94.2% on the validation set.
[0166] System load monitoring shows that the CPU utilization of each storage node fluctuates within the normal range. For example... Figure 3 As shown, the cache hit rate over time demonstrates the effectiveness of the dynamic adjustment strategy. The image feature vector extracted by the technical team has a dimension of 2048, including visual features such as color histograms, texture features, and edge detection results, as well as deep semantic features extracted through convolutional neural networks. The generated semantic tags cover multiple levels, including object recognition, geometric shape description, dimension annotation recognition, and material analysis. The established image content index table enables fast retrieval based on image content.
[0167] Distributed storage and retrieval operations utilize the MapReduce framework for parallel processing. The technical team configured 16 Map tasks and 8 Reduce tasks, reducing query overhead by 63% through a Bloom filter pre-screening mechanism. The built inverted index contains 1.2 million keyword entries, with an average retrieval response time of 180ms. The real-time data processing mechanism based on Apache Storm employs sliding window analysis, with a window size set to 100 access requests and a sliding step size of 20 requests, enabling real-time analysis of access patterns.
[0168] During system load monitoring, when the number of concurrent user accesses exceeds 1000, a dynamic cache adjustment mechanism is automatically triggered. For example... Figure 4 As shown, cache adjustment is effective during periods of high load. The technical team uses a singular value decomposition algorithm to monitor the rank status of the storage slice allocation vector. When the matrix rank drops from the expected 8 to 6, it indicates the existence of a linearly dependent storage allocation scheme, and the system automatically calculates a load balancing vector for compensation.
[0169] As shown in Table 2, the monitoring data of the storage node load balancing status shows the load distribution of each node.
[0170] Table 2 Storage Node Load Status Monitoring Table
[0171]
[0172] The distributed lock algorithm based on the Raft consensus protocol ensures mutual exclusion of resource access. When the storage slice load exceeds 85%, such as when the load score of Node-4 reaches 0.770, the system triggers the storage slice rebalancing mechanism. The data migration operation implemented by the technical team adopts an asynchronous processing method, migrating some documents from Node-4 to the less loaded Node-5. The average transfer speed during the migration process is 450MB / s, and the impact on normal system operation is controlled within 3%.
[0173] like Figure 5 As shown, the changing trend of storage capacity of each node during data migration reflects the effectiveness of the rebalancing mechanism. The technical team achieved a balance between LRU and LFU cache replacement strategies by dynamically adjusting the weight factor. The weight factor was dynamically adjusted between 0.3 and 0.8 based on the sliding window analysis results, effectively improving the cache hit rate.
[0174] The technological advancements of this invention compared to traditional document management methods are mainly reflected in the following aspects. First, through mathematical modeling of the virtual node permission matrix and the dynamic residence period vector of the cache, quantitative control of permission verification and cache management is achieved, avoiding the coarse management method based on empirical rules in traditional approaches. Second, a two-layer optimization strategy based on a game theory model transforms the cache allocation problem into a mathematical optimization problem. By collaboratively optimizing the upper-layer model to maximize the hit rate and the lower-layer model to minimize the cost, the shortcomings of traditional single-objective optimization, which is prone to getting trapped in local optima, are overcome. Third, an image semantic understanding model is used to achieve deep analysis of image content in documents, extending traditional filename and tag-based retrieval to intelligent retrieval based on content semantics, significantly improving the accuracy and comprehensiveness of retrieval. Finally, through matrix rank deficit detection and load balancing vector compensation mechanisms, adaptive adjustment of the storage system is achieved. Compared to traditional static allocation strategies, it can dynamically respond to load changes and fault conditions, significantly improving the reliability and stability of the system.
[0175] It should be noted that the variables involved in this invention are explained in detail in Tables 3 and 4.
[0176] Table 3. Variable Explanation Table (Part 1)
[0177]
[0178] Table 4. Variable Explanation Table (Part Two)
[0179]
[0180] 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 changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. An enterprise-level image and document management method based on dynamic permission control, characterized in that, This includes constructing a virtual node permission matrix and a cache dynamic residency vector; mathematically mapping user identity identifiers to permission levels to form a two-dimensional permission matrix structure; calculating residency time weights based on document access frequency data and document size information to generate a one-dimensional time vector; establishing a permission verification system and cache management mechanism; constructing a cache cross-index matrix, storage slice allocation vector, and storage block management matrix; collecting user access frequency data, document size information, system load parameters, and network latency indicators; optimizing cache allocation strategies based on a game theory model; constructing an upper-layer model aimed at maximizing cache hit rate and a lower-layer model aimed at minimizing storage cost; calculating a document-graph similarity matrix through vector operations; using a pre-trained image semantic understanding model to perform multi-level interpretation of image content in documents; implementing distributed storage and retrieval operations; monitoring system load status; and controlling resource access based on a distributed lock algorithm. The objective function of the upper-level model is: ; In the formula, is the target value of the upper model; is the cache allocation weight of the first graph document; is the cache hit identification of the first graph document, taking 1 when hit and 0 when not hit; is the network delay penalty coefficient; is the network delay time of the first graph document; is the access frequency of the first graph document; is the total number of graph documents; The objective function of the lower-level model is: ; In the formula, is the target value of the lower layer model; is the cost coefficient of the first storage node; is the unit storage cost of the first storage node; is the data migration cost of the first graph document; is the number of storage slices allocated to the first storage node; is the total number of storage nodes; The formula for calculating the coupling term is as follows: ; In the formula, is the coupling term value; is the transpose of the cache dynamic residence period vector, wherein the cache hit identifies is obtained through cache system monitoring, when the user accesses the first graph document, if it is found in the cache , otherwise ; the data migration cost is calculated according to the document size and the network bandwidth, and the formula is , wherein is the network bandwidth, which is obtained by measuring the network monitoring tool, and the unit is MB / s, is the input / output operation basic cost, which is determined according to the read / write delay of the storage device, and the value of the solid state disk is 0.1, and the value of the mechanical hard disk is 0.5; is the file size of the first graph document.
2. The method of claim 1, wherein, The virtual node permission matrix is a two-dimensional matrix structure formed by mathematically mapping user identity identifiers to permission levels. It is used to quickly verify user access permissions to graphs and documents.
3. The method of claim 2, wherein, The cache dynamic residency vector is a one-dimensional vector calculated based on graph document access frequency data, document size information, and system load parameters. It is used to dynamically adjust the retention time of each graph document in the cache.
4. The method of claim 3, wherein, A cache cross-index matrix is a matrix structure that establishes a relationship between image and document metadata information and multi-level cache locations, enabling rapid location and verification of cached data.
5. The method of claim 4, wherein, The storage slice allocation vector is an allocation strategy vector calculated based on the graph document type, document size information, and storage node load. It is used to guide the slicing and storage of graph documents in a distributed storage system.
6. The method of claim 5, wherein, The storage block management matrix is a management structure matrix formed by dividing the content of a graph document into blocks of fixed size, and is used to realize the block storage and parallel processing of graph documents.
7. The method of claim 6, wherein, The objective function of the upper-level model is the product of cache hit rate and user access frequency data minus the network latency penalty term.
8. The method of claim 7, wherein, The objective function of the lower-level model is the product of the storage cost coefficient and the storage space usage, plus the square root of the data migration cost.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform an enterprise-level document management method based on dynamic access control as described in any one of claims 1-8.
10. An enterprise-level graphic document management system based on dynamic permission control, characterized by, The system comprises the computer-readable storage medium of claim 9, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes program instructions stored in the computer-readable storage medium.
Citation Information
Patent Citations
General permission and quota management system and method for network storage system
CN112650727A
Rapid data indexing method for large archive database
CN117076466A