CN113268774A - File resource management method, device, equipment and storage medium - Google Patents

File resource management method, device, equipment and storage medium Download PDF

Info

Publication number
CN113268774A
CN113268774A CN202110669015.7A CN202110669015A CN113268774A CN 113268774 A CN113268774 A CN 113268774A CN 202110669015 A CN202110669015 A CN 202110669015A CN 113268774 A CN113268774 A CN 113268774A
Authority
CN
China
Prior art keywords
file
target file
access
resource
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110669015.7A
Other languages
Chinese (zh)
Inventor
许尧
潘险锋
蒋滨泽
黄妙妙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110669015.7A priority Critical patent/CN113268774A/en
Publication of CN113268774A publication Critical patent/CN113268774A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The invention discloses a file resource management method, a file resource management device, file resource management equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps of generating an access check parameter according to a received resource access request; determining an access service parameter and an access authority verification parameter according to the access verification parameter; judging whether the resource access request has corresponding operation authority or not according to the access service parameters and the access authority verification parameters; when the resource access request has corresponding operation right, acquiring mark bit information of a target file corresponding to the resource access request according to the access service parameter; and searching a target file data stream corresponding to the target file from a cache according to the flag bit information, without separately accessing a service file and a software static file, realizing unified authority management of the file through setting an access authority and a verification parameter, greatly reducing research and development resources and hardware storage resources and avoiding authority conflict during file access.

Description

