A method, device, equipment and storage medium for file resource authentication
Through the collaborative work of the proxy server and the authentication module, the problem of low flexibility in calling cloud service resources is solved, and secure and flexible access to cloud service files by external network users is achieved.
Patent Information
- Application Number
- CN202111676476.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The resource authentication and control issues of cloud services are limited by heterogeneous systems, making it difficult for authorized users to access internal cloud services to request data when using external networks, resulting in low resource calling flexibility.
The proxy server obtains user request information, generates user request instructions and forwards them to the preset authentication module, including the business system and authentication server, to generate authentication address information and push the target file stream, thereby realizing Token authentication of user information and dynamic authentication address generation.
It improves the flexibility of calling cloud service resources and ensures that external network users can access file resources in cloud services securely and flexibly.
Smart Images

Figure CN114329608B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of resource authentication, and in particular to a method, apparatus, device, and storage medium for file resource authentication. Background Art
[0002] Authentication verifies that a user has the right to access a system. Many webpages require authentication, and users expect servers to set rules to filter requests to ensure they are legitimate and protect user privacy. For downloaders of video and text files, without effective authentication, illegal hotlinking can lead to content leaks and additional bandwidth costs.
[0003] In recent years, increasing attention has been paid to resource management within cloud services. Consequently, authentication has been incorporated into cloud services, enabling them to open metadata while preventing unauthorized access, thereby improving metadata security. However, with the widespread adoption of cloud services, resource authentication and control issues are limited by heterogeneous systems. This makes it difficult for authorized users to access internal cloud services and request data while using external networks, resulting in limited flexibility in resource invocation. Summary of the Invention
[0004] In order to improve the flexibility of cloud service resource invocation, the present application provides a method, apparatus, device and storage medium for file resource authentication.
[0005] In the first aspect, the present application provides a method for file resource authentication, which adopts the following technical solution:
[0006] A method for file resource authentication, comprising:
[0007] When a data submission instruction is detected, obtaining user request information, wherein the data submission instruction is triggered by the user through the target device;
[0008] Generate a user request instruction based on the user request information, and forward the user request instruction to a preset authentication module, wherein the preset authentication module includes a business system and an authentication server;
[0009] Receive the authentication address information pushed by the preset authentication module;
[0010] A target file stream specified in the cloud service is determined based on the authentication address information, and the target file stream is pushed to the target device.
[0011] By adopting the above technical solution, when an authorized user accesses files in the cloud service through the external network, the user generates a data submission instruction by clicking the login button on the target device (mobile phone, tablet and computer). After the proxy server receives and detects the data submission instruction, it obtains the user request information, then generates a user request instruction based on the user request information, and forwards the user request instruction to the preset authentication module. After the authentication module completes the authentication of the user request instruction, it generates authentication address information and forwards the authentication address information to the proxy server. The proxy server determines the target file stream specified in the cloud service based on the authentication address information and pushes the target file stream to the target device, thereby achieving the effect of improving the flexibility of cloud service resource calls.
[0012] In another possible implementation, the generating a user request instruction based on the user request information includes:
[0013] Analyze the user request information to obtain network address type information;
[0014] Determining whether the network address type information matches preset network address type information, where the preset network address type information is used to represent intranet address information;
[0015] If there is no match, a user request instruction is generated based on the user request information.
[0016] Through the above technical solution, after the proxy server receives the user request information, it determines the network address type information of the current user based on the user's network address, wherein the network address type information includes intranet address information and extranet address information. If the network address information of the current user is an external network, a user request instruction is generated based on the user request information, thereby achieving the effect of judging the user's network type.
[0017] In another possible implementation, analyzing the user request instruction to obtain network address type information includes:
[0018] Parsing the user request information to obtain a request information character string;
[0019] Character interception is performed on the information character string to obtain network address type information.
[0020] By adopting the above technical solution, when obtaining network address type information, the user request information is parsed to obtain the request information string, and then the request information string is intercepted to obtain the network address type information, thereby achieving the effect of obtaining the network address type information.
[0021] In another possible implementation, the proxy forwards the user request instruction to a preset authentication module, and the preset authentication module includes a business system and an authentication server;
[0022] Receiving the authentication address information pushed by the preset authentication module includes:
[0023] Forwarding the user request instruction to the business system for logical analysis to determine the user information corresponding to the user request instruction;
[0024] Pushing the user information to the authentication server based on the business system, performing Token authentication on the user information, and determining whether the user information meets the preset authentication information;
[0025] If the conditions are met, the authentication server generates authentication pass information and pushes the authentication pass information to the business system;
[0026] The business system generates authentication address information based on the received authentication pass information and the user request instruction.
[0027] By adopting the above technical solution, when authenticating a user request instruction, the user request instruction agent is first forwarded to the business system for logical analysis to determine the user information corresponding to the user request instruction. Then, the user information is pushed to the authentication server according to the business system. The authentication server performs Token authentication on the user information to determine whether the user information meets the preset authentication information. When the user information meets the preset authentication information, the authentication server generates authentication pass information and pushes the authentication pass information to the business system. The business system generates authentication address information based on the received authentication pass information, thereby achieving the effect of authenticating the user information.
[0028] In another possible implementation, the business system generates authentication address information based on the received authentication pass information, including:
[0029] Determining user key information of the user based on the authentication pass information;
[0030] Determining the user's access path information and user identification information based on the user request instruction;
[0031] Based on the business system, a logical algorithm is performed on the user key information, the access path information and the user identification information to generate authentication address information.
[0032] By adopting the above technical solution, when generating authentication address information, the authentication information is first analyzed to determine the user's user key information, and then the user's access path information and user identification information are determined based on the user's request instruction. Finally, the business system performs MD5 logical algorithm on the user key information, access path information and user identification information to generate authentication address information, thereby achieving the effect of generating dynamic authentication address information.
[0033] In another possible implementation, the method further includes determining a target file stream specified in the cloud service based on the authentication address information and pushing the target file stream to the target device, and then further including:
[0034] Obtaining the current access time information of the user;
[0035] User access record information is generated based on the current access time information and the target file stream.
[0036] By adopting the above technical solution, when recording user access data, user access record information is generated by obtaining current access time information and target file stream, so as to facilitate subsequent statistics of user access records.
[0037] In another possible implementation, the business system pushes the user information to the authentication server, performs token authentication on the user information, and determines whether the user information meets the preset authentication information, and then further includes:
[0038] If the user information does not meet the preset authentication information, determining whether the user information contains second preset authentication information;
[0039] If included, authenticating the user information using the second preset authentication information;
[0040] If not, an error message is generated and pushed to the target device.
[0041] By adopting the above technical solution, when the user information does not meet the preset authentication information, it is determined whether the user information contains the second preset authentication information, that is, the information generated by the authentication server when the first user request instruction sent by the user is authenticated. By obtaining the current user request instruction, the requested file path information, IP address information, file path information, valid time information and key index information are determined, and the above information is hashed and encoded to obtain the second preset authentication information. If the user information contains the second preset authentication information, the second preset authentication information is used to authenticate the user information. If it does not contain it, an error message is generated and pushed to the target device, thereby achieving the effect of improving request efficiency.
[0042] In a second aspect, the present application provides a device for file resource authentication, which adopts the following technical solution:
[0043] A device for file resource authentication, comprising:
[0044] A first acquisition module is configured to acquire user request information upon detecting a data submission instruction, wherein the data submission instruction is triggered by a user through a target device;
[0045] a forwarding module, configured to generate a user request instruction based on the user request information, and forward the user request instruction to a preset authentication module, wherein the preset authentication module includes a business system and an authentication server;
[0046] An address receiving module, configured to receive the authentication address information pushed by the preset authentication module;
[0047] The first push module is configured to determine a target file stream specified in the cloud service based on the authentication address information, and push the target file stream to the target device.
[0048] By adopting the above technical solution, when an authorized user accesses files in the cloud service through the external network, the user generates a data submission instruction by clicking the login button on the target device (mobile phone, tablet and computer). After the proxy server receives and detects the data submission instruction, it obtains the user request information, then generates a user request instruction based on the user request information, and forwards the user request instruction to the preset authentication module. After the authentication module completes the authentication of the user request instruction, it generates authentication address information and forwards the authentication address information to the proxy server. The proxy server determines the target file stream specified in the cloud service based on the authentication address information and pushes the target file stream to the target device, thereby achieving the effect of improving the flexibility of cloud service resource calls.
[0049] In a possible implementation, when the forwarding module generates the user request instruction based on the user request information, it is specifically configured to:
[0050] Analyze the user request information to obtain network address type information;
[0051] Determining whether the network address type information matches preset network address type information, where the preset network address type information is used to represent intranet address information;
[0052] If there is no match, a user request instruction is generated based on the user request information.
[0053] In another possible implementation, when the forwarding module analyzes the user request instruction and obtains the network address type information, it is specifically configured to:
[0054] Parsing the user request information to obtain a request information character string;
[0055] Character interception is performed on the information character string to obtain network address type information.
[0056] In another possible implementation, the forwarding module forwards the user request instruction to a preset authentication module, and the preset authentication module includes a business system and an authentication server;
[0057] When receiving the authentication address information pushed by the preset authentication module, the address receiving module is specifically used to:
[0058] Forwarding the user request instruction to the business system for logical analysis to determine the user information corresponding to the user request instruction;
[0059] Pushing the user information to the authentication server based on the business system, performing Token authentication on the user information, and determining whether the user information meets the preset authentication information;
[0060] If the conditions are met, the authentication server generates authentication pass information and pushes the authentication pass information to the business system;
[0061] The business system generates authentication address information based on the received authentication pass information.
[0062] In another possible implementation, the business system generates authentication address information based on the received authentication pass information, specifically for:
[0063] Determining user key information of the user based on the authentication pass information;
[0064] Determining the user's access path information and user identification information based on the user request instruction;
[0065] Based on the business system, a logical algorithm is performed on the user key information, the access path information and the user identification information to generate authentication address information.
[0066] In another possible implementation, the apparatus further includes: a second acquisition module and a generation module, wherein:
[0067] The second acquisition module is used to obtain the current access time information of the user;
[0068] The production module is used to generate user access record information based on the current access time information and the target file stream.
[0069] In another possible implementation, the device further includes: an information determination module, an authentication module, and a second push module, wherein:
[0070] The information judgment module is configured to judge whether the user information contains second preset authentication information if the user information does not meet the preset authentication information;
[0071] The authentication module is configured to, when included, authenticate the user information using second preset authentication information;
[0072] The second push module is configured to generate an error message when the target device is not included, and push the error message to the target device.
[0073] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:
[0074] An electronic device, comprising:
[0075] one or more processors;
[0076] Memory;
[0077] One or more applications, wherein the one or more applications are stored in a memory and configured to be executed by one or more processors, and the one or more programs are configured to: execute a method for file resource authentication shown in any possible implementation of the first aspect.
[0078] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0079] A computer-readable storage medium includes: a computer program stored therein that can be loaded and executed by a processor to implement a method for file resource authentication shown in any possible implementation of the first aspect.
[0080] In summary, this application includes at least one of the following beneficial technical effects:
[0081] 1. By adopting the above technical solution, when an authorized user accesses files in a cloud service through an external network, the user generates a data submission instruction by clicking the login button on the target device (mobile phone, tablet, or computer). After receiving and detecting the data submission instruction, the proxy server obtains the user request information, then generates a user request instruction based on the user request information, and forwards the user request instruction to a preset authentication module. After the authentication module authenticates the user request instruction, it generates authentication address information and forwards the authentication address information to the proxy server. The proxy server determines the target file stream specified in the cloud service based on the authentication address information and pushes the target file stream to the target device, thereby achieving the effect of improving the flexibility of cloud service resource invocation.
[0082] 2. By adopting the above technical solution, when authenticating a user request instruction, the user request instruction agent is first forwarded to the business system for logical analysis to determine the user information corresponding to the user request instruction. Then, the user information is pushed to the authentication server according to the business system. The authentication server performs Token authentication on the user information to determine whether the user information meets the preset authentication information. When the user information meets the preset authentication information, the authentication server generates authentication pass information and pushes the authentication pass information to the business system. The business system generates authentication address information based on the received authentication pass information, thereby achieving the effect of authenticating the user information. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 This is a flowchart of a method for file resource authentication according to an embodiment of the present application;
[0084] Figure 2 This is a structural diagram of a device for file resource authentication according to an embodiment of the present application;
[0085] Figure 3 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0086] The following is combined with Figure 1-3 This application is described in further detail.
[0087] After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed, but as long as they are within the scope of the claims of this application, they are protected by patent law.
[0088] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0089] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates an "or" relationship between the related objects.
[0090] The embodiments of the present application are described in further detail below with reference to the accompanying drawings.
[0091] The embodiment of the present application provides a method for file resource authentication, which is executed by an electronic device, which may be a server, wherein the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The embodiment of the present application is not limited here, such as Figure 1 As shown, the method includes:
[0092] Step S10: After a data submission instruction is detected, user request information is obtained. The data submission instruction is triggered by the user through the target device.
[0093] For the embodiment of the present application, the target device can be a mobile terminal device used by the user, or a self-service terminal device, which is not limited here.
[0094] Specifically, the user fills in the user request information through the terminal device. The user information can be a user name and a user password, and sends the filled-in user request information to the proxy server. The proxy server is the Nginx reverse proxy server, and the reverse proxy refers to sending requests to the internal server on behalf of the external network user, that is, receiving connection requests from users on the Internet, and forwarding these requests to the server on the internal network, and then returning the response obtained from the internal server to the client requesting the connection on the Internet.
[0095] Step S11: Generate a user request instruction based on the user request information, and forward the user request instruction to a preset authentication module. The preset authentication module includes a business system and an authentication server.
[0096] Specifically, the Nginx reverse proxy server converts user request information into user request instructions, and forwards the generated user request instructions to the business system. The business system performs logical processing on the user request instructions and sends the processed user request instructions to the authentication server for Token authentication.
[0097] Specifically, Token is when the terminal frequently requests data from the server, and the server frequently goes to the database to query the username and password and compares them to determine whether the username and password are correct and make corresponding prompts. In this context, Token came into being. Token is a string of characters generated by the server as a token for the client to make requests. After the first login, the server generates a Token and returns this Token to the client. In the future, the client only needs to bring this Token to request data without having to bring the username and password again.
[0098] Step S12: receiving the authentication address information pushed by the preset authentication module.
[0099] Specifically, after the authentication server successfully authenticates the user request instruction, it generates authentication success information and returns the authentication success information to the business system. After the business system receives the authentication success information, it generates authentication address information and returns the authentication address information to the Nginx reverse proxy server.
[0100] Step S13: Determine the target file stream specified in the cloud service based on the authentication address information, and push the target file stream to the target device.
[0101] Specifically, the Nginx reverse proxy server accesses the cloud service according to the authentication address information, and the cloud service returns a target file stream that matches the authentication address information, and pushes the target file stream to the user terminal device through the Nginx reverse proxy server.
[0102] In an embodiment of the present application, when an authorized user accesses a file in a cloud service through an external network, the user generates a data submission instruction by clicking the login button on the target device (mobile phone, tablet, and computer). After the proxy server receives and detects the data submission instruction, it obtains the user request information, then generates a user request instruction based on the user request information, and forwards the user request instruction to a preset authentication module. After the authentication module completes the authentication of the user request instruction, it generates authentication address information and forwards the authentication address information to the proxy server. The proxy server determines the target file stream specified in the cloud service based on the authentication address information, and pushes the target file stream to the target device, thereby achieving the effect of improving the flexibility of cloud service resource calls.
[0103] In a possible implementation of the embodiment of the present application, step S11 specifically includes step S111 (not shown in the figure) and step S112 (not shown in the figure), wherein:
[0104] Step S111: Analyze the user request information to obtain network address type information.
[0105] Step S112: determining whether the network address type information matches preset network address type information, where the preset network address type information is used to represent intranet address information.
[0106] Specifically, an intranet is generally composed of three major components: computer equipment, network connection equipment, and network transmission media. Computer equipment includes servers and workstations, network connection equipment includes network cards, hubs, and switches, and network transmission media is simply network cables, consisting of coaxial cables, twisted pair cables, and fiber optic cables. The extranet, on the other hand, is connected using a common set of protocols, forming a logically single, vast global network. This network includes network equipment such as switches and routers, various connection links, a wide variety of servers, and countless computers and terminals. By distinguishing the above components from user request information, the network address type information currently used by the user is determined.
[0107] In a possible implementation of the embodiment of the present application, step S111 specifically includes step S1111 (not shown in the figure) and step S1112 (not shown in the figure), wherein:
[0108] Step S1111: parse the user request information to obtain the request information character string.
[0109] Step S1112: intercept the information character string to obtain network address type information.
[0110] Specifically, by obtaining the IP address of the user request information, the network type information is determined. For example, the preset intranet IP address includes 192.168.255.255. The obtained request information string is intercepted to obtain the information string about the IP address, and the information string is compared with the intranet IP address to determine the network address type information of the current user request information.
[0111] In a possible implementation of the embodiment of the present application, step S12 specifically includes step S121 (not shown in the figure), step S122 (not shown in the figure), step S123 (not shown in the figure), and step S124 (not shown in the figure), wherein:
[0112] Step S121 : forwarding the user request instruction to the business system for logic analysis to determine the user information corresponding to the user request instruction.
[0113] In step S122, the business system pushes the user information to the authentication server, performs Token authentication on the user information, and determines whether the user information meets the preset authentication information.
[0114] Step S123: If the conditions are met, the authentication server generates authentication pass information and pushes the authentication pass information to the business system.
[0115] In step S124, the business system generates authentication address information based on the received authentication pass information and the user request instruction.
[0116] Specifically, when authenticating a user request instruction, the user request instruction agent is first forwarded to the business system for logical analysis to determine the user information corresponding to the user request instruction. Then, the user information is pushed to the authentication server according to the business system. The authentication server performs Token authentication on the user information to determine whether the user information meets the preset authentication information. When the user information meets the preset authentication information, the authentication server generates authentication pass information and pushes the authentication pass information to the business system. The business system generates authentication address information based on the received authentication pass information, thereby achieving the effect of authenticating the user information.
[0117] In a possible implementation of the embodiment of the present application, step S124 specifically includes step S1241 (not shown in the figure), step S1242 (not shown in the figure), and step S1243 (not shown in the figure), wherein:
[0118] Step S1241: Determine the user's user key information based on the authentication pass information.
[0119] Step S1242: Determine the user's access path information and user identification information based on the user request instruction.
[0120] Step S1243: Based on the business system, a logical algorithm is performed on the user key information, access path information, and user identification information to generate authentication address information.
[0121] Specifically, the MD5 logical algorithm is performed through the user key information, access path information and user identification information to generate the authentication address information. For example, the generated authentication address information is "http: / / file.epod.cn / file / cip / 9780981755724 / m / cover.jpgclientId=11221&signMethod=SHA256withRSA&sign=", where "http: / / file.epod.cn / file / cip / 9780981755724 / m / cover.jpg" is the access path information, "clientId=11221" is the user identification information, and "signMethod=SHA256withRSA&sign=" is the user key information.
[0122] In a possible implementation of the embodiment of the present application, step S13 further includes step S131 (not shown in the figure), step S132 (not shown in the figure), and step S133 (not shown in the figure), wherein:
[0123] Step S131: Acquire the user's current access time information.
[0124] Step S132: Generate user access record information based on the current access time information and the target file stream.
[0125] In a possible implementation of the embodiment of the present application, step S122 further includes step Sa (not shown in the figure), step Sb (not shown in the figure), and step Sc (not shown in the figure), wherein:
[0126] In step Sa, if the user information does not meet the preset authentication information, it is determined whether the user information includes second preset authentication information.
[0127] Step Sb: If included, the user information is authenticated using the second preset authentication information.
[0128] Step Sc: If not included, an error message is generated and pushed to the target device.
[0129] Specifically, when the user information does not meet the preset authentication information, it is determined whether the user information contains the second preset authentication information, that is, the information generated by the authentication server when the first user request instruction sent by the user is authenticated. By obtaining the current user request instruction, the requested file path information, IP address information, file path information, valid time information and key index information are determined, and the above information is hashed and encoded to obtain the second preset authentication information. If the user information contains the second preset authentication information, the second preset authentication information is used to authenticate the user information. If it does not contain it, an error message is generated and pushed to the target device, thereby achieving the effect of improving request efficiency.
[0130] The above embodiment introduces a method for file resource authentication from the perspective of method flow. The following embodiment introduces a device for file resource authentication from the perspective of a virtual module or virtual unit. Please refer to the following embodiment for details.
[0131] The embodiment of the present application provides a device for file resource authentication. As shown in the figure, the device 20 may specifically include: a first acquisition module 21, a forwarding module 22, an address receiving module 23 and a first push module 24, wherein:
[0132] A first acquisition module 21 is configured to acquire user request information upon detecting a data submission instruction, wherein the data submission instruction is triggered by the user through a target device;
[0133] The forwarding module 22 is used to generate a user request instruction based on the user request information, and forward the user request instruction to the preset authentication module, which includes a business system and an authentication server;
[0134] The address receiving module 23 is used to receive the authentication address information pushed by the preset authentication module;
[0135] The first push module 24 is configured to determine a target file stream specified in the cloud service based on the authentication address information, and push the target file stream to a target device.
[0136] In one possible implementation of the embodiment of the present application, when the forwarding module 22 generates the user request instruction based on the user request information, it is specifically configured to:
[0137] Analyze user request information and obtain network address type information;
[0138] Determining whether the network address type information matches preset network address type information, where the preset network address type information is used to represent intranet address information;
[0139] If there is no match, a user request instruction is generated based on the user request information.
[0140] In another possible implementation of the embodiment of the present application, when the forwarding module 22 analyzes the user request instruction and obtains the network address type information, it is specifically configured to:
[0141] Parse the user request information and obtain the request information string;
[0142] Intercept the information string to obtain the network address type information.
[0143] In another possible implementation of the embodiment of the present application, the forwarding module 22 forwards the user request instruction to the preset authentication module, and the preset authentication module includes a business system and an authentication server;
[0144] When receiving the authentication address information pushed by the preset authentication module, the address receiving module is specifically used to:
[0145] Forward the user request instruction to the business system for logical analysis to determine the user information corresponding to the user request instruction;
[0146] Based on the business system, the user information is pushed to the authentication server, and the user information is authenticated by token to determine whether the user information meets the preset authentication information;
[0147] If satisfied, the authentication server generates authentication pass information and pushes the authentication pass information to the business system;
[0148] The business system generates authentication address information based on the received authentication pass information.
[0149] In another possible implementation of the embodiment of the present application, the business system generates authentication address information based on the received authentication pass information, specifically for:
[0150] Based on the authentication information, determine the user's user key information;
[0151] Determine the user's access path information and user identification information based on the user request instruction;
[0152] Based on the business system, a logical algorithm is performed on the user key information, access path information and user identification information to generate authentication address information.
[0153] In another possible implementation of the embodiment of the present application, the apparatus 20 further includes: a second acquisition module and a generation module, wherein:
[0154] The second acquisition module is used to obtain the user's current access time information;
[0155] The production module is used to generate user access record information based on current access time information and target file stream.
[0156] In another possible implementation of the embodiment of the present application, the device 20 further includes: an information determination module, an authentication module, and a second push module, wherein:
[0157] An information determination module, configured to determine whether the user information contains second preset authentication information if the user information does not satisfy the preset authentication information;
[0158] an authentication module, configured to, when included, authenticate user information using second preset authentication information;
[0159] The second push module is used to generate an error message when the target device is not included, and push the error message to the target device.
[0160] An electronic device is provided in an embodiment of the present application, such as Figure 3 As shown, Figure 3 The electronic device 300 shown includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device 300 may further include a transceiver 304. It should be noted that in actual applications, the number of transceivers 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.
[0161] Processor 301 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0162] Bus 302 may include a path for transmitting information between the above components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0163] The memory 303 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0164] The memory 303 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the content shown in the above method embodiment.
[0165] Electronic devices include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. They may also include servers, etc. Figure 3 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0166] The embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content of the aforementioned method embodiment. Compared with the related art, in the embodiment of the present application, when a user with permission accesses a file in a cloud service through an external network, the user generates a data submission instruction by clicking a login button on a target device (a mobile phone, a tablet, and a computer). After the proxy server receives and detects the data submission instruction, it obtains user request information, then generates a user request instruction based on the user request information, and forwards the user request instruction to a preset authentication module. After the authentication module completes the authentication of the user request instruction, it generates authentication address information and forwards the authentication address information to the proxy server. The proxy server determines the target file stream specified in the cloud service based on the authentication address information and pushes the target file stream to the target device, thereby achieving the effect of improving the flexibility of cloud service resource calls.
[0167] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0168] The above are only some of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for file resource authentication, characterized in that: include: When a data submission instruction is detected, obtaining user request information, wherein the data submission instruction is triggered by the user through the target device; Generate a user request instruction based on the user request information, and forward the user request instruction to a preset authentication module, wherein the preset authentication module includes a business system and an authentication server; Receive the authentication address information pushed by the preset authentication module; The proxy forwards the user request instruction to a preset authentication module, wherein the preset authentication module includes a business system and an authentication server; Receiving the authentication address information pushed by the preset authentication module includes: Forwarding the user request instruction to the business system for logical analysis to determine the user information corresponding to the user request instruction; Pushing the user information to the authentication server based on the business system, performing Token authentication on the user information, and determining whether the user information meets the preset authentication information; If the conditions are met, the authentication server generates authentication pass information and pushes the authentication pass information to the business system; The business system generates authentication address information based on the received authentication pass information and the user request instruction; The business system generates authentication address information based on the received authentication pass information, including: Determining user key information of the user based on the authentication pass information; Determining the user's access path information and user identification information based on the user request instruction; Performing a logic algorithm on the user key information, the access path information, and the user identification information based on the business system to generate authentication address information; A target file stream specified in the cloud service is determined based on the authentication address information, and the target file stream is pushed to the target device.
2. The method according to claim 1, characterized in that Generating a user request instruction based on the user request information includes: Analyze the user request information to obtain network address type information; Determining whether the network address type information matches preset network address type information, where the preset network address type information is used to represent intranet address information; If there is no match, a user request instruction is generated based on the user request information.
3. The method according to claim 2, characterized in that The analyzing the user request information to obtain network address type information includes: Parsing the user request information to obtain a request information character string; Character interception is performed on the information character string to obtain network address type information.
4. The method according to claim 1, wherein The method further comprises: determining a target file stream specified in the cloud service based on the authentication address information, and pushing the target file stream to the target device; Obtaining the current access time information of the user; User access record information is generated based on the current access time information and the target file stream.
5. The method according to claim 1, wherein The business system pushes the user information to the authentication server, performs token authentication on the user information, and determines whether the user information meets the preset authentication information, and then further includes: If the user information does not meet the preset authentication information, determining whether the user information contains second preset authentication information; If included, authenticating the user information using the second preset authentication information; If not, an error message is generated and pushed to the target device.
6. A device for file resource authentication, characterized in that: include: A first acquisition module is configured to acquire user request information upon detecting a data submission instruction, wherein the data submission instruction is triggered by a user through a target device; a forwarding module, configured to generate a user request instruction based on the user request information, and forward the user request instruction to a preset authentication module, wherein the preset authentication module includes a business system and an authentication server; An address receiving module, configured to receive the authentication address information pushed by the preset authentication module; The forwarding module forwards the user request instruction to the preset authentication module, and the preset authentication module includes a business system and an authentication server; When receiving the authentication address information pushed by the preset authentication module, the address receiving module is specifically used to: Forwarding the user request instruction to the business system for logical analysis to determine the user information corresponding to the user request instruction; Pushing the user information to the authentication server based on the business system, performing Token authentication on the user information, and determining whether the user information meets the preset authentication information; If the conditions are met, the authentication server generates authentication pass information and pushes the authentication pass information to the business system; The business system generates authentication address information based on the received authentication pass information; The business system generates authentication address information based on the received authentication pass information, specifically for: Determining user key information of the user based on the authentication pass information; Determining the user's access path information and user identification information based on the user request instruction; Performing a logic algorithm on the user key information, the access path information, and the user identification information based on the business system to generate authentication address information; The first push module is configured to determine a target file stream specified in the cloud service based on the authentication address information, and push the target file stream to the target device.
7. An electronic device, characterized in that: The electronic device includes: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in a memory and configured to be executed by one or more processors, and the one or more applications are configured to: execute a file resource authentication method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that include: The invention stores a computer program which can be loaded by a processor and executes a file resource authentication method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data proxy method and system, and proxy server
CN112272158A