Cache enabling management method for NAS and related device
By querying the configuration information of the NAS server by the NAS client, local cache management for personalized configuration on the NAS client according to the granularity of the business and file system is realized, solving the problem of rigid cache management in the existing technology, and improving the flexibility and efficiency of cache management.
Patent Information
- Application Number
- PCT/CN2024/109385
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-21
- Filing Date
- 2024-08-02
- Publication Date
- 2025-08-28
AI Technical Summary
Existing NAS clients cannot personalize the configuration to enable or turn off local cache functions according to the needs of different services, resulting in rigid cache management methods and unable to meet the differentiated needs of different services.
Through the NAS client, query the NAS server for the corresponding configuration information of the service, determine whether to enable the local cache function based on the configuration information, and perform personalized configuration on the granularity of the file system, supporting differentiated management of different services and data types.
It realizes flexible activation or shutdown of local cache according to business needs, improves the flexibility and efficiency of cache management, and meets the personalized configuration needs of different businesses.
Smart Images

Figure CN2024109385_28082025_PF_FP_ABST
Abstract
Description
A NAS cache activation management method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 21, 2024, with application number 202410194969.0 and application name “A NAS cache enabling management method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a NAS cache activation management method and related devices. Background Art
[0003] With the development of network attached storage (NAS) technology, multiple NAS-based services can be deployed on the same NAS client. Different services may have different requirements. For example, Service 1 and Service 2 are deployed on the same NAS client. Service 1 reads a large amount of data each time and wants the client to cache the read file data for a period of time. The next time it is used, it can directly read from the client's cache instead of sending a request to the server to read the data each time. In other words, Service 1 wants to use the local cache function. Service 2, on the other hand, wants to update the file data modified on the server immediately, which means that Service 2 does not want to use the local cache function.
[0004] In related technologies, when a service on a NAS client requires caching, the caching function can be enabled on the client. However, enabling caching does not benefit all applications. Once caching is enabled, other services on the NAS client will have to use caching even if they do not require it. Clearly, this approach to cache management is too rigid.
[0005] Summary of the Invention
[0006] The present application provides a NAS cache activation management method and related devices, which utilize a NAS server to implement differentiated management of whether to enable the local cache function.
[0007] A first aspect of the present application provides a NAS cache activation management method, which is applied to an application scenario based on NAS technology. In this method, a NAS client is deployed with multiple services that utilize NAS technology, and a first service is any one of the multiple services that utilize NAS technology. When the NAS client wishes to obtain configuration information corresponding to the first service, the NAS client sends a first query request corresponding to the first service to a NAS server, where the first query request is used to obtain the configuration information corresponding to the first service.
[0008] The NAS client can receive the first configuration information fed back by the NAS server, and then when the first service in the NAS client generates a read instruction or a write instruction, determine whether to enable the local cache function of the first service according to the first configuration information, wherein the first configuration information is used to indicate whether to enable the local cache function of the first service; illustratively, the local cache function of the first service is used to cache data generated by the first service and need to be stored on the NAS server and / or data read from the NAS server based on the first service.
[0009] Among the multiple services deployed by the NAS client, the configuration information corresponding to at least two different services is different. For example, among all the services included in the multiple services deployed by the NAS client, the configuration information corresponding to some services may be the same, that is, the configuration of whether to enable the local cache function for some of the aforementioned multiple services may be the same, but the configuration information corresponding to at least two different services in the aforementioned multiple services is different. For example, the NAS client deploys services 1, 2, 3, and 4. Service 1 corresponds to configuration information 1, service 2 corresponds to configuration information 2, service 3 corresponds to configuration information 3, service 4 corresponds to configuration information 4, and service 5 corresponds to configuration information 5. Configuration information 1 and configuration information 2 have different configurations regarding whether to enable the local cache function, while configuration information 1, configuration information 3, and configuration information 4 may have the same configurations regarding whether to enable the local cache function. It should be understood that the example here is only for the convenience of understanding the concept of "the configuration information corresponding to at least two different services in the multiple services is different." The "configuration information" here can be one of "enabling local cache" and "not enabling local cache."
[0010] When multiple services are deployed on a NAS client, if the NAS client lacks configuration items for the local cache function, multiple services on the NAS client will only be able to share the default configuration information on the NAS client, resulting in the inability to meet the personalized configuration requirements of the local cache function corresponding to different services. In this implementation, the NAS client is personalized according to the specific needs of the service, and the local cache function can be enabled / disabled for different services in a differentiated manner, thereby meeting the personalized needs of different services. Specifically, the NAS server records the requirements of different services on whether to enable cache, and the NAS client obtains this requirement by sending a query request to the NAS server, and then starts (or does not start) the client local cache for the specific service according to this instruction.
[0011] In one possible implementation, the method further includes: the NAS client sending a second query request corresponding to a second service to the NAS server, receiving second configuration information corresponding to the second service fed back by the NAS server, and then determining not to enable a local cache function for the second service based on the second configuration information. The second service is one of multiple services deployed by the NAS client that is different from the first service, and the second query request is used to obtain configuration information corresponding to the second service, wherein the second configuration information is different from the first configuration information, the first configuration information corresponding to the first service specifically indicating that the local cache function of the first service is enabled, and the second configuration information corresponding to the second service specifically indicating that the local cache function of the second service is disabled.
[0012] For example, when a first service in a NAS client generates a read / write instruction, the NAS client determines to enable the local cache function based on the first configuration information fed back by the NAS server, and can then determine how to use the local cache function of the first service. When a second service in the NAS client generates a read / write instruction, the NAS client determines to disable the local cache function based on the second configuration information fed back by the NAS server, and can then determine how to implement the data read / write operation without using the local cache function.
[0013] In this implementation, the NAS client can not only obtain the first configuration information corresponding to the first service, but also obtain the second configuration information corresponding to the second service, where the second configuration information is different from the first configuration information, that is, the first configuration information indicates to enable the local cache function of the first service, and the second configuration information indicates not to enable the local cache function of the second service, which further clarifies that the local cache function can be enabled / disabled for personalized configurations of different services, thereby meeting the personalized needs of different services.
[0014] In one possible implementation, when data generated by a first service is stored in at least one first file system of a NAS server, and the received first configuration information includes at least one first configuration information corresponding one-to-one to the at least one first file system, the NAS client determines, based on the first configuration information, whether to enable a local cache function for the first service. This may include: when the first service in the NAS client generates a read / write instruction, the NAS client determining that the storage location corresponding to the read / write instruction belongs to a target file system in the at least one first file system; the NAS client may obtain target configuration information corresponding to the target file system from the at least one first configuration information corresponding one-to-one to the at least one first file system, and further determine, based on the target configuration information, whether to enable the local cache function for the first service. That is, the target configuration information is configuration information corresponding to the target file system in the at least one first configuration information, the at least one first file system includes the target file system, and the target file system is the file system to which the storage location corresponding to the read / write instruction generated by the first service in the NAS client belongs.
[0015] In this implementation, the NAS server enables / disables the local cache function on the NAS client according to the data configuration in different file systems, and the data generated by each business will be stored in the file system managed by the NAS server. Since the data generated by the first business is stored in the first file system, when the NAS client sends a query request corresponding to the first business to the NAS server, the NAS client can obtain the configuration information of the first file system, thereby realizing personalized configuration of different businesses by enabling / disabling the local cache function on the NAS client according to different file system configurations. When the first business in the NAS client generates a read / write instruction, it will first determine the storage location of the data to be read / written. To which target file system it belongs, and then based on the target configuration information corresponding to the target file system, determine whether to enable the local cache function; since file systems are often managed based on the characteristics of data, the data stored in the same file system often have the same characteristics, and the data in the same file system often have the same requirements for enabling / disabling the local cache function, that is, either there is a requirement to enable the local cache of the NAS client when reading / writing data to a certain file system, or there is a requirement to disable the local cache of the NAS client when reading / writing data to a certain file system. Therefore, configuring whether to enable the local cache function at the granularity of the file system is conducive to better meeting the personalized configuration requirements for the local cache function.
[0016] In one possible implementation, in this method, the NAS client may also determine that the data generated by the first service is stored in at least one first file system of the NAS server, and then determine a first query request corresponding to the first service. The aforementioned first query request corresponding to the first service includes identification information of each first file system in the at least one first file system. The identification information of each first file system included in the query request is used to indicate the acquisition of first configuration information corresponding to each first file system.
[0017] Since a NAS server is in communication with multiple NAS clients, if the NAS server determines in which file systems the data generated by a specific service is stored after receiving a query request corresponding to the specific service from the NAS client, the NAS server needs to process the query request from each NAS client, which greatly increases the workload of the NAS server. In this implementation, each NAS client determines in which file systems of the NAS server the data generated by the first service is stored and carries the identification information of the aforementioned file systems in the query request. The NAS server can then directly determine which file system configuration information to feed back to the NAS client based on the identification information carried in the query request. This helps the NAS client obtain the configuration information more quickly, which in turn helps improve the efficiency of the entire process.
[0018] In one possible implementation, the first configuration information is updateable, and the update operation of the first configuration information is performed by the NAS server. Because the need for enabling the local cache function for data generated by a specific service may change during the use of a specific service, in this implementation, the configuration information corresponding to the specific service can be modified by the NAS server, which is conducive to further improving the flexibility of the cache management method and better meeting the personalized configuration requirements of the local cache function.
[0019] In one possible implementation, the first configuration information includes at least one of the following items: first sub-information, the first sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for a directory; second sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for a file attribute; and third sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for file data.
[0020] In this implementation, the first sub-information, the second sub-information and the third sub-information correspond to directories, file attributes and file data, respectively. That is to say, the data generated by the same business can be further divided into directories, file attributes and file data, and personalized configuration can be performed at a finer-grained level to enable / disable the local cache function. This can not only meet the personalized needs of different businesses for local cache, but also meet the personalized needs of different types of data generated by the same business for local cache, which is conducive to further improving the flexibility of cache management.
[0021] In one possible implementation, when the first configuration information indicates that the local cache function of the first service is enabled, the first configuration information also indicates the effective caching time of the data in the enabled cache. Exemplarily, the first configuration information also includes at least one of the following: first time information corresponding to a directory, second time information corresponding to a file attribute, or third time information corresponding to the file data. The first time information indicates the effective time of the directory cached in the NAS client, the second time information indicates the effective time of the file attribute cached in the NAS client, and the third time information indicates the effective time of the file data cached in the NAS client.
[0022] In this implementation, when the local cache function of a specific business is enabled, the effective cache time of the data in the enabled cache can also be personalized, thereby further improving the flexibility of the local cache management method, and is also conducive to meeting more personalized configuration requirements for local cache, and is also conducive to improving the user stickiness of this solution.
[0023] In one possible implementation, the method further includes: the NAS server receiving a first query request corresponding to a first service sent by a NAS client; in response to the received first query request, obtaining first configuration information corresponding to the first service from a plurality of pre-stored configuration information; and then sending the first configuration information to the NAS client, wherein the first query request is used to obtain the configuration information corresponding to the first service, and the first configuration information is used to indicate whether to enable a local cache function for the first service. This implementation provides not only the implementation steps for the NAS client but also the implementation steps for the NAS server, thereby improving the completeness of the solution.
[0024] A second aspect of the present application provides a method for managing NAS cache activation, which is applied to an application scenario based on NAS technology. In this method, a NAS server may receive a first query request corresponding to a first service from a NAS client, the first query request being used to obtain configuration information corresponding to the first service. In response to the received first query request, the NAS server obtains first configuration information corresponding to the first service from multiple pre-stored configuration information, and then sends the first configuration information to the NAS client, the first configuration information being used to indicate whether to enable the local cache function for the first service.
[0025] In one possible implementation, the method further includes: the NAS server receiving a second query request corresponding to the second service sent by the NAS client, the second query request being used to obtain configuration information corresponding to the second service, the NAS client having multiple services deployed therein, the first service being any one of the multiple services, and the second service being one of the multiple services different from the first service; in response to the received second query request, the NAS server obtaining second configuration information corresponding to the second service from the multiple pre-stored configuration information, and then sending the second configuration information to the NAS client, the second configuration information being used to indicate whether a local cache function of the second service is enabled, wherein the second configuration information is different from the first configuration information.
[0026] In one possible implementation, when multiple pieces of configuration information correspond one-to-one to multiple file systems of a NAS server, and because data generated by a first service is stored in at least one first file system included in the multiple file systems, a first query request corresponding to the first service can be used to obtain first configuration information corresponding to each first file system. The NAS server, in response to the received first query request, obtains the first configuration information corresponding to the first service from the multiple pre-stored pieces of configuration information, which may include: the NAS server, in response to the received first query request, obtains the first configuration information corresponding to each first file system from the multiple pieces of pre-stored configuration information corresponding one-to-one to the multiple file systems of the NAS server.
[0027] In one possible implementation, when a first query request corresponding to a first service includes identification information of each first file system in at least one first file system, the NAS server obtains, in response to the received first query request, the first configuration information corresponding to the first service from a plurality of pre-stored configuration information. This may include: the NAS server obtains, based on the identification information of the first file system in the first query request, the first configuration information corresponding to the first file system from a plurality of pre-stored configuration information corresponding one-to-one to the plurality of file systems of the NAS server.
[0028] In one possible implementation, the method further includes: the NAS server obtaining a configuration operation via a display interface, and then determining the plurality of pre-stored configuration information in response to the obtained configuration operation. In this implementation, since the NAS server provides a display interface for obtaining configuration information, users can conveniently input configuration operations via this display interface to meet the personalized needs of different businesses for local caching. Furthermore, users can conveniently configure the local cache according to their actual needs through this display interface, which helps improve user engagement of this solution.
[0029] In one possible implementation, the method further includes: the NAS server acquiring a modification operation through a display interface, and then updating the first configuration information in response to the acquired modification operation to obtain updated first configuration information.
[0030] The meanings of the terms in the second aspect of this application and the beneficial effects brought about can be referred to the first aspect and will not be repeated here.
[0031] The third aspect of the present application provides a NAS cache activation management device, which is applied to an application scenario based on NAS technology. The NAS cache activation management device is deployed on a NAS client, and at least one service is deployed in the NAS client. The NAS cache activation management device includes: a sending module, which is used to send a first query request corresponding to a first service to a NAS server, wherein the NAS client is deployed with multiple services, the first service is any one of the multiple services, and the first query request is used to obtain configuration information corresponding to the first service, wherein the configuration information corresponding to at least two different services in the multiple services is different; a receiving module, which is used to receive first configuration information fed back by the NAS server, the first configuration information is used to indicate whether to enable the local cache function of the first service; and a determining module, which is used to determine whether to enable the local cache function of the first service based on the first configuration information.
[0032] In the third aspect of the present application, the NAS cache activation management device can also be used to execute the steps performed by the NAS client in the first aspect and various possible implementations of the first aspect. The specific implementation methods, meanings of terms, and beneficial effects of the steps in the third aspect can all be referred to in the first aspect and will not be repeated here.
[0033] A fourth aspect of the present application provides a NAS cache activation management device, which is applied to an application scenario based on NAS technology. The NAS cache activation management device is deployed on a NAS server and includes: a receiving module for receiving a first query request corresponding to a first service sent by a NAS client, the first query request being used to obtain configuration information corresponding to the first service; an acquiring module for, in response to the received first query request, obtaining first configuration information corresponding to the first service from multiple pre-stored configuration information; and a sending module for sending the first configuration information to the NAS client, the first configuration information being used to indicate whether to enable a local cache function for the first service.
[0034] In the fourth aspect of the present application, the NAS cache activation management device can also be used to execute the steps performed by the NAS server in the second aspect and various possible implementation methods of the second aspect. The specific implementation methods, meanings of terms, and beneficial effects of the steps in the fourth aspect can all be referred to the second aspect and will not be repeated here.
[0035] In a fifth aspect, the present application provides a NAS cache enabling management system, which includes a NAS client and a NAS server. The NAS client is deployed with the NAS cache enabling management device described in the third aspect above, and the NAS server is deployed with the NAS cache enabling management device described in the fourth aspect above.
[0036] A sixth aspect of the present application provides a device comprising a processor and a memory: the memory is used to store instructions; the processor is used to enable a computing device cluster to execute the method described in the first aspect or the second aspect according to the instructions.
[0037] The seventh aspect of the present application provides a computer storage medium, which stores one or more instructions. When the instructions are executed by one or more computers, the one or more computers implement the method described in the first aspect or the second aspect.
[0038] An eighth aspect of the present application provides a computer program product, which stores instructions. When the instructions are executed by a computer, the computer implements the method described in the first aspect or the second aspect.
[0039] The second to eighth aspects of this application correspond to various possible methods of the first aspect and have corresponding beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] FIG1 is a schematic diagram of a network architecture based on NAS technology provided by this application;
[0041] FIG2 is a flow chart of a NAS cache activation management method provided in an embodiment of the present application;
[0042] FIG3 is a schematic diagram of an interface for obtaining configuration operations provided in an embodiment of the present application;
[0043] FIG4 is a schematic diagram of another interface for obtaining configuration operations provided in an embodiment of the present application;
[0044] FIG5 is another flowchart of a NAS cache activation management method provided in an embodiment of the present application;
[0045] FIG6 is another flowchart of a NAS cache activation management method provided in an embodiment of the present application;
[0046] FIG7 is another flowchart of a NAS cache activation management method provided in an embodiment of the present application;
[0047] FIG8 is a schematic diagram of an operation for obtaining a modification of first configuration information provided by an embodiment of the present application;
[0048] FIG9 is a schematic structural diagram of a NAS cache activation management device provided in an embodiment of the present application;
[0049] FIG10 is another structural diagram of a NAS cache activation management device provided in an embodiment of the present application;
[0050] FIG11 is a schematic structural diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The following describes the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present application, rather than all of the embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0052] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0053] In the embodiments of the present application, "sending" and "receiving" indicate the direction of signal transmission. For example, "sending information to XX device" can be understood as the destination of the information being XX device, which can include direct sending through the air interface, as well as indirect sending through the air interface by other units or modules. "Receiving information from YY device" can be understood as the source of the information being YY device, which can include direct receiving from YY device through the air interface, as well as indirect receiving from YY device through the air interface from other units or modules. "Sending" can also be understood as the "output" of the chip interface, and "receiving" can also be understood as the "input" of the chip interface. In other words, sending and receiving can be performed between devices or within a device, for example, between components, modules, chips, software modules or hardware modules within the device through a bus, trace or interface. It is understandable that information may undergo necessary processing, such as encoding, modulation, etc., between the source and destination of the information, but the destination can understand the valid information from the source. Similar expressions in this application can be understood similarly and will not be repeated.
[0054] In the embodiments of the present application, "indication" may include direct indication and indirect indication, and may also include explicit indication and implicit indication. The information indicated by a certain information (such as the indication information described below) is called information to be indicated. In the specific implementation process, there are many ways to indicate the information to be indicated, such as but not limited to, the information to be indicated can be directly indicated, such as the information to be indicated itself or the index of the information to be indicated. The information to be indicated can also be indirectly indicated by indicating other information, wherein there is an association between the other information and the information to be indicated; it is also possible to indicate only a part of the information to be indicated, while the other parts of the information to be indicated are known or agreed in advance, for example, the indication of specific information can be achieved with the help of the arrangement order of each information agreed in advance (such as predefined by the protocol), thereby reducing the indication overhead to a certain extent. The present application does not limit the specific method of indication. It is understandable that, for the sender of the indication information, the indication information can be used to indicate the information to be indicated, and for the receiver of the indication information, the indication information can be used to determine the information to be indicated.
[0055] The method provided in this application can be applied to various scenarios using network attached storage (NAS) technology, wherein an architecture based on NAS technology includes a NAS client and a NAS server. One or more NAS-based services can be deployed in the NAS client. For the convenience of description, any one of the one or more NAS-based services is referred to as a "first service." Files generated by the first service are mounted to a first file system of the NAS server. Data generated by the first service can be written to at least one first file system of the NAS server corresponding to the first service, and the first service can read data from the first file system. The "first file system of the NAS server" can also be understood as a "first file system accessible to the NAS server" or a "first file system manageable by the NAS server."
[0056] For example, a NAS client can be specifically manifested as a container, in which one or more services using NAS technology run; for another example, a NAS client can be manifested as an application, which includes one or more services using NAS technology, etc. The specific product form of the "NAS client" can be determined in combination with the actual application scenario and is not limited in the embodiments of the present application.
[0057] There is a many-to-many relationship between "NAS technology-based services" and "NAS server file systems". For example, files generated by different services on a NAS client can be mounted to the same file system on a NAS server, and files generated by the same service on a NAS client can also be mounted to different file systems.
[0058] To understand this solution more intuitively, the following example is given in conjunction with Figure 1. Figure 1 is a schematic diagram of a network architecture based on NAS technology provided by this application. In Figure 1, taking the deployment of services 1, 2, and 3 on a NAS client as an example, the data generated by service 1 is stored in file system 1 and file system 2 of the NAS server, that is, the files generated by service 1 are mounted on file system 1 and file system 2; the data generated by service 2 is stored in file system 2 of the NAS server, that is, the files generated by service 2 are mounted on file system 2; the data generated by service 3 is stored in file system 3 of the NAS server, that is, the files generated by service 3 are mounted on file system 3. As shown in Figure 1, files generated by the same service can be mounted on different file systems of the NAS server, and files generated by different services can also be mounted on the same file system of the NAS server. It should be understood that a NAS server can be connected to multiple NAS clients, each NAS client can be deployed with more or fewer services, and the NAS server can manage more or fewer file systems. The example in Figure 1 is only for the convenience of understanding this solution and is not used to limit this solution.
[0059] When a service on a NAS client generates a read / write instruction for data, it may want to enable or disable the local cache function. Different services may have different requirements for the local cache function; for example, Service 1 may want to enable the local cache function, while Service 2 may want to disable it. Because related technologies lack a "local cache function" configuration item on the NAS client, different services on the NAS client can only share the same default configuration information. Therefore, when a service on the NAS client requires the cache function, the local cache function can be enabled on the client. However, enabling the local cache function is not beneficial for all applications. Once the cache function is enabled, other services on the NAS client will have to use the cache function even if they do not need it. Clearly, this approach to cache management is too rigid.
[0060] To address the above issues, the present application provides a NAS cache activation management method. Specifically, please refer to FIG2 , which is a flow chart of a NAS cache activation management method provided in an embodiment of the present application. The NAS cache activation management method provided in an embodiment of the present application may include:
[0061] 201. The NAS server pre-acquires multiple configuration information.
[0062] In an embodiment of the present application, the NAS server needs to obtain multiple configuration information in advance, and each configuration information is used to indicate whether to enable the local cache function. In one case, the aforementioned multiple configuration information corresponds one-to-one to multiple file systems of the NAS server, and each file system of the NAS server corresponds to one configuration information; illustratively, since the NAS cache enablement management method provided by the present application is used to obtain the configuration information corresponding to the NAS technology-based service deployed on the NAS client, and the data generated by each service deployed on the NAS client will be stored in multiple file systems of the NAS server, then for any service using NAS technology on the NAS client (hereinafter referred to as "first service"), the acquisition method of the first configuration information corresponding to the first service may include at least one first configuration information corresponding one-to-one to the at least one first file system when the data generated by the first service is stored in at least one first file system of the NAS server.
[0063] In another case, the plurality of configuration information corresponds one-to-one to the plurality of services provided by the NAS server, that is, each service provided by the NAS server corresponds to one configuration information.
[0064] Among them, each configuration information is used to indicate whether the local cache function is enabled. The specific content of each first configuration information corresponding to any service (that is, the first service) is introduced below. For example, each first configuration information corresponding to the first service is used to indicate whether the local cache function of the first service on the NAS client is enabled. It can also be understood that each first configuration information indicates whether the local cache function of the first service on the NAS client is enabled when the first service in the NAS client generates a data access instruction to the NAS server. The data access instruction can be a write instruction for writing data to the NAS server, or it can be a read instruction for reading data from the NAS server. The "local cache function" in this application may also be referred to as a "local cache mechanism", "client cache function", "client cache mechanism" or other names, etc., which are not limited in the embodiments of this application.
[0065] For example, the data type can be a directory, file attributes, file data, or other types of data, that is, the first service in the NAS client can generate a read instruction or a write instruction for a directory, or a read instruction or a write instruction for a file attribute, or a read instruction or a write instruction for file data. For example, file attributes can include file name, file size, file modification time, or other attributes, and file data refers to the specific data contained in the file. It should be noted that the data generated by the first service can also be divided into types according to other granularities, such as dividing the data generated by the first service into two categories: directories and files. The specific types of "data types" can be determined in combination with actual application scenarios, and are not limited in the embodiments of the present application.
[0066] In one embodiment, the first configuration information may include configuration information corresponding to each type of data. Optionally, the first configuration information may include at least one of the following: first sub-information indicating whether to enable a local cache function when a first service in the NAS client generates a read / write instruction for a directory; second sub-information indicating whether to enable a local cache function when a first service in the NAS client generates a read / write instruction for a file attribute; and third sub-information indicating whether to enable a local cache function when a first service in the NAS client generates a read / write instruction for file data.
[0067] Furthermore, in one implementation, the first sub-information indicates that when the first service in the NAS client generates a read instruction or a write instruction for the directory, the local cache function is enabled, or the first sub-information indicates that when the first service in the NAS client generates a read instruction or a write instruction for the directory, the local cache function is turned off.
[0068] In another implementation, the first sub-information may include first information and second information, wherein the first information is used to indicate whether the local cache function is enabled when the first service in the NAS client generates a read instruction for the directory; and the second information is used to indicate whether the local cache function is enabled when the first service in the NAS client generates a write instruction for the directory.
[0069] The specific content of the "second sub-information" is similar to that of the "first sub-information", with the difference that "directory" is replaced by "file attributes"; the specific content of the "third sub-information" is similar to that of the "first sub-information", with the difference that "directory" is replaced by "file data", and will not be repeated here.
[0070] In an embodiment of the present application, the first sub-information, the second sub-information and the third sub-information correspond to directories, file attributes and file data, respectively. That is to say, the data generated by the same business can be further divided into directories, file attributes and file data, and personalized configuration can be performed at a finer-grained level to enable / disable the local cache function. This can not only meet the personalized needs of different businesses for local cache, but also meet the personalized needs of different types of data generated by the same business for local cache, which is conducive to further improving the flexibility of cache management.
[0071] In another case, the first configuration information indicates that when the first service in the NAS client generates a read instruction or a write instruction for any type of data, the local cache function is enabled; or, the first configuration information indicates that when the first service in the NAS client generates a read instruction or a write instruction for any type of data, the local cache function is disabled.
[0072] In another case, the first configuration information may include sub-information 1 and sub-information 2, where sub-information 1 indicates whether the local cache function is enabled when the first service in the NAS client generates a write instruction, and sub-information 2 indicates whether the local cache function is enabled when the first service in the NAS client generates a read instruction.
[0073] Optionally, when the first configuration information indicates enabling the local cache function of the first service, the first configuration information further indicates the effective cache time of the data in the enabled cache. For example, when the first service on the NAS client generates a write instruction, the "precedented data" can be understood as data generated by the first service on the NAS client and needing to be written to the NAS server; when the first service on the NAS client generates a read instruction, the "precedented data" can be understood as data read from the NAS server and cached locally.
[0074] For example, the cache data corresponding to the first service may include a directory, file attributes, file data, or other types of cache data, etc. For example, the validity period in this application may include a minimum time and a maximum time, or the validity period in this application may also include a single time, which may be flexibly determined in combination with actual application scenarios.
[0075] In one implementation, the first configuration information further includes at least one of the following: first time information corresponding to a directory, second time information corresponding to a file attribute, or third time information corresponding to file data. The first time information indicates the validity period of the directory cached in the NAS client, the second time information indicates the validity period of the file attribute cached in the NAS client, and the third time information indicates the validity period of the file data cached in the NAS client.
[0076] Furthermore, in one scenario, the first time information includes a first sub-time and a second sub-time. When a first service in a NAS client generates a write instruction for a directory, the first sub-time indicates the effective time for caching the directory in the NAS client. That is, after the first service in the NAS client generates the directory, it needs to synchronize the directory with the NAS server within the effective time indicated by the first sub-time. The second sub-time indicates the effective time for the directory read from the NAS server and cached on the NAS client.
[0077] In another case, the validity period of the first service generated directory in the NAS client is the same as the validity period of the directory cached in the NAS client, that is, the first time information includes one validity period.
[0078] The meaning of "second time information" is similar to that of "first time information", the difference is that the directory in the description of "first time information" is replaced by file attributes; the meaning of "third time information" is similar to that of "first time information", the difference is that the directory in the description of "first time information" is replaced by file data, which will not be repeated here.
[0079] In order to more intuitively understand the first configuration information, the first configuration information is exemplified below in combination with Table 1 and Table 2. It should be noted that in actual situations, other formats can be used to store the first configuration information, such as arrays, linked lists, etc. The example here is only given in the form of a table.
[0080] Table 1
[0081] As shown in Table 1, the first configuration information indicates that when the first business in the NAS client generates a write instruction for a directory, a write instruction for file data, and a read instruction for file data, the local cache function is turned off. That is, the first configuration information indicates that when the first business in the NAS client generates a write instruction for a directory, the aforementioned directory will be immediately synchronized to the NAS server corresponding to the first business; the first configuration information indicates that when the first business in the NAS client generates a write instruction for file data, the aforementioned file data will be immediately synchronized to the NAS server corresponding to the first business; the first configuration information indicates that when the first business in the NAS client generates a read instruction for file data, the data will be read directly from the NAS server corresponding to the first business according to the directory of the aforementioned file data.
[0082] The first configuration information indicates that when the first service in the NAS client generates a write instruction for file attributes, the local cache function is enabled, and the minimum validity period of the file attributes cached by the first service of the NAS client is 5 seconds, and the maximum validity period is 30 seconds. That is, the first configuration information indicates that when the first service in the NAS client generates a write instruction for file attributes, the aforementioned file attributes are synchronized to the NAS server corresponding to the first service after a minimum of 5 seconds and a maximum of 30 seconds.
[0083] The first configuration information indicates that when the first service in the NAS client generates a read instruction for a directory, the local cache function is enabled, and the minimum validity period of the directory cached on the NAS client is 20 seconds, and the maximum validity period is 60 seconds. That is, the first configuration information indicates that the directory cached on the NAS client will expire after a minimum of 20 seconds and a maximum of 60 seconds. After the aforementioned directory expires, it will be updated.
[0084] The first configuration information indicates that when a first service on the NAS client generates a read instruction for file data, the local cache function is enabled, and the validity period of the file attributes cached on the NAS client is 30 seconds. In other words, the first configuration information indicates that the file attributes cached on the NAS client will expire after 30 seconds, and the aforementioned file attributes will be updated after expiration. It should be noted that the example in Table 1 is only for convenience of understanding this solution. The specific information included in the first configuration information can be flexibly determined based on actual application scenarios and is not limited in the embodiments of this application.
[0085] Table 2
[0086] As shown in Table 2, the first configuration information indicates that when the first service in the NAS client generates a read instruction or a write instruction for a directory, the local cache function is enabled; the validity period of the directory cached in the NAS client by the first service is 20s, and the validity period of the directory cached on the NAS client generated by the first service is 20s. The first configuration information also indicates that when the first service in the NAS client generates a read instruction or a write instruction for a file attribute, the local cache function is enabled; the validity period of the file attribute cached in the NAS client by the first service is a minimum of 5s and a maximum of 30s; the validity period of the file attribute cached on the NAS client generated by the first service is a minimum of 5s and a maximum of 30s. The first configuration information also indicates that when the first service in the NAS client generates a read instruction or a write instruction for file data, the local cache function is turned off. It should be noted that the examples in Table 2 are only for the convenience of understanding this solution. The specific information contained in the first configuration information can be flexibly determined in combination with the actual application scenario, and is not limited in the embodiments of the present application.
[0087] In another implementation, the first configuration information also includes time information 1 and time information 2, where time information 1 indicates the effective time for the data to be written to be cached in the NAS client when the first service in the NAS client generates a write instruction; time information 2 indicates the effective time for the data to be read from the NAS server and cached on the NAS client.
[0088] In another implementation, the first configuration information further includes a validity period, which represents the validity period of any type of data cached in the NAS client and the validity period of any type of data read from the NAS server and cached on the NAS client.
[0089] In an embodiment of the present application, when the local cache function of a specific business is enabled, the effective cache time of the data in the enabled cache can also be personalized, thereby further improving the flexibility of the local cache management method, and is also conducive to meeting more aspects of personalized configuration requirements for the local cache, and is also conducive to improving the user stickiness of this solution.
[0090] Exemplarily, step 201 may include: the NAS server obtains a configuration operation input by a user through a display interface, and determines the at least one configuration information in response to the obtained configuration operation.
[0091] Furthermore, in one implementation, each file system of the NAS server corresponds to one configuration information, and step 201 may include: the NAS server obtains, through a display interface, a configuration operation input by the user for each file system in at least one file system, and then determines at least one configuration information corresponding one-to-one to the at least one file system of the NAS server.
[0092] To understand this solution more intuitively, please refer to Figures 3 and 4, which are two schematic diagrams of interfaces for obtaining configuration operations provided in an embodiment of the present application. First, refer to Figure 3, which shows a receiving interface for configuration operations inputted for file system 1. As shown in Figure 3, the NAS server displays icons corresponding to directories, file attributes, and file data through a display interface. The user can configure whether to enable the local cache function when writing directories to or reading directories from file system 1 by clicking the circular icon under "Yes" or "No"; whether to enable the local cache function when writing file attributes to or reading file attributes from file system 1; and whether to enable the local cache function when writing file data to or reading file data from file system 1.
[0093] Figure 3 also shows text boxes corresponding to directories, file attributes, and file data. The aforementioned text boxes are used to receive the effective time input by the user. If the user configures that the local cache function is enabled when writing directories to or reading directories from the file system 1, the user can also use this text box to enter the effective time of the directory cached on the NAS client. If the user configures that the local cache function is enabled when writing file attributes to or reading file attributes from the file system 1, the user can also use this text box to enter the effective time of the file attributes cached on the NAS client. If the user configures that the local cache function is enabled when writing file data to or reading file data from the file system 1, the user can also use this text box to enter the effective time of the file data cached on the NAS client. It should be understood that the example in Figure 3 is only for the convenience of understanding this solution and is not used to limit this solution.
[0094] Please continue to refer to Figure 4, which shows the receiving interface for the configuration operations of file system 1, file system 2, and file system 3. As shown in Figure 4, the configuration operation input by the user for file system 1 through the display interface may include: the user can configure whether to enable the local cache function when writing data to file system 1 or reading data from file system 1 by clicking the box in front of "Yes" or "No"; when the user configures to enable the local cache function when writing data to file system 1 or reading data from file system 1, the user can also enter the valid time of the data cached on the NAS client through the text box. The specific implementation method of the user inputting the configuration operation for file system 2 and the specific implementation method of the user inputting the configuration operation for file system 3 can refer to the above description of "the specific implementation method of the user inputting the configuration operation for file system 1", which will not be repeated here. It should be noted that the exemplary description here in combination with Figures 3 and 4 is only for the convenience of understanding this solution. The display interface for receiving configuration operations can also be specifically expressed in other forms, which are not limited in the embodiments of this application.
[0095] In the embodiment of the present application, since the NAS server provides a display interface for configuration operations to obtain configuration information, users can conveniently input configuration operations through the display interface to achieve personalized needs of different businesses for local cache, and users can very conveniently personalize the local cache according to their actual needs through the display interface, which is conducive to improving the user stickiness of this solution.
[0096] In another implementation, each of the at least one service of the NAS server corresponds to one piece of configuration information, and step 201 may include: the NAS server obtains, through a display interface, a configuration operation input by the user for each of the at least one service provided by the NAS server, and then determines at least one piece of configuration information corresponding one-to-one to the at least one service provided by the NAS server.
[0097] It should be noted that the NAS server can also obtain the above-mentioned at least one configuration information through other means. For example, the NAS server can receive the above-mentioned at least one configuration information sent by other devices, and then store the received at least one configuration information, etc. The specific steps of step 201 can be flexibly determined in combination with the actual application scenario, and are not limited in the embodiments of the present application.
[0098] 202. The NAS client sends a first query request corresponding to a first service to the NAS server, where the NAS client has multiple services deployed, the first service is any one of at least one service, and the first query request is used to obtain configuration information corresponding to the first service, where the configuration information corresponding to at least two different services among the multiple services is different.
[0099] In an embodiment of the present application, a NAS client may be deployed with multiple services, each of which utilizes NAS technology. For any first service among the multiple services, the NAS client may send a first query request corresponding to the first service to a NAS server corresponding to the first service. Correspondingly, the NAS server corresponding to the first service may receive the first query request corresponding to the first service sent by the NAS client deployed with the first service. For example, the "NAS server corresponding to the first service" may also be understood as a server that supports the first service.
[0100] In this application, a "service" may also be referred to as a "function." For example, a NAS client is a financial application, and one of the services utilizing NAS technology is a transfer service. When user A transfers funds to user B through the financial application, the remaining balance of user A stored on the NAS server corresponding to the transfer service needs to be reduced, while the remaining balance of user B stored on the NAS server corresponding to the transfer service needs to be increased.
[0101] For another example, the NAS client is specifically an enterprise management application. A service using NAS technology provided in the aforementioned enterprise management application may be an attendance service. User C (for example, a human resources department) can upload the employee's attendance statistics through the attendance service provided by the enterprise management application. The aforementioned attendance statistics need to be synchronized to the NAS server corresponding to the attendance service.
[0102] For example, a NAS client is a container that runs a mini-program for a game called D. This mini-program is based on NAS technology. When a user uses the mini-program, their game progress information is generated and stored on the NAS server corresponding to the mini-program. The container also runs a service that automatically backs up images to the cloud. New images generated on the device hosting the NAS client can be stored on the NAS server, and so on. It should be noted that the examples of "NAS client" and "service" here are provided solely to facilitate understanding of this solution and are not intended to limit it.
[0103] Among them, the configuration information corresponding to at least two different services among the multiple services deployed by the NAS client is different; illustratively, among all the services included in the multiple services deployed by the NAS client, the configuration information corresponding to some services may be the same, that is, the configuration of some services among the aforementioned multiple services regarding whether to enable the local cache function may be the same, but the configuration information corresponding to at least two different services among the aforementioned multiple services is different. For example, the NAS client deploys services 1, 2, 3, and 4, and service 1 corresponds to configuration information 1, service 2 corresponds to configuration information 2, service 3 corresponds to configuration information 3, service 4 corresponds to configuration information 4, and service 5 corresponds to configuration information 5. Configuration information 1 and configuration information 2 have different configurations regarding whether to enable the local cache function, while configuration information 1, configuration information 3, and configuration information 4 may have the same configurations regarding whether to enable the local cache function. It should be understood that the examples here are only for the convenience of understanding the concept of "different configuration information corresponding to at least two different services among the multiple services."
[0104] In one implementation, if multiple configuration information in the NAS server corresponds one-to-one to multiple file systems of the NAS server, the NAS client may further determine, before executing step 202, that data generated by a first service in the NAS client is stored in at least one first file system of the NAS server, and thereby determine a first query request corresponding to the first service. The first query request corresponding to the first service includes identification information of each first file system in the at least one first file system, and the identification information of the at least one first file system included in the first query request is used to instruct the acquisition of first configuration information corresponding one-to-one to the at least one first file system. That is, the at least one first configuration information corresponding to the first service includes first configuration information corresponding to each first file system in the at least one first file system.
[0105] For example, a NAS client may store first information indicating which file systems of the NAS server the data generated by each of at least one service deployed on the NAS client is stored in. When the NAS client determines that it needs to obtain configuration information corresponding to the first service, it may first determine, based on the first information, which file systems of the NAS server (i.e., at least one first file system) the data generated by the first service is stored in, and then determine that the identification information of each first file system is carried in the first query request corresponding to the first service. To further understand this solution, an example is provided in which at least one service deployed on the NAS client includes service 1, service 2, service 3, and service 4. The first information indicates that the data generated by service 1 is stored in file system 1 and file system 2 of the NAS server, the data generated by service 2 is stored in file system 2 of the NAS server, the data generated by service 3 is stored in file system 3 of the NAS server, and the data generated by service 4 is stored in file system 3 and file system 4 of the NAS server. If the first service is service 1, then after determining service 1, the NAS client can determine, based on the first information, that the data generated by service 1 will be stored in file system 1 and file system 2 of the NAS server, and can further determine that the first query request corresponding to service 1 includes identification information of file system 1 and identification information of file system 2. The identification information of file system 1 and the identification information of file system 2 included in the first query request are used to indicate to the NAS server that the NAS client wants the configuration information corresponding to file system 1 and the configuration information corresponding to file system 2. The configuration information corresponding to service 1 includes the aforementioned configuration information corresponding to file system 1 and the configuration information corresponding to file system 2. It should be understood that the examples herein are provided merely to facilitate understanding of this solution and are not intended to limit this solution.
[0106] Since a NAS server is in communication with multiple NAS clients, if the NAS server determines in which file systems the data generated by a specific service is stored after receiving a query request corresponding to the service from the NAS client, the NAS server would need to process the query request from each NAS client, significantly increasing the workload of the NAS server. In the embodiment of the present application, however, each NAS client determines in which file systems of the NAS server the data generated by the first service is stored and carries the identification information of the aforementioned file systems in the query request. The NAS server can then directly determine which file system configuration information to feed back to the NAS client based on the identification information carried in the query request. This helps the NAS client obtain the configuration information more quickly, thereby improving the efficiency of the entire process.
[0107] In another implementation, if multiple configuration information in the NAS server corresponds one-to-one to multiple file systems of the NAS server, the first query request corresponding to the first service may also include identification information of the first service. The identification information of the first service included in the first query request is used to instruct the NAS server to determine at least one first file system corresponding to the first service, and then determine the first configuration information of each first file system.
[0108] In another implementation, if multiple configuration information in the NAS server corresponds one-to-one to multiple services provided by the NAS server, then optionally, the first query request corresponding to the first service may include identification information of the first service, and the identification information of the first service included in the first query request is used to indicate that the NAS client wants the first configuration information of the first service.
[0109] 203. In response to the received first query request, the NAS server obtains first configuration information corresponding to the first service from a plurality of pre-stored configuration information.
[0110] In an embodiment of the present application, after receiving a first query request corresponding to a first service sent by a NAS client, the NAS server may obtain at least one first configuration information corresponding to the first service from a plurality of pre-stored configuration information in response to the received query request.
[0111] In one case, if the multiple configuration information pre-stored in the NAS server corresponds one-to-one to the multiple file systems of the NAS server, step 203 may include: the NAS server obtains, in response to the received query request, first configuration information corresponding to the first file system from the multiple pre-stored configuration information, wherein the data generated by the first service is stored in the at least one first file system of the NAS server, and the multiple file systems of the NAS server include the aforementioned at least one first file system.
[0112] Exemplarily, in one implementation, when the first query request corresponding to the first service includes identification information of each first file system in at least one first file system, step 203 may include: the NAS server may obtain first configuration information corresponding to each first file system from multiple pre-stored configuration information based on the identification information of each first file system in the at least one first file system included in the first query request, that is, obtain at least one first configuration information corresponding to the first service.
[0113] In another implementation, when the first query request corresponding to a first service includes identification information of the first service, the NAS server may be configured with second information indicating the file systems in which data generated by each of at least one service provided by the NAS server is stored. Step 203 may then include: the NAS server determining, based on the identification information of the first service and the second information, the first file systems in which the data generated by the first service is stored; and then obtaining first configuration information corresponding to each first file system, thereby obtaining at least one first configuration information corresponding to the first service.
[0114] In another case, if the multiple pre-stored configuration information in the NAS server corresponds one-to-one to the multiple services provided by the NAS server, and the first query request corresponding to the first service includes identification information of the first service, then in step 203, the NAS server may obtain a first configuration information corresponding to the first service from the multiple pre-stored configuration information based on the identification information of the first service.
[0115] 204. The NAS client receives first configuration information fed back by the NAS server, where the first configuration information is used to indicate whether to enable a local cache function of the first service.
[0116] In the embodiment of the present application, after obtaining at least one first configuration information corresponding to the first service, the NAS server may send the at least one first configuration information corresponding to the first service to the NAS client. In response, the NAS client may receive the at least one first configuration information corresponding to the first service. Each first configuration information corresponding to the first service is used to indicate whether to enable the cache function of the client of the first service. The specific content of "each first configuration information" can be found in the description of step 201 above and is not repeated here.
[0117] It should be noted that the embodiment of the present application does not limit the relationship between the execution frequency of step 201 and steps 202 to 204. For example, after executing step 201 once, steps 202 to 204 can be executed multiple times. That is, after the NAS server obtains at least one configuration information, the NAS client can obtain the first configuration information corresponding to the first service multiple times.
[0118] 205. The NAS client determines whether to enable a local cache function of the first service according to the first configuration information.
[0119] In an embodiment of the present application, after the NAS client obtains at least one first configuration information corresponding to the first service, when the first service in the NAS client generates a read instruction / write instruction, it can determine whether to enable the local cache function of the first service based on the at least one first configuration information corresponding to the first service.
[0120] Exemplarily, in one implementation, when data generated by a first service is stored in at least one first file system of a NAS server, and the at least one first configuration information received by the NAS client includes at least one first configuration information corresponding one-to-one to the at least one first file system, step 205 may include: when the first service in the NAS client generates a read / write instruction, the NAS client determining that the storage location corresponding to the read / write instruction belongs to a target file system in the at least one first file system; the NAS client may obtain target configuration information corresponding to the target file system from the at least one first configuration information corresponding one-to-one to the at least one first file system, and further determine whether to enable the local cache function of the first service based on the target configuration information, where the target configuration information is the configuration information corresponding to the target file system in the at least one first configuration information.
[0121] In the embodiment of the present application, the NAS server enables / disables the local cache function on the NAS client according to the data configuration in different file systems, and the data generated by each service is stored in the file system managed by the NAS server. Since the data generated by the first service is stored in the first file system, when the NAS client sends a query request corresponding to the first service to the NAS server, the NAS client can obtain the configuration information of the first file system, thereby realizing personalized configuration of different services by enabling / disabling the local cache function on the NAS client according to different file system configurations. When the first service in the NAS client generates a read / write instruction, it first determines the storage location of the data to be read / written. To which target file system it belongs, and then based on the target configuration information corresponding to the target file system, determine whether to enable the local cache function; since file systems are often managed based on the characteristics of the data, the data stored in the same file system often have the same characteristics, and the data in the same file system often have the same requirements for enabling / disabling the local cache function, that is, either there is a requirement to enable the local cache of the NAS client when reading / writing data to a certain file system, or there is a requirement to disable the local cache of the NAS client when reading / writing data to a certain file system. Therefore, configuring whether to enable the local cache function at the granularity of the file system is conducive to better meeting the personalized configuration requirements for the local cache function.
[0122] In another implementation, when the first configuration information received by the NAS client includes first configuration information corresponding one-to-one to the first service, step 205 may include: when the first service in the NAS client generates a read / write instruction, the NAS client determines whether to enable a local cache function of the first service based on the first configuration information corresponding to the first service.
[0123] Further, if the first configuration information (or target configuration information) includes the first sub-information, the second sub-information or the third sub-information, the NAS client determines whether to enable the local cache function of the first service based on the target configuration information (or a first configuration information corresponding to the first service), which may include: when the first service in the NAS client generates a read / write instruction for a directory, the NAS client determines whether to enable the local cache function based on the first sub-information; when the first service in the NAS client generates a read / write instruction for a file attribute, the NAS client determines whether to enable the local cache function based on the second sub-information; when the first service in the NAS client generates a read / write instruction for file data, the NAS client determines whether to enable the local cache function based on the third sub-information.
[0124] For example, when the first service in the NAS client generates a read / write instruction for a directory, if the first configuration information indicates to turn off the local cache function of the first service, the NAS client can directly send the read instruction for the directory to the NAS server, and then receive the directory sent by the NAS server; or, the NAS client can directly send the write instruction for the directory to the NAS server to write the directory to the NAS server.
[0125] When the first service in the NAS client generates a read / write instruction for a directory, if the first configuration information indicates that the local cache function of the first service is enabled, optionally, the first configuration information further indicates the effective cache time of the data in the enabled cache, then when the first service in the NAS client generates a read / write instruction for the directory, if the first sub-information indicates that the local cache function is enabled, the NAS client may also determine the effective time of the directory cached in the NAS client according to the target configuration information (or a first configuration information corresponding to the first service).
[0126] Optionally, the NAS client may determine the validity period of the directory cached in the NAS client according to the first time information in the target configuration information (or a first configuration information corresponding to the first service).
[0127] Furthermore, if the first service in the NAS client generates a read instruction for the directory, the NAS client can obtain the actual cache duration of the directory cached on the NAS client, and determine whether the aforementioned actual cache duration is within the aforementioned valid time. If the judgment result is yes, that is, the directory cached on the NAS client is valid, the directory can be read from the data cached on the NAS client; if the judgment result is no, that is, the directory cached on the NAS client is invalid, the read instruction for the directory can be sent to the NAS server, and then the directory sent by the NAS server is received, and the directory sent by the NAS server is cached on the NAS client.
[0128] If the first service in the NAS client generates a directory write instruction, the NAS client can first cache the generated directory on the NAS client, and send the directory that needs to be written to the NAS server to the NAS server within the above-mentioned valid time, so as to store the directory on the NAS server within the valid time.
[0129] It should be noted that the specific processing method for "when the first service in the NAS client generates a read / write instruction for file attributes" can be understood by referring to the above description of "when the first service in the NAS client generates a read / write instruction for a directory." The difference is that "directory" in the above description is replaced with "file attributes." The specific processing method for "when the first service in the NAS client generates a read / write instruction for file data" can be understood by referring to the above description of "when the first service in the NAS client generates a read / write instruction for a directory." The difference is that "directory" in the above description is replaced with "file data." These details will not be repeated here.
[0130] To understand this solution more intuitively, please refer to Figures 5 and 6, which are two flow charts of the NAS cache activation management method provided in an embodiment of the present application. First, refer to Figure 5. In Figure 5, the first service in the NAS client generates a read instruction for file data as an example. As shown in Figure 5, the NAS client can send a first query request corresponding to the first service to the NAS server. The NAS server returns the first configuration information 1 corresponding to the first service to the NAS client. The first configuration information 1 indicates that the local cache function is turned off when the first service in the NAS client generates a read instruction for file data. When the first service in the NAS client generates a read instruction for file data, the read instruction for the file data is sent directly to the NAS server. The read instruction for the file data may include a directory of the file data. In response to the received read instruction for file data, the NAS server sends the file data to the NAS client.
[0131] Refer to Figure 6 again. In Figure 6, the first service in the NAS client generates a read instruction for file data as an example. As shown in Figure 6, the NAS client can send a first query request corresponding to the first service to the NAS server. The NAS server returns the first configuration information 2 corresponding to the first service to the NAS client. The first configuration information 2 indicates that the local cache function is enabled when the first service in the NAS client generates a read instruction for file data, and the first configuration information 2 includes the valid time 1 of the file data cached on the NAS client. When the first service in the NAS client generates a read instruction for file data, it is determined based on the valid time 1 that the file data locally cached by the NAS client is valid, and then the file data corresponding to the aforementioned read instruction is read from the locally cached file data. It should be noted that the examples in Figures 5 and 6 are only for the convenience of understanding this solution and are not used to limit this solution.
[0132] It should be noted that the relationship between the execution frequency of steps 202 to 204 and step 205 is not limited in the embodiments of the present application. For example, after executing steps 202 to 204 once, step 205 may be executed multiple times. That is, after the NAS client obtains the first configuration information corresponding to the first service once, the NAS client may determine whether to enable the local cache function multiple times based on the obtained first configuration information. Alternatively, steps 202 to 204 may be executed once each time before executing step 205. The specific determination can be flexible based on actual application scenarios and is not limited in the embodiments of the present application.
[0133] When multiple services are deployed on a NAS client, if the NAS client lacks a configuration item for the local cache function, the multiple services on the NAS client will only be able to share the default configuration information on the NAS client, resulting in the inability to meet the personalized configuration requirements of the local cache function for different services. In the embodiment of the present application, the NAS client is personalized according to the specific needs of the service, and the local cache function is enabled / disabled for different services separately, thereby meeting the personalized needs of different services. Specifically, the NAS server records the requirements of different services for whether to enable cache. The NAS client obtains this requirement by sending a query request to the NAS server, and then enables (or disables) the client local cache for the specific service based on this instruction.
[0134] Optionally, the first configuration information is updateable, and the updating operation of the first configuration information is performed by the NAS server. Specifically, based on the embodiment corresponding to FIG. 2 , please refer to FIG. 7 , which is another flowchart of the NAS cache activation management method provided in the embodiment of the present application. The NAS cache activation management method provided in the embodiment of the present application may include:
[0135] 701. The NAS server pre-acquires at least one configuration information.
[0136] 702. The NAS client sends a first query request corresponding to a first service to the NAS server, where at least one service is deployed in the NAS client, the first service is any one of the at least one service, and the first query request is used to obtain configuration information corresponding to the first service.
[0137] 703. In response to the received first query request, the NAS server obtains first configuration information corresponding to the first service from a plurality of pre-stored configuration information.
[0138] 704. The NAS client receives first configuration information fed back by the NAS server, where the first configuration information is used to indicate whether to enable a local cache function of the first service.
[0139] 705. The NAS client determines whether to enable a local cache function of the first service according to the first configuration information.
[0140] In the embodiment of the present application, the specific implementation methods of steps 701 to 705 can refer to the description in the embodiment corresponding to Figure 2 above, and will not be repeated here.
[0141] 706. The NAS server updates the first configuration information to obtain updated first configuration information.
[0142] In the embodiment of the present application, step 706 is an optional step. Optionally, step 706 may include: the NAS server obtains a modification operation input by the user for the first configuration information through the display interface, and updates the first configuration information in response to the obtained modification operation to obtain the updated first configuration information.
[0143] The modification operation may include changing the local cache function from being enabled to being disabled, or changing the local cache function from being disabled to being enabled. For example, the modification operation may include at least one of the following: when generating a read / write instruction for a directory, changing the local cache function from being enabled to being disabled; when generating a read / write instruction for a directory, changing the local cache function from being disabled to being enabled; when generating a read / write instruction for a file attribute, changing the local cache function from being enabled to being disabled; when generating a read / write instruction for a file attribute, changing the local cache function from being disabled to being enabled; when generating a read / write instruction for file data, changing the local cache function from being enabled to being disabled; when generating a read / write instruction for file data, changing the local cache function from being disabled to being enabled; or other modification operations.
[0144] Optionally, the modification operation may further include a modification operation on the validity period. For example, the modification operation may further include at least one of the following: a modification operation on the validity period of a directory cached on the NAS client, a modification operation on the validity period of a file attribute cached on the NAS client, a modification operation on the validity period of file data cached on the NAS client, or other modification operations.
[0145] For example, in one scenario, if each of the at least one first configuration information corresponding to the first service refers to configuration information corresponding to each first file system of the NAS server, and data generated by the first service is stored in the at least one first file system of the NAS server, then step 706 may include: the NAS server obtaining, through a display interface, a user input modification operation for configuration information of any one of the at least one first file system, that is, the NAS server obtaining, through the display interface, the user modification operation for any one of the at least one first configuration information. In response to the obtained modification operation, the NAS server updates the aforementioned first configuration information to obtain updated first configuration information.
[0146] To more intuitively understand this solution, here we take the first business as business 1, and the data generated by business 1 is stored in file system 1 and file system 2 of the NAS server as an example. In conjunction with Figure 8, the NAS server obtains user input for the modification operation of the configuration information of file system 1 through the display interface to demonstrate. Please refer to Figure 8. Figure 8 is a schematic diagram of obtaining the modification operation for the first configuration information provided by the embodiment of the present application. Figure 8 includes two left and right sub-schematic diagrams. The left sub-schematic diagram of Figure 8 represents the configuration information of file system 1 before the modification, and the right sub-schematic diagram of Figure 8 represents the configuration information of file system 1 after the modification. Comparing the left and right sub-schematic diagrams of Figure 8, it can be seen that the modification operation includes: when generating a read / write instruction for file attributes, changing the local cache function from being disabled to being enabled, and setting the valid time of the file attributes cached on the left side of the NAS client to 50s; when generating a read / write instruction for file data, changing the local cache function from being enabled to being disabled. It should be understood that the example in Figure 8 is only for the convenience of understanding this solution and is not used to limit this solution.
[0147] In another case, if multiple configuration information pre-stored on the NAS server corresponds one-to-one to at least one service provided by the NAS server, step 706 may include: the NAS server obtains the user's modification operation for the configuration information of the first service through the display interface, and updates the aforementioned first configuration information in response to the obtained modification operation to obtain the updated first configuration information.
[0148] Since the demand for enabling the local cache function for the data generated by a certain service may change during the use of a specific service, in the embodiment of the present application, the configuration information corresponding to the specific service can also be modified through the NAS server, which is conducive to further improving the flexibility of the cache management method and better meeting the personalized configuration requirements of the local cache function.
[0149] It should be noted that the NAS server can also obtain the above-mentioned updated first configuration information through other means. For example, the NAS server can receive the above-mentioned updated first configuration information sent by other devices, and then store the received updated first configuration information, etc. The specific details of step 706 can be flexibly determined in combination with the actual application scenario, and are not limited in the embodiments of the present application.
[0150] It should be understood that the NAS server can modify any one of the pre-stored configuration information in the above manner, that is, obtain updated configuration information corresponding to any one of the multiple pre-stored configuration information.
[0151] It should be noted that the order of step 706 and steps 702 to 706 is not limited in the embodiments of the present application. For example, step 706 may be performed before step 702, and in step 704, the NAS client obtains the updated first configuration information corresponding to the first service. For another example, if step 706 is performed after step 705, the NAS client may re-execute steps 702 to 704 after step 706 to re-acquire the updated first configuration information. The specific order can be determined based on actual application scenarios and is not limited in the embodiments of the present application.
[0152] 707. The NAS client sends a second query request corresponding to a second service to the NAS server, where the second service is one of the multiple services different from the first service, and the second query request is used to obtain configuration information corresponding to the second service.
[0153] 708. In response to the received second query request, the NAS server obtains second configuration information corresponding to the second service from the pre-stored plurality of configuration information.
[0154] 709. The NAS client receives second configuration information fed back by the NAS server, where the second configuration information is used to indicate whether to enable a local cache function of the second service, where the second configuration information is different from the first configuration information.
[0155] 710. The NAS client determines whether to enable a local cache function of the second service according to the second configuration information.
[0156] In the embodiment of the present application, steps 707 to 710 are optional steps. If steps 707 to 710 are performed, the specific implementation of steps 707 to 710 can refer to the description of steps 202 to 205 in the embodiment corresponding to Figure 2 above, with the difference that "first business" in the description of steps 202 to 205 is replaced with "second business", "first query request" in the description of steps 202 to 205 is replaced with "second query request", and "first configuration information" in the description of steps 202 to 205 is replaced with "second configuration information". The details will not be repeated here.
[0157] Among them, the meaning of "second business" is similar to that of "first business", but the second business and the first business are different businesses; the meaning of "second query request" is similar to that of "first query request", and the meaning of "second configuration information" is similar to that of "first configuration information", but the second configuration information is different from the first configuration information.
[0158] Optionally, the first configuration information is specifically used to instruct the activation of the local cache function of the first service, and the second configuration information is specifically used to instruct the disactivation of the local cache function of the second service. For example, when the first service in the NAS client generates a read / write instruction, the NAS client determines to activate the local cache function based on the first configuration information fed back by the NAS server, and thus can determine how to use the local cache function of the first service. When the second service in the NAS client generates a read / write instruction, the NAS client determines to deactivate the local cache function based on the second configuration information fed back by the NAS server, and thus can determine how to implement data read / write operations without using the local cache function.
[0159] In an embodiment of the present application, the NAS client can not only obtain the first configuration information corresponding to the first service, but also obtain the second configuration information corresponding to the second service, wherein the second configuration information is different from the first configuration information, that is, the first configuration information indicates that the local cache function of the first service is enabled, and the second configuration information indicates that the local cache function of the second service is not enabled, which further clarifies that the local cache function can be enabled / disabled for personalized configurations of different services, thereby meeting the personalized needs of different services.
[0160] The above is a detailed description of the NAS cache activation management method provided by the embodiment of the present application. The following is an introduction to the NAS cache activation management device provided by the embodiment of the present application. Figure 9 is a structural schematic diagram of the NAS cache activation management device provided by the embodiment of the present application. The NAS cache activation management device 900 is deployed in the NAS client. The NAS cache activation management device 900 includes: a sending module 901, which is used to send a first query request corresponding to a first service to the NAS server, wherein the NAS client is deployed with multiple services, the first service is any one of the multiple services, and the first query request is used to obtain configuration information corresponding to the first service, wherein the configuration information corresponding to at least two different services in the multiple services is different; a receiving module 902, which is used to receive the first configuration information fed back by the NAS server, the first configuration information is used to indicate whether to enable the local cache function of the first service; a determining module 903, which is used to determine whether to enable the local cache function of the first service based on the first configuration information.
[0161] Optionally, the first configuration information is specifically used to indicate that the local cache function of the first service is enabled. The sending module 901 is further used to send a second query request corresponding to the second service to the NAS server, wherein the second service is one of multiple services different from the first service, and the second query request is used to obtain configuration information corresponding to the second service; the receiving module 902 is further used to receive second configuration information fed back by the NAS server, the second configuration information is used to indicate that the local cache function of the second service is not enabled, wherein the second configuration information is different from the first configuration information; the determining module 903 is further used to determine whether to enable the local cache function of the second service based on the second configuration information.
[0162] Optionally, when the data generated by the first service is stored in at least one first file system of the NAS server, and the received first configuration information includes at least one first configuration information corresponding one-to-one to the at least one first file system, the determination module 903 is specifically used to determine whether to enable the local cache function of the first service based on the target configuration information, wherein the target configuration information is the configuration information corresponding to the target file system in the at least one first configuration information, the at least one first file system includes the target file system, and the target file system is the file system to which the storage location corresponding to the read / write instruction generated by the first service in the NAS client belongs.
[0163] Optionally, the determination module 903 is further used to determine that the data generated by the first service in the NAS client is stored in the first file system of the NAS server, and the first query request corresponding to the first service includes identification information of the first file system. The identification information of the first file system in the query request is used to indicate the acquisition of first configuration information corresponding to the first file system.
[0164] Optionally, the first configuration information is updateable, and an update operation of the first configuration information is performed by a NAS server.
[0165] Optionally, the first configuration information includes at least one of the following items: first sub-information, the first sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for a directory; second sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for a file attribute; and third sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for file data.
[0166] Optionally, when the first configuration information indicates that the local cache function of the first service is enabled, the first configuration information further indicates the effective cache time of the data in the enabled cache.
[0167] It should be noted that the information interaction, implementation process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the embodiment of the present application, and no further details will be given here.
[0168] Please refer to Figure 10, which is another structural diagram of a NAS cache activation management device provided in an embodiment of the present application. The NAS cache activation management device 1000 is deployed in a NAS server. The NAS cache activation management device 1000 includes: a receiving module 1001, configured to receive a first query request corresponding to a first service sent by a NAS client, where the first query request is used to obtain configuration information corresponding to the first service; an obtaining module 1002, configured to obtain, in response to the received first query request, first configuration information corresponding to the first service from multiple pre-stored configuration information; and a sending module 1003, configured to send the first configuration information to the NAS client, where the first configuration information is used to indicate whether to enable the local cache function of the first service.
[0169] Optionally, the receiving module 1001 is further used to receive a second query request corresponding to the second service sent by the NAS client, where the second query request is used to obtain configuration information corresponding to the second service. Multiple services are deployed in the NAS client, where the first service is any one of the multiple services, and the second service is one of the multiple services that is different from the first service. The obtaining module 1002 is further used to obtain second configuration information corresponding to the second service from the pre-stored multiple configuration information in response to the received second query request. The sending module 1003 is further used to send second configuration information to the NAS client, where the second configuration information is used to indicate whether to enable the local cache function of the second service, where the second configuration information is different from the first configuration information.
[0170] Optionally, when multiple configuration information corresponds one-to-one to multiple file systems of the NAS server, the acquisition module 1002 is specifically used to obtain first configuration information corresponding to the first file system from multiple pre-stored configuration information in response to the received first query request, wherein the data generated by the first business is stored in the first file system, and the multiple file systems include the first file system.
[0171] Optionally, the first query request corresponding to the first service includes identification information of the first file system, and the acquisition module 1002 is specifically used to obtain first configuration information corresponding to the first file system from at least one pre-stored configuration information based on the identification information of the first file system in the first query request.
[0172] Optionally, the acquisition module 1002 is further configured to acquire a configuration operation through a display interface; the NAS cache activation management device 1000 further includes: a determination module 1004, configured to determine a plurality of configuration information in response to the acquired configuration operation.
[0173] Optionally, the acquisition module 1002 is further configured to acquire a modification operation through a display interface; the NAS cache activation management device 1000 further includes: an update module 1005, configured to update the first configuration information in response to the acquired modification operation to obtain updated first configuration information.
[0174] Optionally, the first configuration information includes at least one of the following items: first sub-information, the first sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for a directory; second sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for a file attribute; and third sub-information indicating whether the local cache function is enabled when the first service in the NAS client generates a read / write instruction for file data.
[0175] Optionally, when the first configuration information indicates that the local cache function of the first service is enabled, the first configuration information further indicates the effective cache time of the data in the enabled cache.
[0176] It should be noted that the information interaction, implementation process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the embodiment of the present application, and no further details will be given here.
[0177] Next, we will introduce a device provided by an embodiment of the present application. Please refer to Figure 11, which is another structural diagram of a device provided by an embodiment of the present application. Specifically, the device 1100 is implemented by one or more servers. The device 1100 may vary greatly due to different configurations or performance. It may include one or more central processing units (CPUs) 1122 (for example, one or more processors) and memory 1132, and one or more storage media 1130 (for example, one or more mass storage devices) for storing application programs 1142 or data 1144. Among them, the memory 1132 and the storage medium 1130 can be temporary storage or permanent storage. The program stored in the storage medium 1130 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the device. Furthermore, the central processing unit 1122 can be configured to communicate with the storage medium 1130 to execute a series of instruction operations in the storage medium 1130 on the device 1100.
[0178] The device 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1158, and / or one or more operating systems 1141, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0179] In the embodiment of the present application, the central processing unit 1122 is configured to execute the NAS cache activation management method performed by the NAS server in the embodiments corresponding to Figures 2 to 8 . It should be noted that the specific manner in which the central processing unit 1122 executes the aforementioned steps is based on the same concept as the various method embodiments corresponding to Figures 2 to 8 of the present application, and the technical effects achieved are the same as those of the various method embodiments corresponding to Figures 2 to 8 of the present application. For details, please refer to the description of the method embodiments shown above in this application and will not be repeated here.
[0180] In an embodiment of the present application, a NAS cache activation management system is further provided. The NAS cache activation management system includes a NAS client and a NAS server. The NAS client is deployed with the NAS cache activation management device 900 shown in FIG. 9 above, and the NAS server is deployed with the NAS cache activation management device 1000 shown in FIG. 9 above.
[0181] An embodiment of the present application further provides a computer-readable storage medium storing a program that, when executed on a computer, causes the computer to execute the steps performed by the NAS client in the methods described in the embodiments shown in Figures 2 to 8 , or causes the computer to execute the steps performed by the NAS server in the methods described in the embodiments shown in Figures 2 to 8 .
[0182] An embodiment of the present application further provides a computer program product, which includes a program. When the program is executed on a computer, the computer executes the steps performed by the NAS client in the method described in the embodiments shown in Figures 2 to 8 , or the computer executes the steps performed by the NAS server in the method described in the embodiments shown in Figures 2 to 8 .
[0183] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above-mentioned first aspect method.
[0184] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0185] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0186] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0187] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A method for managing cache activation of a network attached storage (NAS), characterized in that: The method comprises: The NAS client sends a first query request corresponding to a first service to the NAS server, wherein the NAS client has multiple services deployed, the first service is any one of the multiple services, and the first query request is used to obtain configuration information corresponding to the first service, wherein the configuration information corresponding to at least two different services among the multiple services is different; The NAS client receives first configuration information fed back by the NAS server, where the first configuration information is used to indicate whether to enable a local cache function of the first service; The NAS client determines whether to enable a local cache function of the first service according to the first configuration information.
2. The method according to claim 1, characterized in that The first configuration information is specifically used to instruct to enable a local cache function of the first service. The method further includes: The NAS client sends a second query request corresponding to a second service to the NAS server, wherein the second service is one of the multiple services different from the first service, and the second query request is used to obtain configuration information corresponding to the second service; The NAS client receives second configuration information fed back by the NAS server, where the second configuration information is used to indicate that a local cache function of the second service is not enabled, wherein the second configuration information is different from the first configuration information; The NAS client determines not to enable a local cache function of the second service according to the second configuration information.
3. The method according to claim 1 or 2, characterized in that When data generated by the first service is stored in at least one first file system of the NAS server, and the received first configuration information includes at least one first configuration information corresponding to the at least one first file system, determining whether to enable the local cache function of the first service according to the first configuration information includes: Determining whether to enable a local cache function of the first service according to target configuration information, wherein the target configuration information is configuration information corresponding to a target file system in the at least one first configuration information, the at least one first file system includes the target file system, and the target file system is a file system to which a storage location corresponding to a read / write instruction generated by the first service in the NAS client belongs.
4. The method according to claim 3, characterized in that The method further comprises: Determine that the data generated by the first service in the NAS client is stored in the first file system of the NAS server, the first query request corresponding to the first service includes identification information of the first file system, and the identification information of the first file system in the query request is used to indicate the acquisition of the first configuration information corresponding to the first file system.
5. The method according to claim 1 or 2, characterized in that The first configuration information is updateable, and an update operation of the first configuration information is performed by the NAS server.
6. The method according to claim 1 or 2, characterized in that The first configuration information includes at least one of the following: first sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a directory; second sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a file attribute; as well as The third sub-information indicates whether to enable a local cache function when the first service in the NAS client generates a read / write instruction for file data.
7. The method according to claim 1 or 2, characterized in that In a case where the first configuration information indicates enabling a local cache function of the first service, the first configuration information further indicates an effective cache time for data in the enabled cache.
8. The method according to claim 1 or 2, characterized in that The method further comprises: The NAS server receives a first query request corresponding to a first service sent by the NAS client, where the first query request is used to obtain configuration information corresponding to the first service; In response to the received first query request, the NAS server obtains first configuration information corresponding to the first service from a plurality of pre-stored configuration information; The NAS server sends the first configuration information to the NAS client, where the first configuration information is used to indicate whether to enable a local cache function of the first service.
9. A method for managing cache activation of a network attached storage (NAS), characterized in that: The method comprises: The NAS server receives a first query request corresponding to a first service sent by the NAS client, where the first query request is used to obtain configuration information corresponding to the first service; In response to the received first query request, the NAS server obtains first configuration information corresponding to the first service from a plurality of pre-stored configuration information; The NAS server sends the first configuration information to the NAS client, where the first configuration information is used to indicate whether to enable a local cache function of the first service.
10. The method according to claim 9, characterized in that The method further comprises: The NAS server receives a second query request corresponding to a second service sent by the NAS client, where the second query request is used to obtain configuration information corresponding to the second service, wherein the NAS client has multiple services deployed, the first service is any one of the multiple services, and the second service is one of the multiple services different from the first service; In response to the received second query request, the NAS server obtains second configuration information corresponding to the second service from a plurality of pre-stored configuration information; The NAS server sends the second configuration information to the NAS client, where the second configuration information is used to indicate whether to enable a local cache function of the second service, wherein the second configuration information is different from the first configuration information.
11. The method according to claim 9 or 10, characterized in that In a case where the plurality of configuration information correspond one-to-one to the plurality of file systems of the NAS server, the obtaining, in response to the received query request, first configuration information corresponding to the first service from the plurality of pre-stored configuration information includes: In response to the received first query request, the first configuration information corresponding to the first file system is obtained from the pre-stored multiple configuration information, wherein the data generated by the first business is stored in the first file system, and the multiple file systems include the first file system.
12. The method according to claim 11, characterized in that The first query request corresponding to the first service includes identification information of the first file system, and the obtaining, in response to the received first query request, first configuration information corresponding to the first service from a plurality of pre-stored configuration information includes: According to the identification information of the first file system in the first query request, the first configuration information corresponding to the first file system is acquired from the plurality of pre-stored configuration information.
13. The method according to claim 9 or 10, characterized in that The method further comprises: Get configuration operations through the display interface; In response to the acquired configuration operation, the plurality of configuration information is determined.
14. The method according to claim 13, characterized in that The method further comprises: Get modification operations through the display interface; In response to the acquired modification operation, the first configuration information is updated to obtain updated first configuration information.
15. The method according to claim 9 or 10, characterized in that The first configuration information includes at least one of the following: first sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a directory; second sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a file attribute; as well as The third sub-information indicates whether to enable a local cache function when the first service in the NAS client generates a read / write instruction for file data.
16. A network attached storage (NAS) cache activation management device, characterized in that: The NAS cache activation management device is deployed in the NAS client, and the device includes: a sending module, configured to send a first query request corresponding to a first service to the NAS server, wherein the NAS client has multiple services deployed, the first service is any one of the multiple services, and the first query request is used to obtain configuration information corresponding to the first service, wherein the configuration information corresponding to at least two different services among the multiple services is different; a receiving module, configured to receive first configuration information fed back by the NAS server, where the first configuration information is used to indicate whether to enable a local cache function of the first service; A determination module is used to determine whether to enable the local cache function of the first service according to the first configuration information.
17. The device according to claim 16, characterized in that The first configuration information is specifically used to instruct to enable the local cache function of the first service, The sending module is further configured to send a second query request corresponding to a second service to the NAS server, wherein the second service is one of the multiple services different from the first service, and the second query request is used to obtain configuration information corresponding to the second service; The receiving module is further configured to receive second configuration information fed back by the NAS server, where the second configuration information is used to indicate that a local cache function of the second service is not enabled, wherein the second configuration information is different from the first configuration information; The determining module is further configured to determine whether to enable the local cache function of the second service according to the second configuration information.
18. The device according to claim 16 or 17, characterized in that When data generated by the first service is stored in at least one first file system of the NAS server, and the received first configuration information includes at least one first configuration information corresponding to the at least one first file system, the determination module is specifically configured to determine whether to enable the local cache function of the first service based on target configuration information, wherein the target configuration information is configuration information corresponding to a target file system in the at least one first configuration information, the at least one first file system includes the target file system, and the target file system is the file system to which the storage location corresponding to the read / write instruction generated by the first service in the NAS client belongs.
19. The device according to claim 18, characterized in that The determination module is further configured to determine whether data generated by the first service in the NAS client is stored in the first file system of the NAS server, wherein the first query request corresponding to the first service includes identification information of the first file system, and the identification information of the first file system in the query request is used to instruct acquisition of the first configuration information corresponding to the first file system.
20. The device according to claim 16 or 17, characterized in that The first configuration information includes at least one of the following: first sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a directory; second sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a file attribute; as well as The third sub-information indicates whether to enable a local cache function when the first service in the NAS client generates a read / write instruction for file data.
21. A network attached storage (NAS) cache activation management device, characterized in that: The NAS cache activation management device is deployed in the NAS server, and the device includes: a receiving module, configured to receive a first query request corresponding to a first service sent by a NAS client, wherein the first query request is used to obtain configuration information corresponding to the first service; an acquisition module, configured to acquire, in response to the received first query request, first configuration information corresponding to the first service from a plurality of pre-stored configuration information; The sending module is configured to send the first configuration information to the NAS client, wherein the first configuration information is used to indicate whether to enable the The local cache function of the first business is described.
22. The device according to claim 21, characterized in that The receiving module is further configured to receive a second query request corresponding to a second service sent by the NAS client, where the second query request is used to obtain configuration information corresponding to the second service, wherein the NAS client has multiple services deployed, the first service is any one of the multiple services, and the second service is one of the multiple services different from the first service; The acquisition module is further configured to, in response to the received second query request, acquire second configuration information corresponding to the second service from a plurality of pre-stored configuration information; The sending module is further configured to send the second configuration information to the NAS client, where the second configuration information is used to indicate whether to enable a local cache function of the second service, wherein the second configuration information is different from the first configuration information.
23. The device according to claim 21 or 22, characterized in that In a case where the multiple configuration information correspond one-to-one to the multiple file systems of the NAS server, the acquisition module is specifically configured to, in response to the received first query request, acquire the first configuration information corresponding to the first file system from the multiple pre-stored configuration information, wherein the data generated by the first service is stored in the first file system, and the multiple file systems include the first file system.
24. The device according to claim 23, characterized in that The first query request corresponding to the first service includes identification information of the first file system. The acquisition module is specifically configured to acquire the first configuration information corresponding to the first file system from the multiple pre-stored configuration information based on the identification information of the first file system in the first query request.
25. The device according to claim 21 or 22, characterized in that The acquisition module is further used to acquire configuration operations through the display interface; The apparatus further includes: a determining module configured to determine the plurality of configuration information in response to the acquired configuration operation.
26. The device according to claim 25, characterized in that The acquisition module is further used to acquire the modification operation through the display interface; The apparatus further includes: an updating module, configured to update the first configuration information in response to the acquired modification operation to obtain updated first configuration information.
27. The device according to claim 21 or 22, characterized in that The first configuration information includes at least one of the following: first sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a directory; second sub-information, indicating whether to enable a local cache function when the first service in the NAS client generates a read / write instruction of a file attribute; as well as The third sub-information indicates whether to enable a local cache function when the first service in the NAS client generates a read / write instruction for file data.
28. A network attached storage (NAS) cache activation management system, characterized in that: The system includes a NAS client and a NAS server. The NAS client is equipped with the NAS cache enabling management device according to any one of claims 16 to 20. The NAS server is equipped with the NAS cache enabling management device according to any one of claims 21 to 27.
29. A device, characterized in that The device includes a processor and a memory: The memory is used to store instructions; The processor is configured to cause the device to execute the method according to any one of claims 1 to 15 according to the instructions.
30. A computer storage medium, characterized in that The computer storage medium stores one or more instructions, which, when executed by one or more computers, cause the one or more computers to implement the method of any one of claims 1 to 15.
31. A computer program product, characterized in that The computer program product stores instructions, which, when executed by a computer, enable the computer to implement the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Service processing method and device
CN108769151A
Application program configuration file acquisition method, device and equipment
CN114489856A
Information processing device, information processing system, information processing method and program
JP2021068079A
Dynamic detection and selection of file servers in a caching application or system
US20140082128A1
Storage architecture for heterogeneous multimedia data
US20190132391A1