File resource management method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for file resource management.
Background
Currently, great factories in the IT industry are gradually developing efforts in the field of home business, more and more software platforms provide services for home business related terminal devices, wherein multimedia attributes and resource management business requirements are continuously increased and enhanced, including but not limited to public/private files such as pictures, documents, audio, video and the like; in the field of the middle-shift Hangzhou research layout family, the requirements of each related software platform in the fields of file resource management and the like are greatly increased. In a narrow sense, a file resource only refers to a service file related to a service platform, and is uploaded to a server by a user or an administrator according to a specific interface and is associated with related services; broadly speaking, the file resources also include static files in the software engineering code, including pictures for displaying pages, documents for downloading, audio and video for playing, and the like. However, a unified management scheme for the two types of file resources does not exist in the existing file resource management technology, file resources such as business files and software static files cannot be integrated into a unified network resource, only independent development of modules can be realized, research and development resources are seriously wasted, even permission conflict exists in business file access under different modules, resource management, permission management and resource operation and maintenance are not unified, research and development resources are wasted due to repeated research and development, the software static files occupy code hosting system resources, and file resources cannot be dynamically changed in real time.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a file resource management method, a file resource management device, file resource management equipment and a storage medium, and aims to solve the technical problem that unified management of file resources cannot be realized in the prior art.
In order to achieve the above object, the present invention provides a file resource management method, including the following steps:
when a resource access request is received, generating an access check parameter according to the resource access request;
determining an access service parameter and an access authority verification parameter according to the access verification parameter;
judging whether the resource access request has corresponding operation authority or not according to the access service parameters and the access authority verification parameters;
when the resource access request has corresponding operation right, acquiring mark bit information of a target file corresponding to the resource access request according to the access service parameter;
and searching a target file data stream corresponding to the target file from a cache according to the marking bit information.
Optionally, the searching for the target file data stream corresponding to the target file from the cache according to the flag bit information includes:
searching the routing information corresponding to the marking bit information from a routing cache;
determining path information corresponding to the target file according to the routing information;
and searching a target file data stream corresponding to the target file from a file cache according to the path information.
Optionally, before the searching for the routing information corresponding to the flag bit information from the route cache, the method further includes:
detecting whether the routing information corresponding to the marking bit information exists in a routing cache or not;
if the routing cache is detected to have the routing information corresponding to the marker bit information, executing a step of searching the routing information corresponding to the marker bit information from the routing cache;
if the routing cache is detected to have no routing information corresponding to the marking bit information, the routing information corresponding to the marking bit information is obtained from a preset database, and the routing information is stored in the routing cache.
Optionally, before searching for the target file data stream corresponding to the target file from the file cache according to the path information, the method further includes:
detecting whether a target file data stream corresponding to the target file exists in a file cache;
if the target file data stream corresponding to the target file exists in the file cache, searching the target file data stream corresponding to the target file from the file cache according to the path information;
and if the target file data stream corresponding to the target file does not exist in the file cache, acquiring the target file data stream corresponding to the target file from a distributed file server according to the path information.
Optionally, after searching for the target file data stream corresponding to the target file from the cache according to the flag bit information, the method further includes:
when a resource management request is received, generating a management verification parameter according to the resource management request;
determining a management service parameter and a management authority verification parameter according to the management verification parameter;
determining the resource management authority corresponding to the resource management request according to the management service parameters and the management authority verification parameters;
and correspondingly managing the target file according to the resource management authority.
Optionally, the correspondingly managing the target file according to the resource management authority includes:
when the resource management authority is an updating authority, increasing the application times corresponding to the target file according to the mark bit information of the target file, writing the service module information associated with the target file into a service information log, and adjusting the file state of the target file to be an effective state;
when the resource management authority is the abandoning authority, reducing the application times corresponding to the target file according to the flag bit information of the target file, deleting the cache file corresponding to the target file when the application times are reduced to preset times, and adjusting the file state of the target file to be an invalid state;
and when the resource management authority is a deletion authority, deleting the entity file corresponding to the target file, and adjusting the file state of the target file to be a deleted state.
Optionally, after searching for the target file data stream corresponding to the target file from the cache according to the flag bit information, the method further includes:
acquiring the service attribute of the target file;
determining a cache state corresponding to the target file data stream according to the service attribute;
and adjusting the storage state of the target file data stream according to the cache state.
In addition, to achieve the above object, the present invention further provides a file resource management apparatus, including:
the generation module is used for generating an access check parameter according to a resource access request when the resource access request is received;
the extraction module is used for determining an access service parameter and an access authority verification parameter according to the access verification parameter;
the judging module is used for judging whether the resource access request has corresponding operation authority according to the access service parameter and the access authority checking parameter;
the reading module is used for acquiring the marking bit information of the target file corresponding to the resource access request according to the access service parameter when the resource access request has the corresponding operation right;
and the searching module is used for searching the target file data stream corresponding to the target file from the cache according to the marking bit information.
In addition, to achieve the above object, the present invention further provides a file resource management device, including: a memory, a processor and a file asset management program stored on the memory and executable on the processor, the file asset management program being configured to implement a file asset management method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium having a file resource management program stored thereon, wherein the file resource management program, when executed by a processor, implements the file resource management method as described above.
When a resource access request is received, an access verification parameter is generated according to the resource access request; determining an access service parameter and an access authority verification parameter according to the access verification parameter; judging whether the resource access request has corresponding operation authority or not according to the access service parameters and the access authority verification parameters; when the resource access request has corresponding operation right, acquiring mark bit information of a target file corresponding to the resource access request according to the access service parameter; and searching a target file data stream corresponding to the target file from a cache according to the flag bit information, without separately accessing a service file and a software static file, realizing unified authority management of the file through setting an access authority and a verification parameter, greatly reducing research and development resources and hardware storage resources and avoiding authority conflict during file access.
Drawings
FIG. 1 is a schematic structural diagram of a file resource management device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a file resource management method according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a unified file resource management system of the file resource management method of the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of a file resource management method according to the present invention;
FIG. 5 is a block diagram of a file resource management device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a file resource management device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the file resource management apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the architecture shown in FIG. 1 does not constitute a limitation of a file asset management device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a file resource management program.
In the file resource management apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the file resource management device of the present invention may be disposed in the file resource management device, and the file resource management device calls the file resource management program stored in the memory 1005 through the processor 1001 and executes the file resource management method provided by the embodiment of the present invention.
An embodiment of the present invention provides a file resource management method, and referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a file resource management method according to the present invention.
In this embodiment, the file resource management method includes the following steps:
step S10: and when a resource access request is received, generating an access check parameter according to the resource access request.
It should be noted that, the execution subject of this embodiment may be a file resource management device, and the file resource management device may be an electronic device such as a personal computer, a server, or a vehicle-mounted terminal, and may also be other devices or servers that can achieve the same or similar functions.
It should be noted that, in the prior art, storage management of a service file is based on an engineering file resource platform, a nature of a software static file is a code, and storage management of a software static file is based on a code hosting platform, and in the prior art, a unified management of a service file and a software static file cannot be performed, and storage management can be performed only through a platform developed independently in modules, whereas in this embodiment, a file resource management device includes a unified file resource management system, and a service file and a software static file are stored in the unified file resource management system at the same time. Further, in this embodiment, the unified file resource system is provided with a plurality of interfaces, as shown in fig. 3, the unified file resource management system includes a viewing interface, a downloading interface, a creating interface, an updating interface, and a deleting interface, and each interface has different functions, for example, a file resource can be viewed through the viewing interface, a file resource viewed through the downloading interface can be downloaded through the downloading interface, a new file resource can be added into the unified file resource management system through the creating interface, a file resource in the unified file resource management system can be updated through the updating interface, and an invalid file resource in the unified file resource management system can be deleted through the deleting interface. In addition, it should be noted that the unified file resource management system is connected with the portal side and the management side through the interfaces, the portal side checks and downloads the specific resource through the checking interface and the downloading interface based on the front-end or back-end request, and the management side performs new creation, update and deletion operations on the file resource in the unified file resource management system through the creation interface, the update interface and the deletion interface. In addition, the unified file resource management system in this embodiment further includes a parameter parsing module, a permission checking module, a file marking processing module, and a file data stream processing module, where the parameter parsing module is configured to generate an access checking parameter, the permission checking module is configured to check the access checking parameter so as to determine a permission corresponding to each resource request, the file marking bit processing module is configured to obtain routing information of a specific resource, and the file data stream processing module is configured to search a file data stream corresponding to the specific resource according to the routing information of the specific resource.
In a specific implementation, when a portal side wants to view or download a specific resource in the unified file resource management system, the portal side sends a resource access request to the unified file resource management system, and the unified file resource management system receives the resource access request. Further, in this embodiment, the resource access request sent by the portal side may be received based on a receiving instruction input by the user, or a preset time may be set, and when the preset time is reached, the resource access request sent by the portal side is automatically received.
It is easy to understand that not all resource access requests allow viewing or downloading file resources in the unified file resource management system, and therefore it is determined whether the resource access request has corresponding viewing or downloading permissions, in this embodiment, the permission is determined according to the access check parameter generated by the resource access request. Specifically, in this embodiment, the corresponding access verification parameter may be generated according to an interface path corresponding to the resource access request and the access service parameter, where the interface path includes an interface path of the viewing interface and an interface path of the downloading interface, and the access service parameter includes parameters such as a service file or a software static file query or a downloading operation.
Step S20: and determining an access service parameter and an access authority verification parameter according to the access verification parameter.
In specific implementation, after the access verification parameters are generated, the access verification parameters are processed according to a preset encryption and decryption rule, and the access service parameters and the access right verification parameters are extracted from the access verification parameters. It should be emphasized that, in this embodiment, the preset encryption and decryption rule may adopt a data encryption standard, a symmetric encryption, an asymmetric encryption, and the like, and may also be set correspondingly according to an actual encryption and decryption requirement, which is not limited in this embodiment.
Step S30: and judging whether the resource access request has corresponding operation authority or not according to the access service parameters and the access authority verification parameters.
In this embodiment, different access right verification parameters correspond to different operation rights, the access service parameter includes an access right identifier, and by comparing the access right identifier with the access right verification parameter, it can be determined whether the resource access request has a corresponding operation right. For example, the access right verification parameter a corresponds to a viewing operation right, the access right verification parameter B corresponds to a downloading operation right, the access right identifier contained in the access service parameter is C, and it can be known through comparison that the access right identifier C is not consistent with the access right verification parameters a and B, at this time, it is determined that the resource access request does not have a corresponding operation right, and it is assumed that the access right identifier contained in the service parameter is a, and the access right identifier a is consistent with the access right verification parameter a, it can be determined that the resource access request has a viewing right but does not have a downloading right. It should be emphasized that, in this embodiment, the resource access request sent by the portal side only has the viewing or downloading right, and the access right verification parameter may be set as a parameter corresponding to the viewing right and the downloading right. Regarding the resource management request sent by the management side, the access right check parameter may be set as a parameter corresponding to new creation, update, and deletion rights.
Step S40: and when the resource access request has the corresponding operation right, acquiring the mark bit information of the target file corresponding to the resource access request according to the access service parameter.
It is easy to understand that, if the resource access request has a corresponding operation permission, the corresponding file resource may be viewed or downloaded according to the operation permission, and in this embodiment, it may further determine, according to the service parameter, whether the service file resource or the software static file resource is to be viewed or downloaded by the resource access request, so as to obtain flag bit information of the service file resource or the software static file resource, where the target file is a file resource that the portal side wants to view or download, and may be the service file resource or the software static file resource. It should be further noted that the storage of the file resource has corresponding flag bit information, and the flag bit information is used for recording the storage location of the file resource in the unified file resource management system.
Step S50: and searching a target file data stream corresponding to the target file from a cache according to the marking bit information.
In a specific implementation, after the flag bit information of the target file is obtained, in this embodiment, a target file data stream corresponding to the target file may be searched from the cache based on a file storage location corresponding to the flag bit information, where the target file data stream is a file data stream of the target file, and includes specific file information content of the target file to be viewed or downloaded at the portal side. After the target file data stream is found, the target file data stream is fed back to the portal side to respond to the resource access request, and the portal side can check or download the target file data stream according to the operation authority.
Further, in this embodiment, in addition to the unified management of the access to the file resource, the method can also perform the full-life management of the file resource stored in the unified file management system, and in this embodiment, after step S50, the method further includes: when a resource management request is received, generating a management verification parameter according to the resource management request; determining a management service parameter and a management authority verification parameter according to the management verification parameter; determining the resource management authority corresponding to the resource management request according to the management service parameters and the management authority verification parameters; and correspondingly managing the target file according to the resource management authority.
It should be noted that the portal side can view and download the file resource, and the management side can create, update, and delete the file resource. Similarly, not all resource management requests allow new creation, update and deletion of file resources in the unified file resource management system, and therefore it is determined whether the resource management request has corresponding new creation, update and deletion permissions, in this embodiment, permission determination is performed according to a management verification parameter generated by the resource management request. Specifically, in this embodiment, the corresponding access check parameter may be generated according to an interface path corresponding to the resource management request and the management service parameter, where the interface path includes an interface path for newly creating an interface, an interface path for updating an interface, and an interface path for deleting an interface, and the management service parameter includes parameters of operations such as creating, updating, and deleting a service file or a software static file. After the management of the verification parameters, the management verification parameters may be processed according to the preset encryption and decryption rules, and the management service parameters and the management authority verification parameters are extracted from the management verification parameters. In this embodiment, different management permission verification parameters correspond to different operation permissions, the management service parameter includes a management permission identifier, and by comparing the permission identifier with the access permission verification parameter, it can be determined whether the resource access request has a corresponding operation permission. For example, the management authority verification parameter E corresponds to a newly created operation authority, the management authority verification parameter F corresponds to an updated operation authority, the management authority verification parameter G corresponds to a deleted operation authority, the management authority identifier included in the management service parameter is H, it can be known through comparison that the management authority identifier H is not consistent with the management authority verification parameters E, F and G, at this time, it is determined that the resource management request does not have a corresponding operation authority, and it is assumed that the management authority identifier included in the management service parameter is F, and the management authority identifier F is consistent with the management authority verification parameter F, it can be determined that the resource management request has an updated authority, but does not have newly created and deleted authorities.
Further, in the present embodiment, in order to perform the full-life management on the target file, the file states may be divided into four states of "temporary", "valid", "invalid" and "deleted", and the management operations performed on the partially different states are also different. Specifically, when the resource management authority is an updating authority, the application times corresponding to the target file are increased according to the mark bit information of the target file, the application times are increased by 1 every time the file resource is checked or downloaded, then the service module information associated with the target file is written into the service information log, and at this time, the file state of the target file is adjusted to be an effective state; when the resource management authority is the abandon authority, reducing the application times corresponding to the target file according to the mark bit information of the target file, reducing the application times by 1 when the file resource is not checked or used, and deleting the cache file corresponding to the target file when the application times are reduced to the preset times, wherein the file state of the target file is adjusted to be in an invalid state; when the resource management authority is the deletion authority, in order to save hardware storage resources, the entity file corresponding to the target file is deleted, and at this time, the file state adjustment of the target file is adjusted to be in a deleted state. The above is directed to the processing of the target file, if the resource management request is a new request, the file marking bit information with the unique identifier is generated according to the information such as the service module and the user authority of the file resource to be newly added, and meanwhile, the service information, the authority information and the routing information of the file resource are stored into the database together, and at this time, the file state of the newly added file resource is adjusted to be in a temporary state.
Further, in this embodiment, the target file data stream may be searched from the cache, and in order to avoid waste of hardware storage resources, after step S50 in this embodiment, the method further includes: acquiring the service attribute of the target file; determining a cache state corresponding to the target file data stream according to the service attribute; and adjusting the storage state of the target file data stream according to the cache state.
It should be noted that different target files have corresponding service attributes, the target file data stream may be divided into three cache states according to the corresponding service attributes, such as long-term service cache, temporary service cache, and no-cache, and then the storage state of the target file data stream is adjusted according to the cache state, for example, the target file in the no-cache state is deleted from the cache. Further, the long-term service cache corresponds to a common software static file and a service file; the temporary service cache corresponds to an uncommon service file; files for which a specific user or a specific module needs to update in real time and keep file information atomicity are not cacheable, and the real-time data of a database and a file server must be used as the standard.
In this embodiment, when a resource access request is received, an access check parameter is generated according to the resource access request; determining an access service parameter and an access authority verification parameter according to the access verification parameter; judging whether the resource access request has corresponding operation authority or not according to the access service parameters and the access authority verification parameters; when the resource access request has corresponding operation right, acquiring mark bit information of a target file corresponding to the resource access request according to the access service parameter; and searching a target file data stream corresponding to the target file from a cache according to the flag bit information, without separately accessing a service file and a software static file, realizing unified authority management of the file through setting an access authority and a verification parameter, greatly reducing research and development resources and hardware storage resources and avoiding authority conflict during file access.
Referring to fig. 4, fig. 4 is a flowchart illustrating a file resource management method according to a second embodiment of the present invention.
Based on the first embodiment, in the file resource management method according to this embodiment, the step S50 specifically includes:
step S501: and searching the route information corresponding to the marking bit information from the route cache.
It should be noted that the cache in this embodiment includes a route cache and a file cache, and when the target file is stored in the cache, the target file data stream of the target file is finally obtained through the route cache and the file cache in sequence. Specifically, in this embodiment, the corresponding routing information is first searched from the routing cache according to the flag bit information, the routing cache in the unified file management system stores not only the routing information of each file resource, but also a mapping relationship table between the routing information and the flag bit information, and based on the uniqueness of the flag bit information, the routing information corresponding to the target file can be searched from the routing cache according to the mapping relationship table according to the storage location corresponding to the flag bit information.
It is easy to understand that when the route information corresponding to the flag bit information is searched from the route cache, it is necessary to ensure that the corresponding route information exists in the route cache, and not all the route information is stored in the route cache, so before the above step S501, it is necessary to detect whether the route information corresponding to the flag bit information exists in the route cache. Specifically, if it is detected that the route information corresponding to the flag bit information exists in the route cache, it indicates that the route information is stored in the route cache, and at this time, the corresponding route information may be determined according to the flag bit information. Further, if it is detected that the routing information corresponding to the flag bit information does not exist in the routing cache, it indicates that the routing information is not stored in the routing cache, in this embodiment, the routing information corresponding to the flag bit information may be obtained from the relational database in another manner, and the routing information may be obtained from the relational database according to the mapping relationship between the routing information and the flag bit information.
Step S502: and determining path information corresponding to the target file according to the routing information.
It should be noted that, in this embodiment, the path information corresponding to the destination file is determined according to the route information based on the route mapping mechanism. The route mapping mechanism is established when a file resource is newly established, file mark bit information with unique identification meaning is established according to file resource related service parameters when the file resource is established, the related file resource is associated with the file mark bit information, the actual path of the file resource in a file server is recorded, meanwhile, the route information is recorded, the actual path and the route information are recorded in an associated mode, and conversely, after the route information is determined, the path information corresponding to the target file can be determined according to the associated corresponding relation.
Step S503: and searching a target file data stream corresponding to the target file from a file cache according to the path information.
In a specific implementation, after the path information of the target file is acquired, the target file data stream is searched from the file cache according to the path information based on the mapping relationship between the file path and the file data stream.
Further, it is easy to understand that, when searching for a target file data stream from the file cache, it is necessary to ensure that the corresponding target file data stream exists in the file cache, and not all file data streams are stored in the file cache, so before the above step S503, it is necessary to detect whether the target file data stream corresponding to the target file exists in the file cache. Specifically, if it is detected that the target file data stream corresponding to the target file exists in the file cache, it indicates that the target file data stream is stored in the file cache, and at this time, the corresponding target file data stream may be determined according to the path information. Further, if it is detected that the target file data stream corresponding to the target file does not exist in the file cache, it indicates that the target file data stream is not stored in the file cache, in this embodiment, the target file data stream corresponding to the path information may be obtained from the distributed file server in another manner, and the target file data stream may be obtained from the distributed file server according to the mapping relationship between the path information and the target file data stream.
In the embodiment, the route information corresponding to the flag bit information is searched from the route cache; determining path information corresponding to the target file according to the routing information; and searching a target file data stream corresponding to the target file from a file cache according to the path information, finally acquiring the target file data stream through a route cache and the file cache, and improving the access and management efficiency of file resources by utilizing a route mapping mechanism and a cache mechanism.
In addition, an embodiment of the present invention further provides a storage medium, where a file resource management program is stored on the storage medium, and the file resource management program, when executed by a processor, implements the steps of the file resource management method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
Referring to FIG. 5, FIG. 5 is a block diagram of a file resource management device according to a first embodiment of the present invention.
As shown in fig. 5, a file resource management apparatus according to an embodiment of the present invention includes:
the generation module 10 is configured to generate an access check parameter according to a resource access request when the resource access request is received.
And the extraction module 20 is configured to determine an access service parameter and an access right check parameter according to the access check parameter.
And the judging module 30 is configured to judge whether the resource access request has a corresponding operation right according to the access service parameter and the access right check parameter.
And the reading module 40 is configured to, when the resource access request has the corresponding operation right, obtain, according to the access service parameter, flag bit information of a target file corresponding to the resource access request.
And the searching module 50 is configured to search a target file data stream corresponding to the target file from a cache according to the flag bit information.
In this embodiment, when a resource access request is received, an access check parameter is generated according to the resource access request; determining an access service parameter and an access authority verification parameter according to the access verification parameter; judging whether the resource access request has corresponding operation authority or not according to the access service parameters and the access authority verification parameters; when the resource access request has corresponding operation right, acquiring mark bit information of a target file corresponding to the resource access request according to the access service parameter; and searching a target file data stream corresponding to the target file from a cache according to the flag bit information, without separately accessing a service file and a software static file, realizing unified authority management of the file through setting an access authority and a verification parameter, greatly reducing research and development resources and hardware storage resources and avoiding authority conflict during file access.
In an embodiment, the searching module 50 is further configured to search a routing cache for routing information corresponding to the flag bit information; determining path information corresponding to the target file according to the routing information; and searching a target file data stream corresponding to the target file from a file cache according to the path information.
In one embodiment, the file resource management device further comprises a detection module;
the detection module is used for detecting whether the route cache has the route information corresponding to the mark bit information; if the routing cache is detected to have the routing information corresponding to the marker bit information, executing a step of searching the routing information corresponding to the marker bit information from the routing cache; if the routing cache is detected to have no routing information corresponding to the marking bit information, the routing information corresponding to the marking bit information is obtained from a preset database, and the routing information is stored in the routing cache.
In an embodiment, the detection module is further configured to detect whether a target file data stream corresponding to the target file exists in a file cache; if the target file data stream corresponding to the target file exists in the file cache, searching the target file data stream corresponding to the target file from the file cache according to the path information; and if the target file data stream corresponding to the target file does not exist in the file cache, acquiring the target file data stream corresponding to the target file from a distributed file server according to the path information.
In one embodiment, the file resource management device further comprises a management module;
the management module is used for generating a management verification parameter according to the resource management request when receiving the resource management request; determining a management service parameter and a management authority verification parameter according to the management verification parameter; determining the resource management authority corresponding to the resource management request according to the management service parameters and the management authority verification parameters; and correspondingly managing the target file according to the resource management authority.
In an embodiment, the management module is further configured to, when the resource management permission is an update permission, increase application times corresponding to the target file according to flag bit information of the target file, write service module information associated with the target file into a service information log, and adjust a file state of the target file to an effective state; when the resource management authority is the abandoning authority, reducing the application times corresponding to the target file according to the flag bit information of the target file, deleting the cache file corresponding to the target file when the application times are reduced to preset times, and adjusting the file state of the target file to be an invalid state;
and when the resource management authority is a deletion authority, deleting the entity file corresponding to the target file, and adjusting the file state of the target file to be a deleted state.
In an embodiment, the file resource management device further comprises an adjustment module;
the adjusting module is used for acquiring the service attribute of the target file; determining a cache state corresponding to the target file data stream according to the service attribute; and adjusting the storage state of the target file data stream according to the cache state.
Since the present apparatus employs all technical solutions of all the above embodiments, at least all the beneficial effects brought by the technical solutions of the above embodiments are achieved, and are not described in detail herein.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the file resource management method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A file resource management method is characterized by comprising the following steps:
when a resource access request is received, generating an access check parameter according to the resource access request;
determining an access service parameter and an access authority verification parameter according to the access verification parameter;
judging whether the resource access request has corresponding operation authority or not according to the access service parameters and the access authority verification parameters;
when the resource access request has corresponding operation right, acquiring mark bit information of a target file corresponding to the resource access request according to the access service parameter;
and searching a target file data stream corresponding to the target file from a cache according to the marking bit information.
2. The file resource management method according to claim 1, wherein said searching for the target file data stream corresponding to the target file from the cache according to the flag bit information comprises:
searching the routing information corresponding to the marking bit information from a routing cache;
determining path information corresponding to the target file according to the routing information;
and searching a target file data stream corresponding to the target file from a file cache according to the path information.
3. The file resource management method according to claim 2, wherein before searching the routing information corresponding to the flag bit information from the routing cache, the method further comprises:
detecting whether the routing information corresponding to the marking bit information exists in a routing cache or not;
if the routing cache is detected to have the routing information corresponding to the marker bit information, executing a step of searching the routing information corresponding to the marker bit information from the routing cache;
if the routing cache is detected to have no routing information corresponding to the marking bit information, the routing information corresponding to the marking bit information is obtained from a preset database, and the routing information is stored in the routing cache.
4. The file resource management method according to claim 2, wherein before searching for the target file data stream corresponding to the target file from the file cache according to the path information, the method further comprises:
detecting whether a target file data stream corresponding to the target file exists in a file cache;
if the target file data stream corresponding to the target file exists in the file cache, searching the target file data stream corresponding to the target file from the file cache according to the path information;
and if the target file data stream corresponding to the target file does not exist in the file cache, acquiring the target file data stream corresponding to the target file from a distributed file server according to the path information.
5. The file resource management method according to claim 1, wherein after searching for the target file data stream corresponding to the target file from the cache according to the flag bit information, the method further comprises:
when a resource management request is received, generating a management verification parameter according to the resource management request;
determining a management service parameter and a management authority verification parameter according to the management verification parameter;
determining the resource management authority corresponding to the resource management request according to the management service parameters and the management authority verification parameters;
and correspondingly managing the target file according to the resource management authority.
6. The file resource management method of claim 5, wherein the managing the object file according to the resource management authority comprises:
when the resource management authority is an updating authority, increasing the application times corresponding to the target file according to the mark bit information of the target file, writing the service module information associated with the target file into a service information log, and adjusting the file state of the target file to be an effective state;
when the resource management authority is the abandoning authority, reducing the application times corresponding to the target file according to the flag bit information of the target file, deleting the cache file corresponding to the target file when the application times are reduced to preset times, and adjusting the file state of the target file to be an invalid state;
and when the resource management authority is a deletion authority, deleting the entity file corresponding to the target file, and adjusting the file state of the target file to be a deleted state.
7. The file resource management method according to any one of claims 1 to 6, wherein after searching for the target file data stream corresponding to the target file from the cache according to the flag bit information, the method further comprises:
acquiring the service attribute of the target file;
determining a cache state corresponding to the target file data stream according to the service attribute;
and adjusting the storage state of the target file data stream according to the cache state.
8. A file resource management apparatus, characterized in that the file resource management apparatus comprises:
the generation module is used for generating an access check parameter according to a resource access request when the resource access request is received;
the extraction module is used for determining an access service parameter and an access authority verification parameter according to the access verification parameter;
the judging module is used for judging whether the resource access request has corresponding operation authority according to the access service parameter and the access authority checking parameter;
the reading module is used for acquiring the marking bit information of the target file corresponding to the resource access request according to the access service parameter when the resource access request has the corresponding operation right;
and the searching module is used for searching the target file data stream corresponding to the target file from the cache according to the marking bit information.
9. A file resource management device characterized by comprising: a memory, a processor and a file asset management program stored on the memory and executable on the processor, the file asset management program being configured to implement the file asset management method of any of claims 1 to 7.
10. A storage medium having stored thereon a file asset management program which, when executed by a processor, implements a file asset management method according to any one of claims 1 to 7.
CN202110669015.7A 2021-06-16 2021-06-16 File resource management method, device, equipment and storage medium Pending CN113268774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110669015.7A CN113268774A (en) 2021-06-16 2021-06-16 File resource management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110669015.7A CN113268774A (en) 2021-06-16 2021-06-16 File resource management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113268774A true CN113268774A (en) 2021-08-17

