Document request processing methods, apparatus, computer equipment, and storage media
By adding the protected identification generated by the gateway in the terminal file request, file requests in protected and non-protected network areas are distinguished, which solves the problems of high maintenance cost and low request processing efficiency in the existing technology, and realizes efficient file requests. Processing and file access control.
Patent Information
- Application Number
- CN202111064373.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-09-10
AI Technical Summary
In the existing technology, public cloud file access is controlled by restricting the physical address of the user terminal, resulting in high maintenance costs and low request processing efficiency.
Use a gateway to add a protected identification to the terminal, distinguish file requests from protected and unprotected network areas, directly store and access corresponding files, and reduce the need to maintain the terminal's physical address data table.
It improves the efficiency of file request processing and reduces maintenance costs. It automatically distinguishes file requests by adding protected identifiers through the gateway, enabling accurate access to protected files and sharing of non-protected files.
Smart Images

Figure CN113810484B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a file request processing method, device, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, users can access files stored in public cloud anytime and anywhere through terminals. In order to ensure that the advantage of public cloud can be used anytime and anywhere, and to ensure the confidentiality of files, the current method is to limit the user's terminal physical address, so that the user can only access the files allowed by the terminal physical address.
[0003] However, restricting users' access to files on the public cloud by limiting the user's terminal physical address requires staff to spend a lot of work to maintain the data table storing the user's terminal physical address, thereby reducing the efficiency of request processing for files on the public cloud. Summary of the invention
[0004] Based on this, it is necessary to provide a file request processing method, device, computer equipment and storage medium that can improve efficiency in response to the above technical problems.
[0005] A method for processing a file request, the method comprising:
[0006] Receiving a file request forwarded by a terminal through a gateway; when the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway;
[0007] In the case where the file request is used to upload a file, when the file request carries the protected identifier, storing the file specified by the file request, and recording the protected identifier corresponding to the file;
[0008] In the case where the file request is used to access a file, when the file request carries the protected identifier and the file specified by the file request has a corresponding record of the protected identifier, access to the file is triggered.
[0009] In one of the embodiments, when the exit network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the file request carries a protected identifier added by the gateway, and the added protected identifier corresponds to the exit network address corresponding to the terminal in the gateway data table; the gateway data table stores the exit network address of the protected network area and the corresponding protected identifier.
[0010] In one of the embodiments, when the export network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the gateway reads the protected identifier corresponding to the export network address corresponding to the terminal from the gateway data table, and adds the read protected identifier to the preset free attribute field in the request header of the file request.
[0011] In one of the embodiments, when the file request is used to upload a file, when the file request carries the protected identifier, storing the file specified by the file request and recording the protected identifier corresponding to the file includes:
[0012] In the case where the file request is used to upload a file, when the file request carries the protected identifier, the file meta-attribute information of the file specified by the file request and the protected identifier are stored correspondingly, and the file corresponding to the file meta-attribute information is stored;
[0013] In the case where the file request is used to access a file, when the file request carries the protected identifier and the file corresponding to the file specified by the file request has the protected identifier recorded, triggering access to the file includes:
[0014] In the case where the file request is used to access a file, when the file request carries the protected identifier and the file meta-attribute information of the file specified by the file request is consistent with the stored file meta-attribute information, access to the file is triggered according to the file meta-attribute information.
[0015] In one embodiment, the method further comprises:
[0016] In the case where the file request is used to access a file, when the protected identifier carried by the file request is inconsistent with the protected identifier of the record corresponding to the file specified by the file request, access is denied and access failure information is returned.
[0017] In one embodiment, the method further comprises:
[0018] In the case where the file request is used to access a file, when the egress network address of the file request originates from a non-protected network area and the file record specified by the file request has a protected identifier, access is denied and access failure information is returned.
[0019] In one embodiment, the method further comprises:
[0020] In the case where the file request is used to access a file, when the file request does not carry the protected identifier and the file specified by the file request does not record the protected identifier, access to the file is triggered.
[0021] A file request processing device, the device comprising:
[0022] A receiving module, configured to receive a file request forwarded by a terminal through a gateway; in the case where the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway;
[0023] a storage module, configured to, when the file request is used to upload a file and the file request carries the protected identifier, store the file specified by the file request and record the protected identifier corresponding to the file;
[0024] The access module is used to trigger access to the file when the file request carries the protected identifier and the file corresponding to the file specified by the file request has the protected identifier recorded in the case where the file request is used to access the file.
[0025] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0026] Receiving a file request forwarded by a terminal through a gateway; when the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway;
[0027] In the case where the file request is used to upload a file, when the file request carries the protected identifier, storing the file specified by the file request, and recording the protected identifier corresponding to the file;
[0028] In the case where the file request is used to access a file, when the file request carries the protected identifier and the file specified by the file request has a corresponding record of the protected identifier, access to the file is triggered.
[0029] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0030] Receiving a file request forwarded by a terminal through a gateway; when the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway;
[0031] In the case where the file request is used to upload a file, when the file request carries the protected identifier, storing the file specified by the file request, and recording the protected identifier corresponding to the file;
[0032] In the case where the file request is used to access a file, when the file request carries the protected identifier and the file specified by the file request has a corresponding record of the protected identifier, access to the file is triggered.
[0033] The above-mentioned file request processing method, device, computer equipment and storage medium first add a protected identifier to the file request of the terminal belonging to the protected network area by the gateway, thereby distinguishing that the file request of the terminal belongs to the protected network area without the staff spending a lot of work to maintain the data table storing the user's terminal physical address. In the case that the file request belonging to the protected network area is used to upload a file, the file specified by the file request can be directly stored, and the protected identifier is recorded corresponding to the file, so that when the file request belonging to the corresponding protected network area is used to access the file with the protected identifier corresponding to the protected network area, the file can be directly triggered to access the file. Therefore, there is no need for the staff to add or delete the terminal physical address from the data table. As long as the terminal sends a file request belonging to the protected network area, the file request can be distinguished from the file request of the non-protected network area, thereby improving the processing efficiency of the file request. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 An application environment diagram of a file request processing method in one embodiment;
[0035] Figure 2 A schematic diagram of a flow chart of a method for processing a file request in one embodiment;
[0036] Figure 3 A flowchart of a method for processing a protected network zone file request in one embodiment;
[0037] Figure 4 A structural diagram of a file request processing method in one embodiment;
[0038] Figure 5 A flowchart of a method for processing a non-protected network zone file request in one embodiment;
[0039] Figure 6 is a structural block diagram of a file request processing device in one embodiment;
[0040] Figure 7 is an internal structure diagram of a computer device in one embodiment;
[0041] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] The file request processing method provided by this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the gateway 104 through the network, and the gateway 104 communicates with the public cloud 106 through the network. The public cloud 106 receives the file request forwarded by the terminal through the gateway 104. In the case where the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway 104. In the case where the file request is used to upload a file, when the file request carries a protected identifier, the public cloud 106 stores the file specified by the file request and records the protected identifier for the corresponding file. In the case where the file request is used to access a file, when the file request carries a protected identifier and the file specified by the file request has a corresponding record of a protected identifier, the public cloud 106 triggers access to the file. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The public cloud 106 provides shared resource services through the Internet. It can be understood that a server cluster can provide hardware support for the public cloud. The gateway 104 can be implemented with an intelligent router with a gateway function or with a dedicated gateway product.
[0044] In one embodiment, Figure 2 As shown, a file request processing method is provided, which is applied to Figure 1 The following steps are used to illustrate the public cloud in the example:
[0045] Step 202, receiving a file request forwarded by a terminal through a gateway; in the case where the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway.
[0046] Among them, the file request is a request for a file on the public cloud. It is understandable that the file request can be used to upload files to the public cloud, and can also be used to download / access files from the public cloud. The protected network area is a network area protected by permissions. The protected identifier is an identifier corresponding to the network area protected by permissions. It is understandable that a protected network area corresponds to a unique protected identifier. The files specified by the file request include files in the public cloud.
[0047] Specifically, the terminal sends a file request through the gateway. The gateway intercepts the file request sent by the terminal. The egress network address belongs to the protected network area. The protected identifier corresponding to the protected network area is added to the file request and forwarded to the public cloud. The public cloud receives the file request forwarded by the gateway. Among them, the egress network address is the network address that sends the file request. It is understandable that after receiving the file request, the public cloud can return the file corresponding to the file request to the egress network address.
[0048] In one embodiment, the user can divide the protected network area according to the egress network address within a preset range. For example, the egress network address in the range of 172.16.0.0 to 172.31.255.255 is divided into a protected network area. The user can also bind a local area network to an egress network address and use the local area network as a protected network area. For example, the egress network addresses of several terminals using the local area network are all 172.16.0.0, and the network areas to which these terminals belong can be used as a protected network area. Among them, a terminal can be assigned one egress network address or multiple egress network addresses.
[0049] In one embodiment, a company may have an R&D department and a non-R&D department. The terminals of the R&D department all use the same egress network address, and the network area to which the terminals of the R&D department belong can be used as a protected network area. For example, the terminals of the R&D department all use the same egress network address 172.16.0.0, and the network area to which these terminals belong can be used as a protected network area. As long as the file request is sent by the terminal of the R&D department, the gateway can add a protected identifier corresponding to the protected network area.
[0050] In one embodiment, the service model of the public cloud can be a SAAS (Software-as-a-Service) service model, an IaaS (Infrastrure-as-Service) service model, or a PaaS (platform-as-a-Service) service model.
[0051] In one embodiment, the protected identifier may be added by adding an attribute to the request header of the file request, for example: security-domain = KDRD, where KDRD is the protected identifier.
[0052] In one embodiment, the function of the gateway can be implemented using a seven-layer access device, or can be implemented using openresty combined with lua. Among them, openresty is a scalable network platform based on NGINX. NGINX is a reverse proxy server. Lua is a scripting language used to be embedded in an application to provide flexible expansion and customization functions for the application.
[0053] Step 204: When the file request is used to upload a file and the file request carries a protected identifier, the file specified by the file request is stored and the protected identifier is recorded in the corresponding file.
[0054] It can be understood that the file request is used to upload a file, which means that the file request is used to request to upload a specified file to the public cloud. Storing the file specified by the file request means storing the file specified by the file request in the public cloud.
[0055] Specifically, after receiving the file request forwarded by the gateway, the public cloud parses the file request. In the case where it is parsed that the file request is for uploading a file, when the file request carries a protected identifier, the public cloud stores the file specified by the file request and records the protected identifier for the corresponding file. In one embodiment, a company may have a research and development department and a non-research and development department. The network area to which the terminal of the research and development department belongs is a protected network area. In the case where the file request sent by the terminal of the research and development department is for uploading a file, when the file request carries a protected identifier corresponding to the protected network area to which the terminal of the research and development department belongs, the public cloud stores the file specified by the file request and records the protected identifier for the corresponding file.
[0056] Step 206: In the case where the file request is used to access a file, when the file request carries a protected identifier and the file specified by the file request has a corresponding record with a protected identifier, access to the specified file is triggered.
[0057] It can be understood that the file request is used to access the file, which means that the file request is used to request access to a specified file on the public cloud. Triggering access to the specified file means triggering access to the file specified by the file request from the public cloud.
[0058] Specifically, after receiving the file request forwarded by the gateway, the public cloud parses the file request. In the case where the file request is parsed to access a file, when the file request carries a protected identifier corresponding to the protected network area to which the terminal of the R&D department belongs, and the file specified by the file request has a corresponding record with a protected identifier, the public cloud triggers access to the specified file stored on the public cloud.
[0059] In one embodiment, a company may have an R&D department and a non-R&D department. The network area to which the terminal of the R&D department belongs is a protected network area. When a file request sent by the terminal of the R&D department is used to access a file, when the file request carries a protected identifier corresponding to the protected network area to which the terminal of the R&D department belongs, and the file specified by the file request has a protected identifier recorded corresponding to the file, the public cloud triggers access to the specified file stored in the public cloud.
[0060] Figure 3 FIG. 1 is a flow chart of a method for processing a protected network zone file request in one embodiment. Figure 3 As shown, when a terminal is used by a user in the company's protected network area to send a file request to download a resource, the gateway obtains the file request and adds a protected identifier. The gateway forwards the file request with the added protected identifier to the file service of the public cloud. The file service of the public cloud receives the file request and authenticates the file request. By verifying that the protected identifier carried by the file request is consistent with the protected identifier recorded for the file specified by the file request, the public cloud obtains the file specified by the file request from the storage and returns it to the gateway through the file service. The gateway returns the file specified by the file request to the terminal.
[0061] In the above-mentioned file request processing method, the gateway first adds a protected identifier to the file request of the terminal belonging to the protected network area, thereby distinguishing that the file request of the terminal belongs to the protected network area without the staff spending a lot of work to maintain the data table storing the user's terminal physical address. In the case that the file request belonging to the protected network area is used to upload a file, the file specified by the file request can be directly stored, and the corresponding file record has a protected identifier, so that when the file request belonging to the corresponding protected network area is used to access a file with a protected identifier corresponding to the protected network area, it is directly triggered to access the file. Therefore, there is no need for the staff to add or delete the terminal physical address from the data table. As long as the terminal sends a file request belonging to the protected network area, the file request can be distinguished from the file request of the non-protected network area, thereby improving the processing efficiency of the file request.
[0062] In one embodiment, when the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the file request carries a protected identifier added by the gateway, and the added protected identifier corresponds to the egress network address corresponding to the terminal in the gateway data table; the gateway data table stores the egress network address of the protected network area and the corresponding protected identifier.
[0063] The gateway data table is a data structure table storing gateway data.
[0064] Specifically, after the gateway obtains the egress network address corresponding to the terminal, it accesses the gateway data table and matches the egress network address from the accessed gateway data table. The gateway data table stores the egress network address of the protected network area and the corresponding protected identifier. When the egress network address corresponding to the terminal exists in the gateway data table, the gateway can recognize that the egress network address is the egress network address of the protected network area. The gateway can obtain the protected identifier corresponding to the egress network address corresponding to the terminal in the gateway data table and add it to the file request.
[0065] In one embodiment, the gateway data table may be stored in the gateway, on a service, or on a storage space accessible to the gateway such as a public cloud.
[0066] like Figure 4 This is an architectural diagram of a file request processing method in an embodiment. The terminal sends a file request for uploading resource A through the egress network address of the non-protected network area. If the gateway obtains the file request for uploading resource A and the accessed gateway data table does not identify that the egress network address is the egress network address of the protected network area, the file request for uploading resource A is forwarded to the file service of the public cloud. The file service of the public cloud stores resource A in the memory. The terminal sends a file request for uploading resource B through the egress network address of the protected network area to which it belongs. If the gateway obtains the file request for uploading resource B and the accessed gateway data table identifies that the egress network address is the egress network address of the protected network area, the protected identifier B corresponding to the egress network address is added to the file request and forwarded to the file service of the public cloud. The file service of the public cloud stores the protected identifier B and resource B in the memory.
[0067] In this embodiment, a gateway adds an unprotected identifier to the file request for different egress network addresses, which can play the role of an intermediate authenticator, so that the files on the public cloud can be effectively managed.
[0068] In one embodiment, the added protected identifier is when the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, and the gateway reads the protected identifier corresponding to the egress network address corresponding to the terminal from the gateway data table, and adds the read protected identifier to the preset free attribute field in the request header of the file request.
[0069] The preset idle attribute field is a pre-set idle attribute field.
[0070] Specifically, the gateway data table stores the egress network address of the protected network area and the corresponding protected identifier. The gateway matches the egress network address from the accessed gateway data table, and can identify that the egress network address is the egress network address of the protected network area and needs to add the protected identifier. The gateway can obtain the protected identifier corresponding to the egress network address corresponding to the terminal in the gateway data table, read the preset free attribute field in the request header of the file request, and add the protected identifier to the preset free attribute field.
[0071] In one embodiment, the preset free attribute field may be an unused attribute field in the request header of the file request, such as an "authentication information" attribute field.
[0072] In one embodiment, the gateway may obtain the protected identifier corresponding to the egress network address corresponding to the terminal in the gateway data table, read the "authentication information" attribute field in the file request header, and add the protected identifier to the "authentication information" attribute field.
[0073] In this embodiment, the protected identifier is added to a preset free attribute field in the request header of the file request through the gateway, and the user does not need to edit a new attribute field, which effectively reduces the user's workload and effectively saves storage resources.
[0074] In one embodiment, in the case where a file request is used to upload a file, when the file request carries a protected identifier, the file specified by the file request is stored, and the protected identifier is recorded corresponding to the file, including: in the case where the file request is used to upload a file, when the file request carries a protected identifier, the file meta-attribute information and the protected identifier of the file specified by the file request are stored correspondingly, and the file corresponding to the file meta-attribute information is stored; in the case where the file request is used to access a file, when the file request carries a protected identifier, and the file specified by the file request has a corresponding record of the protected identifier, triggering access to the file, including: in the case where the file request is used to access a file, when the file request carries a protected identifier, and the file meta-attribute information of the file specified by the file request is consistent with the stored file meta-attribute information, triggering access to the file according to the file meta-attribute information.
[0075] The file meta-attribute information is the multiple attribute information of the file. It is understandable that the file meta-attribute information includes one or more of the owner, size, and modification time.
[0076] Specifically, the public cloud receives a file request carrying a protected identifier and forwarded by the gateway.
[0077] When receiving a file request for uploading a file carrying a protected identifier, the public cloud reads the file meta-attribute information and the protected identifier of the file specified by the file request, stores the file meta-attribute information and the protected identifier corresponding to the file meta-attribute information of the file specified by the file request, and stores the file corresponding to the file meta-attribute information.
[0078] When receiving a file request for accessing a file carrying a protected identifier, the public cloud finds the corresponding file according to the file meta-attribute information of the file specified in the file request and the protected identifier and triggers access.
[0079] In one embodiment, the public cloud may receive a file request through a file service, and obtain the file specified by the file request from a storage server according to the file request, or store the file specified by the file request on the storage server.
[0080] In one embodiment, when a file request for uploading a file carrying a protected identifier is received, the public cloud reads the file meta-attribute information and the protected identifier of the file specified by the file request, stores the file meta-attribute information and the protected identifier of the file specified by the file request in a storage server accordingly, and stores the file corresponding to the file meta-attribute information in the storage server.
[0081] In one embodiment, when a file request carrying a protected identifier for accessing a file is received, the public cloud searches for the corresponding file from the storage server according to the file meta-attribute information of the file specified in the file request and the protected identifier and triggers access.
[0082] In this embodiment, files are stored by file meta-attribute information, and files can be quickly found only based on the file meta-attribute information, thereby improving the efficiency of finding files.
[0083] In one embodiment, the method further includes: when the file request is used to access a file, if the protected identifier carried by the file request is inconsistent with the protected identifier of the record corresponding to the file specified by the file request, access is denied and access failure information is returned.
[0084] The access failure information is information that the file specified by the file request is not accessed.
[0085] In one embodiment, the access failure information may specifically be inconsistent protected identifiers, inconsistent file meta-attribute information, or expired files stored in the public cloud.
[0086] Specifically, the public cloud receives a file request for accessing a file with a protected identifier forwarded by the gateway. When the protected identifier carried in the file request is inconsistent with the protected identifier recorded corresponding to the file specified by the file request, the public cloud denies access and returns access failure information to the terminal through the gateway.
[0087] In one embodiment, when the protected identifier carried by the file request is consistent with the protected identifier of the corresponding record of the file specified by the file request, and the file meta-attribute information of the file specified by the file request is inconsistent with the file meta-attribute information of the corresponding stored file, the public cloud denies access and returns access failure information to the terminal through the gateway.
[0088] In this embodiment, the terminal can access the files on the public cloud as long as the authorized export network address is used, which does not destroy the resource sharing advantage of the public cloud and can protect the confidentiality of the files. The public cloud can directly determine whether the pre-file request has the permission to access the file by detecting the consistency between the protected identifier carried by the file request and the protected identifier recorded corresponding to the file specified by the file request, so that the file request can be processed quickly.
[0089] In one embodiment, the method further includes: in the case where the file request is used to access a file, when the egress network address of the file request originates from a non-protected network area and the file record specified by the file request has a protected identifier, denying access and returning access failure information.
[0090] Specifically, the public cloud can detect whether the received file request carries a protected identifier. If not, it determines that the egress network address of the file request comes from a non-protected area. When it is determined that the file request comes from a non-protected area and the file record specified by the file request has a protected identifier, the public cloud denies access and returns access failure information.
[0091] In one embodiment, if the public cloud receives a file request and the file record designated for access has a protected identifier, and the file request does not carry a protected identifier that is consistent with the protected identifier of the file record, access is denied and access failure information is returned.
[0092] In one embodiment, when the public cloud receives a file request that specifies a protected identifier for access and the file request does not carry a protected identifier that is consistent with the protected identifier of the file record, the public cloud can determine the level of the protected identifier carried by the file request. If the level of the protected identifier carried by the file request is higher than the level of the protected identifier of the file record, the corresponding file is found and access is triggered. The level of the protected identifier can be divided by weight value, and the larger the weight, the higher the level. For example, the level of the protected identifier is level 1, and the higher level of the protected identifier is level 2.
[0093] In one embodiment, a terminal can use multiple egress network addresses. For example, when the terminal is used by a user in the R&D department of a company, the file is accessed or uploaded through the egress network address corresponding to the R&D department. When the terminal is used by a user outside the company, the protected file is accessed or uploaded through the egress network address corresponding to the non-company internal. The gateway can carry a higher level of protection identification to the file request accessed by the egress network address corresponding to the non-company R&D department.
[0094] In one embodiment, as shown in the following table, the terminal can send a file request through the public network in a protected department. The gateway only needs to add the egress network address corresponding to the protected network area to the file request. The public cloud recognizes that the file request has a protected identifier, and then triggers access to the file specified by the file request for access and download. The terminal can then access and download files uploaded through the egress network address corresponding to the protected network area, and can also access and download files uploaded through the egress network address corresponding to the non-protected network area. The terminal sends a file request through the public network in a non-protected department, and the gateway directly forwards the file request to the public cloud. The public cloud recognizes that the file request carries a protected identifier, and then triggers access to and downloads the file specified by the file request for uploading through the egress network address corresponding to the non-protected network area.
[0095]
[0096] In one embodiment, the enterprise has an office park in each of the three cities, City A, City B, and City C, and each office park has a protected department. The terminal can use different exit network addresses for each protected department in City A, City B, and City C, and the gateway adds a corresponding protected identifier for the file request using the exit network address of the protected department. When the public cloud recognizes that the file request carries a protected identifier, it triggers access and downloads to the file uploaded through the exit network address corresponding to the different protected network areas of the three protected departments. The terminal can use different exit network addresses for each non-protected department in City A, City B, and City C, and the gateway does not add a protected identifier to the file request of the exit network address of the non-protected part. When the public cloud recognizes that the file request does not carry a protected identifier, it only triggers access and downloads to the file uploaded through the exit network address corresponding to the non-protected network area.
[0097] Figure 5 FIG. 1 is a flowchart of a non-protected network zone file request process in one embodiment. Figure 5 As shown in the figure, when a terminal is used by a user in the company's non-protected network area to send a file request to download a resource, the gateway obtains the file request and forwards it to the file service of the public cloud. The file service of the public cloud receives the file request and authenticates the file request. By verifying that the file request does not carry a protected identifier and the file specified by the file request has a protected identifier, the access is denied and an access failure message is returned to the gateway. The gateway returns the access failure message to the terminal.
[0098] In this embodiment, the terminal can access files on the public cloud as long as it uses an authorized export network address, which does not destroy the advantage of the public cloud resources being shared anytime and anywhere, and can also protect confidential files.
[0099] In one embodiment, the method further includes: in the case where the file request is used to access a file, when the file request does not carry a protected identifier and the file specified by the file request does not record a protected identifier, triggering access to the file.
[0100] Specifically, when the public cloud receives a file request that does not carry a protected identifier, and the file to be accessed specified by the file request also does not record a protected identifier, access to the specified file to be accessed stored in the public cloud is triggered.
[0101] In one embodiment, when the terminal is used by a user in a non-protected network area of the company, the terminal accesses the file through the egress network address corresponding to the non-protected network area. If the gateway does not match the egress network address corresponding to the non-protected network area from the accessed gateway data table, it will not add a protected identifier and forward the file request to the public cloud. If the public cloud receives a file request that does not carry a protected identifier and the file specified by the file request does not have a protected identifier recorded, it will trigger access to the specified file stored in the public cloud.
[0102] In one embodiment, when the terminal is used by a user in the company's protected network area, the terminal accesses the file through the egress network address corresponding to the protected network area. The gateway matches the egress network address corresponding to the protected network area from the accessed gateway data table, adds the protected identifier corresponding to the protected network area to the file request and forwards the file request to the public cloud. When the public cloud receives a file request with a protected identifier and the file specified by the file request does not have a protected identifier recorded, access to the file is triggered.
[0103] In this embodiment, as long as the files on the public cloud are not protected files, they can be accessed regardless of whether the egress network address corresponding to the protected network area is used, that is, the file request carries a protected identifier, or the egress network address corresponding to the unprotected network area is used. Therefore, the egress network address divided for use in the protected network area will not affect the access to unprotected files, thereby ensuring the sharing of unprotected files.
[0104] It should be understood that, although the various steps in the flowcharts of the above-mentioned various embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts of the above-mentioned various embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0105] In one embodiment, Figure 6 As shown, a file processing device 600 is provided, comprising: a receiving module 602, a storage module 604 and an access module 606, wherein:
[0106] Receiving module 602, for receiving a file request forwarded by a terminal through a gateway; in the case where the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway.
[0107] Storage module 604 is used to store the file specified by the file request and record the protected identifier in the corresponding file when the file request carries a protected identifier.
[0108] The access module 606 is used to trigger access to the file when the file request carries a protected identifier and the corresponding record of the file specified by the file request has a protected identifier, when the file request is used to access the file.
[0109] In one embodiment, when the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the file request carries a protected identifier added by the gateway, and the added protected identifier corresponds to the egress network address corresponding to the terminal in the gateway data table; the gateway data table stores the egress network address of the protected network area and the corresponding protected identifier.
[0110] In one embodiment, the added protected identifier is when the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, and the gateway reads the protected identifier corresponding to the egress network address corresponding to the terminal from the gateway data table, and adds the read protected identifier to the preset free attribute field in the request header of the file request.
[0111] In one embodiment, the storage module 604 is further used to store the file meta-attribute information of the file specified by the file request and the protected identifier in correspondence with each other when the file request carries a protected identifier and to store the file corresponding to the file meta-attribute information when the file request is used to upload a file;
[0112] In one embodiment, the access module 606 is also used to trigger access to the file according to the file meta-attribute information when a file request is used to access a file and the file request carries a protected identifier and the file meta-attribute information of the file specified by the file request is consistent with the stored file meta-attribute information.
[0113] In one embodiment, the access module 606 is also used to deny access and return access failure information when a file request is used to access a file and the protected identifier carried by the file request is inconsistent with the protected identifier of the record corresponding to the file specified by the file request.
[0114] In one embodiment, the access module 606 is also used to deny access and return access failure information when a file request is used to access a file and the export network address of the file request comes from a non-protected network area and the file record specified by the file request has a protected identifier.
[0115] In one embodiment, the access module 606 is further used to trigger access to the file when the file request is used to access the file and the file request does not carry a protected identifier and the file specified by the file request does not record a protected identifier.
[0116] For the specific definition of the file request processing device, please refer to the definition of the file request processing method above, which will not be repeated here. Each module in the above-mentioned file request processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0117] In one embodiment, a computer device is provided. The computer device may be a server that provides hardware support for a public cloud. The internal structure diagram thereof may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store file request processing data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a file request processing method is implemented.
[0118] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a file request processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0119] Those skilled in the art will understand that Figure 7-8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0120] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0122] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0123] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0124] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A file request processing method, characterized in that: The method comprises: A file request forwarded by a receiving terminal through a gateway; when the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway; wherein each protected network area has and only has one corresponding protected identifier; In the case where the file request is used to upload a file, when the file request carries the protected identifier, storing the file specified by the file request, and recording the protected identifier corresponding to the file; In the case where the file request is used to access a file, when the file request carries the protected identifier and the file specified by the file request has a corresponding record of the protected identifier, access to the file is triggered; When the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the file request carries a protected identifier added by the gateway, and the added protected identifier corresponds to the egress network address corresponding to the terminal in the gateway data table; the gateway data table stores the egress network address of the protected network area and the corresponding protected identifier; The added protected identifier is that when the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the gateway reads the protected identifier corresponding to the egress network address corresponding to the terminal from the gateway data table, and adds the read protected identifier to the preset free attribute field in the request header of the file request; In the case where the file request is used to upload a file, when the file request carries the protected identifier, storing the file specified by the file request and recording the protected identifier corresponding to the file includes: In the case where the file request is used to upload a file, when the file request carries the protected identifier, the file meta-attribute information of the file specified by the file request and the protected identifier are stored correspondingly, and the file corresponding to the file meta-attribute information is stored; In the case where the file request is used to access a file, when the file request carries the protected identifier and the file corresponding to the file specified by the file request has the protected identifier recorded, triggering access to the file includes: In the case where the file request is used to access a file, when the file request carries the protected identifier and the file meta-attribute information of the file specified by the file request is consistent with the stored file meta-attribute information, access to the file is triggered according to the file meta-attribute information.
2. The method according to claim 1, characterized in that The method further comprises: In the case where the file request is used to access a file, when the protected identifier carried by the file request is inconsistent with the protected identifier of the record corresponding to the file specified by the file request, access is denied and access failure information is returned.
3. The method according to claim 1, characterized in that The method further comprises: In the case where the file request is used to access a file, when the egress network address of the file request originates from a non-protected network area and the file record specified by the file request has a protected identifier, access is denied and access failure information is returned.
4. The method according to claim 1, characterized in that: The method further comprises: In the case where the file request is used to access a file, when the file request does not carry the protected identifier and the file specified by the file request does not record the protected identifier, access to the file is triggered.
5. A file request processing device, characterized in that: The device comprises: A receiving module, configured to receive a file request forwarded by a terminal through a gateway; in the case where the terminal belongs to a protected network area, the file request carries a protected identifier corresponding to the protected network area added by the gateway; a storage module, configured to, when the file request is used to upload a file and the file request carries the protected identifier, store the file specified by the file request and record the protected identifier corresponding to the file; an access module, configured to trigger access to the file when the file request carries the protected identifier and the file corresponding to the file specified by the file request has the protected identifier recorded therein, if the file request is used to access the file; When the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the file request carries a protected identifier added by the gateway, and the added protected identifier corresponds to the egress network address corresponding to the terminal in the gateway data table; the gateway data table stores the egress network address of the protected network area and the corresponding protected identifier; The added protected identifier is that when the egress network address corresponding to the terminal exists in the gateway data table accessed by the gateway, the gateway reads the protected identifier corresponding to the egress network address corresponding to the terminal from the gateway data table, and adds the read protected identifier to the preset free attribute field in the request header of the file request; In the case where the file request is used to upload a file, when the file request carries the protected identifier, storing the file specified by the file request and recording the protected identifier corresponding to the file includes: In the case where the file request is used to upload a file, when the file request carries the protected identifier, the file meta-attribute information of the file specified by the file request and the protected identifier are stored correspondingly, and the file corresponding to the file meta-attribute information is stored; In the case where the file request is used to access a file, when the file request carries the protected identifier and the file corresponding to the file specified by the file request has the protected identifier recorded, triggering access to the file includes: In the case where the file request is used to access a file, when the file request carries the protected identifier and the file meta-attribute information of the file specified by the file request is consistent with the stored file meta-attribute information, access to the file is triggered according to the file meta-attribute information.
6. The device according to claim 5, characterized in that The access module is further configured to deny access and return access failure information when the protected identifier carried by the file request is inconsistent with the protected identifier recorded corresponding to the file specified by the file request, when the file request is used to access the file.
7. The device according to claim 5, characterized in that The access module is also used to deny access and return access failure information when the file request is used to access a file and the export network address of the file request comes from a non-protected network area and the file record specified by the file request has a protected identifier.
8. The device according to claim 5, characterized in that The access module is further configured to trigger access to the file when the file request is used to access the file and when the file request does not carry the protected identifier and the file specified by the file request does not record the protected identifier.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
File processing method, device, equipment and system
CN111431957A
