Storage access method and device based on object storage and cache authentication and medium
Through the method based on object storage and cache authentication, the problem of inefficient user authentication and data storage of microservice modules on supply chain finance platform is solved, efficient and secure data access and storage is achieved, and the stability of microservice data is improved. and storage security.
Patent Information
- Application Number
- CN202411355449.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-03
AI Technical Summary
The existing supply chain financial platform microservice module is inefficient in user authentication and data storage, and is difficult to withstand the data access of a large number of concurrent users, affecting computing performance.
The storage access method based on object storage and cache authentication is adopted, and data storage and access efficiency is optimized through cluster initialization, storage pool initialization, gateway configuration, open authorization, user delay authentication and token caching.
It improves the stability and security of microservice data, optimizes the efficiency of storage resource usage, realizes efficient access control and data storage security, reduces the number of token accesses, and improves data access efficiency.
Smart Images

Figure CN119071081A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data authentication technology, and in particular to a storage access method, device and medium based on object storage and cache authentication. Background Art
[0002] The supply chain finance platform is a financial service platform that aims to provide financing, settlement, risk management and other services to all participants in the supply chain to promote the smooth operation of the supply chain and the flow of funds. Existing supply chain finance platforms are mostly composed of multiple microservice modules. When users use the microservice modules of the supply chain finance platform, they need to perform user authentication every time, which reduces the efficiency of the use of the microservice modules.
[0003] In addition, the various microservice modules of the supply chain finance platform often use local file storage or NAS storage to store static files, which is difficult to resist data access by a large number of concurrent users. This will greatly affect the computing performance of the platform and may lead to low efficiency in accessing stored data. Summary of the invention
[0004] The present invention provides a storage access method, device and medium based on object storage and cache authentication, the main purpose of which is to solve the problem of low efficiency when accessing storage data.
[0005] To achieve the above object, the present invention provides a storage access method based on object storage and cache authentication, comprising:
[0006] Perform cluster initialization and storage pool initialization operations on the pre-acquired supply chain microservice data to obtain an object storage pool;
[0007] According to the object storage pool, gateway configuration and object bucket storage are performed on the supply chain microservice data to obtain a microservice storage bucket;
[0008] Open authorization for the microservice storage bucket to obtain an authorized microservice storage bucket;
[0009] Perform delayed user authentication on the authorized microservice storage bucket to obtain an access token, and perform token verification on the access token to obtain a verification result;
[0010] The access token is cached according to the verification result, and data is shared with the authorized microservice storage bucket.
[0011] Optionally, performing cluster initialization and storage pool initialization operations on the pre-acquired supply chain microservice data to obtain an object storage pool includes:
[0012] Extract data attributes from the pre-acquired supply chain microservice data to obtain microservice data attributes;
[0013] Performing a cluster initialization operation on the supply chain microservice data according to the microservice data attributes to obtain a standard storage node;
[0014] Initializing a node pool for the standard storage nodes to obtain an initial storage pool;
[0015] Performing storage pool configuration on the initial storage pool according to the microservice data attribute to obtain a configuration storage pool;
[0016] Object verification is performed on the configuration storage pool to obtain an object storage pool.
[0017] Optionally, performing a cluster initialization operation on the supply chain microservice data according to the microservice data attributes to obtain a standard storage node includes:
[0018] Initializing nodes of the supply chain microservice data to obtain initial storage nodes;
[0019] Performing node monitoring on the initial storage node to obtain a monitoring storage node;
[0020] Performing object storage deployment on the monitoring storage node to obtain an object storage node;
[0021] Parameters of the object storage node are configured according to the microservice data attributes to obtain a standard storage node.
[0022] Optionally, performing gateway configuration and object bucket storage on the supply chain microservice data according to the object storage pool to obtain a microservice storage bucket includes:
[0023] Performing module feature clustering on the supply chain microservice data to obtain a module service class set;
[0024] Performing data mapping on the module service class set according to the supply chain microservice data to obtain a module data set;
[0025] Performing a bucket initialization operation on the supply chain microservice data according to the module data set to obtain a storage bucket set;
[0026] Performing reverse proxy setting on the bucket set to obtain a proxy bucket set;
[0027] Performing gateway configuration on the proxy storage bucket set to obtain a gateway storage bucket set;
[0028] The module data set is accessed and stored using the gateway storage bucket set to obtain a microservice storage bucket.
[0029] Optionally, the module feature clustering of the supply chain microservice data to obtain a module service class set includes:
[0030] Decomposing the supply chain microservice data into modules to obtain a module service data set;
[0031] Performing multi-dimensional module feature extraction on the module service data set to obtain a module permission feature set, a module content feature set, and a module type feature set;
[0032] Merging the module permission feature set, the module content feature set and the module type feature set into a module service feature set;
[0033] Performing distribution detection on the module service feature set to obtain service feature distribution;
[0034] Selecting a number of module service features as primary central features according to the distribution of the service features in the module service feature set;
[0035] The clustering distance between each module service feature and each primary center feature in the module service feature set is calculated using the following microservice clustering distance algorithm:
[0036]
[0037] Among them, M i,j It refers to the clustering distance between the i-th module service feature and the j-th primary center feature in the module service feature set, x i refers to the ith module service feature in the module service feature set, y j refers to the jth primary central feature, · is the dot product symbol, ‖‖ is the Euclidean norm symbol, i, j are feature indices, T is the transpose symbol, and cov() is the covariance function symbol;
[0038] The module service feature set is iteratively clustered according to the clustering distance to obtain a module service class set.
[0039] Optionally, the performing open authorization on the microservice storage bucket to obtain an authorized microservice storage bucket includes:
[0040] Extract authorization information from the preset user database to obtain the authorization server, authorization client and authorization key;
[0041] Perform server configuration on the microservice storage bucket according to the authorization server to obtain a server microservice storage bucket;
[0042] Perform user registration on the server microservice storage bucket according to the authorized client to obtain a user microservice storage bucket;
[0043] Encrypt the user microservice storage bucket according to the authorization key to obtain an encrypted microservice storage bucket;
[0044] Endpoint authorization is performed on the encrypted microservice storage bucket to obtain an authorized microservice storage bucket.
[0045] Optionally, performing delayed user authentication on the authorized microservice storage bucket to obtain an access token includes:
[0046] Using the authorized microservice storage bucket to obtain the user's access request;
[0047] Performing server authentication on the access request to obtain a request authentication result;
[0048] Generate an access authorization code according to the request authentication result;
[0049] Determine whether there is an authorization token corresponding to the access authorization code in the preset local cache;
[0050] If it exists, the authorization token is used as the access token;
[0051] If it does not exist, the access authorization code is token acquired to obtain the token header, token payload and authorization key;
[0052] The access token is calculated based on the token header, the token payload and the authorization key using the following access token algorithm:
[0053] S=SHA256[k,Base64Encode(h)+.+Base64Encode(p)]
[0054] Wherein, S refers to the access token, SHA256 is a secure hash encryption algorithm, k refers to the authorization key, Base64Encode is a Base64 encoding function, h refers to the token header, + is a character concatenation symbol, . is a character separator, and p is the token payload.
[0055] Optionally, performing token verification on the access token to obtain a verification result includes:
[0056] Decrypt the access token to obtain a token header, a token payload, and an authorization key;
[0057] Using a preset authorized public key to perform key verification on the authorized key to obtain a key verification result;
[0058] Performing a type check on the token header to obtain a type check result;
[0059] Performing permission verification on the token payload to obtain a permission verification result;
[0060] A logical AND operation is performed on the key verification result, the type verification result, and the authority verification result to obtain a verification result.
[0061] Optionally, the caching the access token according to the verification result includes:
[0062] Determining whether the verification result is true;
[0063] If not, a verification failure message is generated;
[0064] If so, the access token is stored in a preset local cache, and a validity period is set for the access token.
[0065] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein:
[0066] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned storage access method based on object storage and cache authentication.
[0067] In order to solve the above problems, the present invention also provides a computer-readable storage medium storing a computer program, which implements the above storage access method based on object storage and cache authentication when executed by a processor.
[0068] The embodiments of the present invention can achieve high availability and redundancy of data, improve the stability and security of microservice data, and monitor the status of the storage pool in real time by performing cluster initialization and storage pool initialization operations, thereby optimizing the utilization efficiency of storage resources. By performing gateway configuration and object bucket storage, microservice module data of different types and permissions can be stored separately, thereby improving the security of data storage. By opening the microservice storage bucket for authorization, unified access authorization management can be performed for each stored microservice module data and the corresponding storage bucket, thereby improving the security of data storage.
[0069] By performing delayed user authentication and obtaining an access token, efficient access control can be achieved, the number of token accesses is reduced, the efficiency of access verification is improved, and the security and independence of data storage are guaranteed. By performing token caching, the data verification efficiency of users during continuous storage access can be ensured, and the security of data storage and the efficiency of data access are improved. Therefore, the storage access method, device, and medium based on object storage and cache authentication proposed in the present invention can solve the problem of low efficiency when accessing storage data. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A flowchart of a storage access method based on object storage and cache authentication provided by an embodiment of the present invention;
[0071] Figure 2 A schematic diagram of a process for initializing an object storage pool provided by an embodiment of the present invention;
[0072] Figure 3 A schematic diagram of a process for generating a standard storage node according to an embodiment of the present invention;
[0073] Figure 4 A functional module diagram of a storage access system based on object storage and cache authentication provided by an embodiment of the present invention;
[0074] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0075] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0076] The embodiment of the present application provides a storage access method based on object storage and cache authentication. The execution subject of the storage access method based on object storage and cache authentication includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the storage access method based on object storage and cache authentication can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0077] Reference Figure 1 FIG. 1 is a flow chart of a storage access method based on object storage and cache authentication provided by an embodiment of the present invention. In this embodiment, the storage access method based on object storage and cache authentication includes:
[0078] S1. Perform cluster initialization and storage pool initialization operations on the pre-acquired supply chain microservice data to obtain an object storage pool.
[0079] In detail, the supply chain microservice data refers to the data corresponding to the microservice page operated by the user when microservices are provided in the supply chain financial platform. The supply chain microservice data includes data of multiple microservice modules, and the object storage pool is a logical unit for organizing and managing data storage.
[0080] In the embodiment of the present invention, refer to Figure 2 As shown, the cluster initialization and storage pool initialization operations are performed on the pre-acquired supply chain microservice data to obtain an object storage pool, including:
[0081] S21, extracting data attributes from the pre-acquired supply chain microservice data to obtain microservice data attributes;
[0082] S22, performing a cluster initialization operation on the supply chain microservice data according to the microservice data attributes to obtain a standard storage node;
[0083] S23, initializing a node pool for the standard storage nodes to obtain an initial storage pool;
[0084] S24, configuring the initial storage pool according to the microservice data attribute to obtain a configured storage pool;
[0085] S25. Perform object verification on the configuration storage pool to obtain an object storage pool.
[0086] In detail, the data attribute extraction refers to extracting the data size, data type and other attributes of the supply chain microservice data as microservice data attributes. The create method of the ceph command or the rados tool can be used to initialize the node pool, the set method of the ceph command can be used to configure the storage pool, and the get method of the ceph command can be used to perform object verification.
[0087] For details, refer to Figure 2 As shown, the cluster initialization operation is performed on the supply chain microservice data according to the microservice data attributes to obtain a standard storage node, including:
[0088] S21, initializing nodes of the supply chain microservice data to obtain initial storage nodes;
[0089] S22, performing node monitoring on the initial storage node to obtain a monitoring storage node;
[0090] S23, performing object storage deployment on the monitoring storage node to obtain an object storage node;
[0091] S24. Perform parameter configuration on the object storage node according to the microservice data attributes to obtain a standard storage node.
[0092] Specifically, the node initialization refers to selecting a group of servers as storage nodes corresponding to the microservice data. The mon function of ceph-deploy can be used to monitor the nodes. The object storage deployment refers to deploying object storage devices (Object Storage Daemon, referred to as OSD). The osd tool of ceph-deploy can be used to perform object storage deployment and parameter configuration. The parameter configuration refers to configuring the network parameters of the object storage node according to the attributes of the microservice data to ensure that the performance and reliability can meet the storage requirements of the supply chain service data.
[0093] In the embodiment of the present invention, by performing cluster initialization and storage pool initialization operations, high availability and redundancy of data can be achieved, the stability and security of microservice data can be improved, and the status of the storage pool can be monitored in real time, thereby optimizing the utilization efficiency of storage resources.
[0094] S2. Perform gateway configuration and object bucket storage on the supply chain microservice data according to the object storage pool to obtain a microservice storage bucket.
[0095] Specifically, in order to implement different access permission configurations for different microservices, application data or user groups and ensure data security and access control, it is necessary to perform gateway configuration and object bucket storage on the supply chain microservice data.
[0096] In the embodiment of the present invention, the gateway configuration and object bucket storage of the supply chain microservice data according to the object storage pool to obtain the microservice storage bucket includes:
[0097] Performing module feature clustering on the supply chain microservice data to obtain a module service class set;
[0098] Performing data mapping on the module service class set according to the supply chain microservice data to obtain a module data set;
[0099] Performing a bucket initialization operation on the supply chain microservice data according to the module data set to obtain a storage bucket set;
[0100] Performing reverse proxy setting on the bucket set to obtain a proxy bucket set;
[0101] Performing gateway configuration on the proxy storage bucket set to obtain a gateway storage bucket set;
[0102] The module data set is accessed and stored using the gateway storage bucket set to obtain a microservice storage bucket.
[0103] Specifically, the data mapping refers to classifying the supply chain microservice data according to the distribution of each module service feature in the module service class set, and aggregating the supply chain microservice data of each class after each classification as module data into a module data set.
[0104] In detail, the AWS CLI tool can be used to initialize buckets. Each bucket in the bucket set refers to a basic container for storage, which is used to store and organize object data. The bucket initialization operation refers to initializing the corresponding bucket according to the data size, data type and data permission of each module data in the module data set, and all buckets are aggregated into a bucket set.
[0105] In detail, Nginx can be used to set up a reverse proxy for the bucket set, and the reverse proxy setting can uniformly manage and securely access stored data. The Ceph Gateway tool can be used to configure the gateway, and the gateway configuration refers to configuring the DNS and Hosts files of each bucket.
[0106] Specifically, the storage may be accessed using tools such as curl or Postman. The storage access refers to accessing the storage buckets in the storage bucket set one by one, filtering out corresponding module data from the module data set and storing them in the storage bucket.
[0107] In detail, the module feature clustering of the supply chain microservice data is performed to obtain a module service class set, including:
[0108] Decomposing the supply chain microservice data into modules to obtain a module service data set;
[0109] Performing multi-dimensional module feature extraction on the module service data set to obtain a module permission feature set, a module content feature set, and a module type feature set;
[0110] Merging the module permission feature set, the module content feature set and the module type feature set into a module service feature set;
[0111] Performing distribution detection on the module service feature set to obtain service feature distribution;
[0112] Selecting a number of module service features as primary central features according to the distribution of the service features in the module service feature set;
[0113] The clustering distance between each module service feature and each primary center feature in the module service feature set is calculated using the following microservice clustering distance algorithm:
[0114]
[0115] Among them, M i,j It refers to the clustering distance between the i-th module service feature and the j-th primary center feature in the module service feature set, x i refers to the ith module service feature in the module service feature set, y j refers to the jth primary central feature, · is the dot product symbol, ‖‖ is the Euclidean norm symbol, i, j are feature indices, T is the transpose symbol, and cov() is the covariance function symbol;
[0116] The module service feature set is iteratively clustered according to the clustering distance to obtain a module service class set.
[0117] Specifically, the module splitting refers to data splitting according to the microservice modules corresponding to the supply chain service data, and each module service data in the module service data set corresponds to the supply chain microservice data of a microservice module.
[0118] In detail, each module permission feature in the module permission feature set corresponds to permission-related features such as access control, data permissions, and audit logs of each module service data in the module service data set; each module content feature in the module content feature set corresponds to structured, semi-structured, and unstructured data content of each module service data in the module service data set; each module type feature in the module type feature set corresponds to type features such as transaction data, master data, reference data, and metadata of each module service data in the module service data set.
[0119] Specifically, the normal distribution algorithm can be used to perform distribution detection, and the service feature distribution is the normal distribution of each module service feature in the module service feature set. Selecting several module service features as primary center features in the module service feature set according to the service feature distribution means selecting several module service features as primary center features according to preset intervals in the service feature distribution map, thereby ensuring that the distances between the primary center features are far and the independence of the cluster centers is ensured.
[0120] Specifically, the microservice distance algorithm can cluster data based on the overall covariance structure of the module service feature set. For the clustering of the module service feature set, it can better identify and segment clusters of complex shapes. The iterative clustering method can be a K-means clustering method.
[0121] In the embodiment of the present invention, by performing gateway configuration and object bucket storage, microservice module data of different types and permissions can be stored separately, thereby improving the security of data storage.
[0122] S3. Open authorization is performed on the microservice storage bucket to obtain an authorized microservice storage bucket.
[0123] In detail, the open authorization refers to the authentication authorization for accessing each storage bucket in the microservice storage bucket, thereby ensuring the data security of each microservice storage bucket.
[0124] In the embodiment of the present invention, the step of performing open authorization on the microservice storage bucket to obtain the authorized microservice storage bucket includes:
[0125] Extract authorization information from the preset user database to obtain the authorization server, authorization client and authorization key;
[0126] Perform server configuration on the microservice storage bucket according to the authorization server to obtain a server microservice storage bucket;
[0127] Perform user registration on the server microservice storage bucket according to the authorized client to obtain a user microservice storage bucket;
[0128] Encrypt the user microservice storage bucket according to the authorization key to obtain an encrypted microservice storage bucket;
[0129] Endpoint authorization is performed on the encrypted microservice storage bucket to obtain an authorized microservice storage bucket.
[0130] In detail, the user library refers to the pre-entered data that records the user permissions, client ID and client key of each user, the authorization server refers to the server used to provide open authorization services, the authorization client refers to the client corresponding to the client ID of each user in the user library, and the authorization key refers to the verification key corresponding to each client ID.
[0131] Specifically, Ceph RGW can be used for server configuration, user registration, bucket encryption and endpoint authorization. The rgwoauth provider url function can be used for server configuration, the rgwoauth client id function can be used for user registration, and the rgwoauth client secret function can be used for bucket encryption. The endpoint authorization includes configuration authorization for the token endpoint, authorization endpoint and user information endpoint, wherein the server configuration may refer to configuring the OAuth2 server.
[0132] In the embodiment of the present invention, by performing open authorization on the microservice storage bucket, unified access authorization management can be performed for each stored microservice module data and the corresponding storage bucket, thereby improving the security of data storage.
[0133] S4. Perform delayed user authentication on the authorized microservice storage bucket to obtain an access token, perform token verification on the access token, and obtain a verification result.
[0134] In detail, the access token is a credential. After the user is successfully authenticated and authorized by the authorization server, the client application obtains the token. This token represents the user's authorization and allows the client to access protected resources within the authorized scope. The verification result refers to the result of the user's data access to the authorized microservice bucket, including verification success and verification failure.
[0135] In the embodiment of the present invention, the delayed user authentication of the authorized microservice storage bucket to obtain an access token includes:
[0136] Using the authorized microservice storage bucket to obtain the user's access request;
[0137] Performing server authentication on the access request to obtain a request authentication result;
[0138] Generate an access authorization code according to the request authentication result;
[0139] Determine whether there is an authorization token corresponding to the access authorization code in the preset local cache;
[0140] If it exists, the authorization token is used as the access token;
[0141] If it does not exist, the access authorization code is token acquired to obtain the token header, token payload and authorization key;
[0142] The access token is calculated based on the token header, the token payload and the authorization key using the following access token algorithm:
[0143] S=SHA256[k,Base64Encode(h)+.+Base64Encode(p)]
[0144] Wherein, S refers to the access token, SHA256 is a secure hash encryption algorithm, k refers to the authorization key, Base64Encode is a Base64 encoding function, h refers to the token header, + is a character concatenation symbol, . is a character separator, and p is the token payload.
[0145] Specifically, the access request refers to a request sent to the authorization server corresponding to the authorized microservice storage bucket when the user needs to access the authorized microservice storage bucket, and the server authentication refers to using the authorization server to authenticate the access request with the client ID, client key, and permissions.
[0146] In detail, the request authentication result includes request passed and request failed, the access authorization code refers to the corresponding random number authorization code generated when the request authentication result is request passed, the local cache can be a cache in the local Redis, and the authorization token refers to the access token generated when the user performed access authentication last time.
[0147] Specifically, the authorization server can be used to obtain a token for the access authorization code. The token header refers to the type of the access token. The token payload includes user information corresponding to the access token. The access token algorithm can encrypt the access token information, thereby ensuring the data security of the authorized microservice storage bucket.
[0148] In detail, performing token verification on the access token to obtain a verification result includes:
[0149] Decrypt the access token to obtain a token header, a token payload, and an authorization key;
[0150] Using a preset authorized public key to perform key verification on the authorized key to obtain a key verification result;
[0151] Performing a type check on the token header to obtain a type check result;
[0152] Performing permission verification on the token payload to obtain a permission verification result;
[0153] A logical AND operation is performed on the key verification result, the type verification result, and the authority verification result to obtain a verification result.
[0154] In detail, the data decryption method can be a SHA256 decryption method, the key verification refers to determining whether the authorized public key is equal to the authorized key, if they are equal, the key verification result is true, if they are not equal, the key verification result is false, the type verification refers to determining whether the data type in the token header is equal to the data type of the authorized microservice storage bucket accessed, and the permission verification refers to determining whether the data permissions in the token payload meet the data permissions of the authorized microservice storage bucket accessed.
[0155] In the embodiment of the present invention, by performing delayed user authentication to obtain an access token, efficient access control can be achieved, the number of token accesses is reduced, the efficiency of access verification is improved, and the security and independence of data storage are guaranteed.
[0156] S5. Cache the access token according to the verification result, and share data with the authorized microservice storage bucket.
[0157] In detail, the caching of the access token according to the verification result includes:
[0158] Determining whether the verification result is true;
[0159] If not, a verification failure message is generated;
[0160] If so, the access token is stored in a preset local cache, and a validity period is set for the access token.
[0161] In detail, the verification failure information refers to the alarm information that reminds the user that the verification failed and to re-verify. The validity time setting refers to setting the validity time of the access token to a fixed time period such as ten minutes or twenty minutes. The data sharing refers to opening the data in the authorized microservice storage bucket to the user when the verification result is true.
[0162] In the embodiment of the present invention, by performing token caching, the data verification efficiency of the user during continuous storage access can be ensured, thereby improving the security of data storage and the efficiency of data access.
[0163] The embodiments of the present invention can achieve high availability and redundancy of data, improve the stability and security of microservice data, and monitor the status of the storage pool in real time by performing cluster initialization and storage pool initialization operations, thereby optimizing the utilization efficiency of storage resources. By performing gateway configuration and object bucket storage, microservice module data of different types and permissions can be stored separately, thereby improving the security of data storage. By opening the microservice storage bucket for authorization, unified access authorization management can be performed for each stored microservice module data and the corresponding storage bucket, thereby improving the security of data storage.
[0164] By performing delayed user authentication and obtaining an access token, efficient access control can be achieved, the number of token accesses is reduced, the efficiency of access verification is improved, and the security and independence of data storage are guaranteed. By performing token caching, the data verification efficiency of users during continuous storage access can be ensured, and the security of data storage and the efficiency of data access are improved. Therefore, the storage access method based on object storage and cache authentication proposed by the present invention can solve the problem of low efficiency when accessing storage data.
[0165] like Figure 4 , which is a functional module diagram of a storage access system based on object storage and cache authentication provided by an embodiment of the present invention.
[0166] The storage access system 100 based on object storage and cache authentication of the present invention can be installed in an electronic device. According to the functions implemented, the storage access system 100 based on object storage and cache authentication can include a cluster initialization module 101, a bucket storage module 102, an open authorization module 103, a delayed authentication module 104 and a data sharing module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0167] In this embodiment, the functions of each module / unit are as follows:
[0168] The cluster initialization module 101 is used to perform cluster initialization and storage pool initialization operations on the pre-acquired supply chain microservice data to obtain an object storage pool;
[0169] The bucket storage module 102 is used to perform gateway configuration and object bucket storage on the supply chain microservice data according to the object storage pool to obtain a microservice storage bucket;
[0170] The open authorization module 103 is used to perform open authorization on the microservice storage bucket to obtain an authorized microservice storage bucket;
[0171] The delayed authentication module 104 is used to perform delayed user authentication on the authorized microservice storage bucket to obtain an access token, perform token verification on the access token, and obtain a verification result;
[0172] The data sharing module 105 is used to cache the access token according to the verification result and share data with the authorized microservice storage bucket.
[0173] In detail, each module described in the storage access system 100 based on object storage and cache authentication in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The storage access method based on object storage and cache authentication described in the present invention has the same technical means and can produce the same technical effects, so it will not be repeated here.
[0174] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0175] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0176] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0177] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0178] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0179] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or systems stated in the system embodiment can also be implemented by one unit or system through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A storage access method based on object storage and cache authentication, characterized in that: The method comprises: Perform cluster initialization and storage pool initialization operations on the pre-acquired supply chain microservice data to obtain an object storage pool; According to the object storage pool, gateway configuration and object bucket storage are performed on the supply chain microservice data to obtain a microservice storage bucket; Open authorization for the microservice storage bucket to obtain an authorized microservice storage bucket; Perform delayed user authentication on the authorized microservice storage bucket to obtain an access token, and perform token verification on the access token to obtain a verification result; The access token is cached according to the verification result, and data is shared with the authorized microservice storage bucket.
2. The storage access method based on object storage and cache authentication as claimed in claim 1, characterized in that: The cluster initialization and storage pool initialization operations are performed on the pre-acquired supply chain microservice data to obtain an object storage pool, including: Extract data attributes from the pre-acquired supply chain microservice data to obtain microservice data attributes; Performing a cluster initialization operation on the supply chain microservice data according to the microservice data attributes to obtain a standard storage node; Initializing a node pool for the standard storage nodes to obtain an initial storage pool; Performing storage pool configuration on the initial storage pool according to the microservice data attribute to obtain a configuration storage pool; Object verification is performed on the configuration storage pool to obtain an object storage pool.
3. The storage access method based on object storage and cache authentication as claimed in claim 2, characterized in that: The cluster initialization operation is performed on the supply chain microservice data according to the microservice data attributes to obtain a standard storage node, including: Initializing nodes of the supply chain microservice data to obtain initial storage nodes; Performing node monitoring on the initial storage node to obtain a monitoring storage node; Performing object storage deployment on the monitoring storage node to obtain an object storage node; Parameters of the object storage node are configured according to the microservice data attributes to obtain a standard storage node.
4. The storage access method based on object storage and cache authentication as claimed in claim 1, characterized in that: The gateway configuration and object bucket storage of the supply chain microservice data according to the object storage pool to obtain a microservice storage bucket includes: Performing module feature clustering on the supply chain microservice data to obtain a module service class set; Performing data mapping on the module service class set according to the supply chain microservice data to obtain a module data set; Performing a bucket initialization operation on the supply chain microservice data according to the module data set to obtain a storage bucket set; Performing reverse proxy setting on the bucket set to obtain a proxy bucket set; Performing gateway configuration on the proxy storage bucket set to obtain a gateway storage bucket set; The module data set is accessed and stored using the gateway storage bucket set to obtain a microservice storage bucket.
5. The storage access method based on object storage and cache authentication as claimed in claim 4, characterized in that: The module feature clustering of the supply chain microservice data to obtain a module service class set includes: Decomposing the supply chain microservice data into modules to obtain a module service data set; Performing multi-dimensional module feature extraction on the module service data set to obtain a module permission feature set, a module content feature set, and a module type feature set; Merging the module permission feature set, the module content feature set and the module type feature set into a module service feature set; Performing distribution detection on the module service feature set to obtain service feature distribution; Selecting a number of module service features as primary central features according to the distribution of the service features in the module service feature set; The clustering distance between each module service feature and each primary center feature in the module service feature set is calculated using the following microservice clustering distance algorithm: Among them, M i,j It refers to the clustering distance between the i-th module service feature and the j-th primary center feature in the module service feature set, x i refers to the ith module service feature in the module service feature set, y j refers to the jth primary central feature, · is the dot product symbol, ‖‖ is the Euclidean norm symbol, i, j are feature indices, T is the transpose symbol, and cov() is the covariance function symbol; The module service feature set is iteratively clustered according to the clustering distance to obtain a module service class set.
6. The storage access method based on object storage and cache authentication as claimed in claim 1, characterized in that: The step of performing open authorization on the microservice storage bucket to obtain the authorized microservice storage bucket includes: Extract authorization information from the preset user database to obtain the authorization server, authorization client and authorization key; Perform server configuration on the microservice storage bucket according to the authorization server to obtain a server microservice storage bucket; Perform user registration on the server microservice storage bucket according to the authorized client to obtain a user microservice storage bucket; Encrypt the user microservice storage bucket according to the authorization key to obtain an encrypted microservice storage bucket; Endpoint authorization is performed on the encrypted microservice storage bucket to obtain an authorized microservice storage bucket.
7. The storage access method based on object storage and cache authentication as claimed in claim 1, characterized in that: The step of performing delayed user authentication on the authorized microservice storage bucket to obtain an access token includes: Using the authorized microservice storage bucket to obtain the user's access request; Performing server authentication on the access request to obtain a request authentication result; Generate an access authorization code according to the request authentication result; Determine whether there is an authorization token corresponding to the access authorization code in the preset local cache; If it exists, the authorization token is used as the access token; If it does not exist, the access authorization code is token acquired to obtain the token header, token payload and authorization key; The access token is calculated based on the token header, the token payload and the authorization key using the following access token algorithm: S=SHA256[k,Base64Encode(h)+.+Base64Encode(p)] Wherein, S refers to the access token, SHA256 is a secure hash encryption algorithm, k refers to the authorization key, Base64Encode is a Base64 encoding function, h refers to the token header, + is a character concatenation symbol, . is a character separator, and p is the token payload.
8. The storage access method based on object storage and cache authentication as claimed in claim 1, characterized in that: The performing token verification on the access token to obtain a verification result includes: Decrypt the access token to obtain a token header, a token payload, and an authorization key; Using a preset authorized public key to perform key verification on the authorized key to obtain a key verification result; Performing a type check on the token header to obtain a type check result; Performing permission verification on the token payload to obtain a permission verification result; A logical AND operation is performed on the key verification result, the type verification result, and the authority verification result to obtain a verification result.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the storage access method based on object storage and cache authentication as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the storage access method based on object storage and cache authentication is implemented as described in any one of claims 1 to 8.