Family

ID=77235354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110669015.7A Pending CN113268774A (en) 2021-06-16 2021-06-16 File resource management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113268774A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301234A (en) * 2013-07-16 2015-01-21 腾讯科技(深圳)有限公司 Routing method and routing device
CN104901979A (en) * 2014-03-04 2015-09-09 北京奇虎科技有限公司 Method and device for downloading application program files
CN110704375A (en) * 2019-09-26 2020-01-17 深圳前海大数金融服务有限公司 File management method, device, equipment and computer storage medium
CN110837648A (en) * 2019-10-23 2020-02-25 云深互联(北京)科技有限公司 Document processing method, device and equipment
CN112818371A (en) * 2021-02-23 2021-05-18 建信金融科技有限责任公司 Resource access control method, system, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301234A (en) * 2013-07-16 2015-01-21 腾讯科技(深圳)有限公司 Routing method and routing device
CN104901979A (en) * 2014-03-04 2015-09-09 北京奇虎科技有限公司 Method and device for downloading application program files
CN110704375A (en) * 2019-09-26 2020-01-17 深圳前海大数金融服务有限公司 File management method, device, equipment and computer storage medium
CN110837648A (en) * 2019-10-23 2020-02-25 云深互联(北京)科技有限公司 Document processing method, device and equipment
CN112818371A (en) * 2021-02-23 2021-05-18 建信金融科技有限责任公司 Resource access control method, system, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
驻云科技 等著: "《阿里云运维架构实践秘籍》", 30 April 2020 *

Similar Documents

Publication Publication Date Title
KR101422859B1 (en) Permission-based document server
US10956652B2 (en) Support for non-native file types in web application environment
US8719691B2 (en) Document providing system and computer-readable storage medium
US8645866B2 (en) Dynamic icon overlay system and method of producing dynamic icon overlays
US8078693B2 (en) Inserting a multimedia file through a web-based desktop productivity application
US20160041714A1 (en) Method and apparatus for widget and widget-container distribution control based on content rules
US20080109908A1 (en) Reverse Name Mappings In Restricted Namespace Environments
US8799321B2 (en) License management apparatus, license management method, and computer readable medium
CN114641768A (en) Controlling access to cloud resources in data using cloud-enabled data tagging and dynamic access control policy engine
US20160337427A1 (en) Asset streaming and delivery
CN105516059A (en) Resource access control method and device
CN110555015A (en) Database entity management method and device, electronic equipment and storage medium
CN114564922A (en) Document editing method and device, computer equipment and storage medium
US9665732B2 (en) Secure Download from internet marketplace
JP2014219708A (en) Information processing device, information processing method, and program
CN113268774A (en) File resource management method, device, equipment and storage medium
JP2006285714A (en) Web content browsing/editing system, web content browsing/editing method and web content browsing/editing program
US11010346B2 (en) Methods and apparatus for managing access to file content
JP6178119B2 (en) Data migration system and data migration method
JP5430618B2 (en) Dynamic icon overlay system and method for creating a dynamic overlay
CN114840868B (en) Data access method and device, electronic equipment and computer readable storage medium
JP3982969B2 (en) Document management device
JP4882550B2 (en) Object management system, object management method, and computer program
JP4489634B2 (en) Web server system using Java servlet
CN116805077A (en) Service providing method, device and equipment for related documents in credit management flow

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210817