CN117762565A - Cloud platform data access method, device, apparatus and storage medium - Google Patents

Cloud platform data access method, device, apparatus and storage medium Download PDF

Info

Publication number
CN117762565A
CN117762565A CN202311797963.4A CN202311797963A CN117762565A CN 117762565 A CN117762565 A CN 117762565A CN 202311797963 A CN202311797963 A CN 202311797963A CN 117762565 A CN117762565 A CN 117762565A
Authority
CN
China
Prior art keywords
target
cloud platform
data
spring boot
access request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311797963.4A
Other languages
Chinese (zh)
Inventor
符勇男
于永贤
杨来志
戚帅
林子彦
杨本艳
刘派
杨鑫
马星粟
鲁峥
余凤
孙朝阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202311797963.4A priority Critical patent/CN117762565A/en
Publication of CN117762565A publication Critical patent/CN117762565A/en
Pending legal-status Critical Current

Links

Abstract

The application provides a cloud platform data access method, equipment, a device and a storage medium, and particularly relates to the technical field of cloud platform data access. The method comprises the steps of obtaining a data access request sent by a user, wherein the data access request is used for indicating to access data of a target item. According to the data access request, starting a target item, registering a storage tool class corresponding to the target cloud platform in the IOC container by adopting the springboot, and inputting the storage tool class to a control layer of the springboot. And uploading the target data to a target cloud platform or downloading the corresponding target data from the target cloud platform by adopting the target springbootstarter according to the data access request. The method utilizes the configured target springbootstarter to realize the rapid access of target project data, gets rid of the trouble of configuring different information in the processing process of various dependency libraries, reduces the steps of developing configuration and saves the development cost.

Description

Cloud platform data access method, device, apparatus and storage medium
Technical Field
The present disclosure relates to the field of access technologies for cloud platform data, and in particular, to a method, an apparatus, a device, and a storage medium for accessing cloud platform data.
Background
The Spring Boot is a development environment based on a Spring framework, and aims to simplify the development and deployment of Spring application programs. Spring Boot will automatically discover the required beans through classes under the class path and register into the IOC container. The Spring Boot provides a Spring-Boot-starter dependency module for developing various scenes for daily enterprise applications. All of these dependency modules follow the default configuration that is custom and allow the user to adjust these configurations, i.e., follow the concept of "custom greater than configuration". The distributed cloud storage service which has no directory hierarchy structure and no limitation of data format, can accommodate mass data and supports HTTP/HTTPS protocol access is also provided.
Spring Boot Starter is an important concept in Spring Boot framework for solving the problems of dependency management and automatic configuration. It is a reusable modular component that can provide support for automatic configuration and dependency management for a particular function or technology stack. Specifically, spring Boot Starter has the following actions: simplifying dependency management: spring Boot Starter can package the related dependencies into an independent module, and a developer can automatically obtain the required dependencies by introducing the Starter, so that the trouble of manually managing the dependencies is avoided; automatic configuration: spring Boot Starter can automatically configure related beans, components and settings for a particular function or technology stack by providing an automatic configuration class, reducing the workload of manual configuration and the possibility of errors; and (3) rapid development: by using Spring Boot Starter, a developer can quickly build a fully functional, executable application and can be easily expanded and customized as desired. By introducing Starter, configuration and use, a developer can develop and deploy the Spring Boot application program more efficiently.
However, spring boot starter, as an engineering capability multiplexing mechanism, cannot be adapted to various cloud storage platforms. Some existing cloud storage platforms do not provide starters which are convenient for capacity multiplexing, are complicated to develop and configure, and are difficult to construct repeatedly, so that cost is not saved.
Disclosure of Invention
The application provides a cloud platform data access method, equipment, a device and a storage medium, which are used for solving the problem that Spring boot starter cannot be matched with various cloud storage platforms.
In a first aspect, the present application provides a method for accessing cloud platform data, including:
acquiring a data access request sent by a user, wherein the data access request is used for indicating to access data of a target item;
starting the target item according to the data access request, registering a storage tool class corresponding to a target cloud platform in an IOC container by adopting a spring boot, and inputting the storage tool class to a control layer of the spring boot;
and uploading target data to the target cloud platform or downloading corresponding target data from the target cloud platform by adopting a target spring boot starter according to the data access request.
Optionally, before the target spring boot starter is adopted to upload target data to the target cloud platform or download corresponding target data from the target cloud platform, the method further includes:
creating an initial spring boot starter in the spring boot, and introducing initial dependencies, wherein the initial dependencies comprise: the API interface and the automatic configuration class correspond to the target cloud platform;
acquiring configuration information of the target cloud platform through the API interface, wherein the configuration information is used for indicating authentication information, a storage area, an access node and an access area corresponding to the target cloud platform;
injecting the configuration information into the IOC container by adopting the automatic configuration class to obtain attribute information corresponding to the configuration information;
loading the automatic configuration class by adopting an access file in the spring boot to output the attribute information;
and updating the initial spring boot starter according to the attribute information to obtain the target spring boot starter matched with the target cloud platform.
Optionally, the injecting the configuration information into the IOC container by using the auto-configuration class to obtain attribute information corresponding to the configuration information includes:
Carrying out authentication processing on the authentication information by adopting an authentication mechanism corresponding to the target cloud platform to obtain an authentication result;
and when the authentication result indicates that authentication passes, the configuration information is injected into the IOC container by adopting the automatic configuration class, so that the attribute information is obtained.
Optionally, the starting the target item according to the data access request includes:
determining the target item corresponding to the data access request according to the data access request;
inputting the target spring boot starter into the target item and adding the configuration information into the YML file of the target item;
judging whether a storage starting switch of the target item is a first mark or not;
and when the storage starting switch of the target item is the first identification, determining that the target item is started.
In a second aspect, the present application provides an access device for cloud platform data, including:
the acquisition module is used for acquiring a data access request sent by a user, wherein the data access request is used for indicating to access the data of the target item;
the starting module is used for starting the target item according to the data access request, registering a storage tool class corresponding to the target cloud platform in an IOC container by adopting a spring boot, and inputting the storage tool class to a control layer of the spring boot;
And the processing module is used for uploading target data to the target cloud platform or downloading corresponding target data from the target cloud platform by adopting a target spring boot starter according to the data access request.
Optionally, the apparatus further includes: the system comprises a creation module and an output module;
the creating module is configured to create an initial spring boot starter in the spring boot, and introduce an initial dependency, where the initial dependency includes: the API interface and the automatic configuration class correspond to the target cloud platform;
the acquisition module is further configured to acquire configuration information of the target cloud platform through the API interface, where the configuration information is used to indicate authentication information, a storage area, an access node, and an access area corresponding to the target cloud platform;
the acquisition module is further configured to inject the configuration information into the IOC container by using the automatic configuration class, so as to obtain attribute information corresponding to the configuration information;
the output module is used for loading the automatic configuration class by adopting the access file in the spring boot so as to output the attribute information;
the processing module is further configured to update the initial spring boot starter according to the attribute information to obtain the target spring boot starter adapted to the target cloud platform.
Optionally, the processing module is further configured to perform authentication processing on the authentication information by using an authentication mechanism corresponding to the target cloud platform, so as to obtain an authentication result;
and the acquisition module is further used for injecting the configuration information into the IOC container by adopting the automatic configuration class when the authentication result indicates that the authentication passes, so as to obtain the attribute information.
Optionally, the apparatus further includes: the device comprises a determining module, an input module and a judging module;
the determining module is used for determining the target item corresponding to the data access request according to the data access request;
the input module is configured to input the target spring boot starter into the target item, and add the configuration information into a YML file of the target item;
the judging module is used for judging whether the storage starting switch of the target item is a first mark or not;
the determining module is further configured to determine that the target item is started when the storage start switch of the target item is the first identifier.
In a third aspect, the present application provides an access device for cloud platform data, the device including:
a memory;
A processor;
wherein the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory to implement the method for accessing cloud platform data according to the first aspect and the various possible implementation manners of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program to be executed by a processor to implement the method for accessing cloud platform data according to the first aspect and the various possible implementation manners of the first aspect.
According to the cloud platform data access method, device and storage medium, the data access request sent by the user is obtained, and the data access request is used for indicating the access to the data of the target item. According to the data access request, starting a target item, registering a storage tool class corresponding to the target cloud platform in the IOC container by adopting a spring boot, and inputting the storage tool class to a control layer of the spring boot. And uploading the target data to the target cloud platform or downloading the corresponding target data from the target cloud platform by adopting the target spring boot starter according to the data access request. The method utilizes the configured target spring boot starter to realize the rapid access to target project data, gets rid of the trouble of configuring different information in the processing process of various dependency libraries, reduces the steps of developing configuration and saves the development cost.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart of a method for accessing cloud platform data provided in the present application;
fig. 2 is a second flow chart of a method for accessing cloud platform data provided in the present application;
fig. 3 is a flowchart illustrating a method for accessing cloud platform data provided in the present application;
fig. 4 is a schematic structural diagram of an access device for cloud platform data provided in the present application;
fig. 5 is a schematic structural diagram of a cloud platform data access device provided in the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application, as detailed in the accompanying claims, rather than all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, article, or apparatus.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The terms referred to in this application are explained first:
identity recognition and access management (Identity and Access Management, abbreviated as IAM): in the cloud storage platform, a user system is designed into an account/user model, and each account is internally provided with a root user and a plurality of common users. When a user operates resources in an IAM account in each product system of the cloud storage platform, IAM authentication is needed, and the user is allowed to operate after the authority verification is passed. The IAM subsystem is also a subsystem of the cloud storage platform, and the construction of the IAM subsystem also follows an account/user model. The users, user groups, policies and product system resource instances applied by the users in each IAM account are the resources in the IAM account.
IOC container: inversion of Control, abbreviated as IOC, can be translated into control inversion, spring manages instantiation and initialization of all Java objects through the IOC container, and controls dependency relationships between objects. We refer to the Java object managed by the IOC container as a Spring Bean, which does not have any distinction from Java objects created using the keyword new.
Bean: beans generally refer to a specific type of object that complies with the JavaBeans specification. Bean means a reusable Java component. A component is a group consisting of one or more classes that can be managed internally by themselves, the external world does not know the internal information and the way of operation, and the objects using it can only be operated through interfaces.
Starter: starter is a collection of dependencies, and provides default configuration by using the form of annotation automatic configuration, so that development projects are more convenient. starters are responsible for configuring fixed versions and dependent integration issues. The Spring Boot can help us simplify the project construction and development process, and is mainly based on starting dependence and automatic configuration.
The new cloud storage service is provided at present, and is a distributed cloud storage service which has no directory hierarchy structure and no data format limitation, can accommodate mass data and supports HTTP/HTTPS protocol access. Its main advantages are:
convenient and easy to use: the Web-based management console, the REST full API, the command line tool, the graphical client and other access modes are provided, and data can be managed through a network at any time and any place.
Stable and durable: the method supports the cross-region copy, the off-site backup and the recovery of the provided data and provides reliable guarantee for the persistent storage of the user data. Meanwhile, based on a high-availability architecture design, single-point faults are eliminated, and the continuity of data service is ensured.
Elastic expansion: the pay-per-quantity mode is adopted, so that one-time advanced payment is not needed, and the cost is low. And the storage capacity and the number of files are not limited, and the storage requirement of massive unstructured data is met.
Safety and reliability: the data transmission and fine grain authority control through the secure channel are supported, the storage access strategy is flexible, the IAM is used for managing the user authority, and the data security is ensured.
The Spring Boot is a development environment based on a Spring framework, and aims to simplify the development and deployment of Spring application programs. Spring Boot will automatically discover the required beans through classes under the class path and register into the IOC container. The Spring Boot provides a Spring-Boot-starter dependency module for developing various scenes for daily enterprise applications. All of these dependency modules follow the default configuration that is custom and allow the user to adjust these configurations, i.e., follow the concept of "custom greater than configuration". The distributed cloud storage service which has no directory hierarchy structure and no limitation of data format, can accommodate mass data and supports HTTP/HTTPS protocol access is also provided.
Spring Boot Starter is an important concept in Spring Boot framework for solving the problems of dependency management and automatic configuration. It is a reusable modular component that can provide support for automatic configuration and dependency management for a particular function or technology stack. Specifically, spring Boot Starter has the following actions: simplifying dependency management: spring Boot Starter can package the related dependencies into an independent module, and a developer can automatically obtain the required dependencies by introducing the Starter, so that the trouble of manually managing the dependencies is avoided; automatic configuration: spring Boot Starter can automatically configure related beans, components and settings for a particular function or technology stack by providing an automatic configuration class, reducing the workload of manual configuration and the possibility of errors; and (3) rapid development: by using Spring Boot Starter, a developer can quickly build a fully functional, executable application and can be easily expanded and customized as desired. By introducing Starter, configuration and use, a developer can develop and deploy the Spring Boot application program more efficiently.
However, spring boot starter, as an engineering capability multiplexing mechanism, cannot be adapted to various cloud storage platforms. The existing various cloud storage platforms do not provide starters convenient for capacity multiplexing, are complicated to develop and configure, and are difficult to construct repeatedly, so that cost is not saved.
Aiming at the problems, the application provides a cloud platform data access method, which is suitable for a new cloud storage platform by reconfiguring Spring Boot Starter, and gets rid of the trouble that different information needs to be configured in the processing process of various dependency libraries. The steps of developing configuration are reduced, and the development cost is saved. The method is convenient and quick to integrate, has a simple structure, is clear, is convenient for users to quickly get up, frees service system developers, and does not need to write complex cloud storage access codes, so that the method is more focused on actual service development, and improves the development efficiency.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for accessing cloud platform data according to an embodiment of the present application. The execution body of the embodiment is a cloud storage platform. As shown in fig. 1, the method includes:
s101: and acquiring a data access request sent by a user, wherein the data access request is used for indicating the access to the data of the target item.
It can be understood that the cloud storage platform can accommodate massive data, and in the process of processing a project, a user needs to acquire data information about the project or needs to store the data information of the project, so that a data access request of the user is firstly acquired, an operation required by a target project is determined according to the data access request, and then uploading and downloading of the data are further performed.
S102: and starting the target item according to the data access request, registering a storage tool class corresponding to the target cloud platform in an IOC container by adopting a spring boot, and inputting the storage tool class to a control layer of the spring boot.
The IOC container is a container for loading beans, and is used for creating management objects, managing dependency relationships and controlling life cycle. The creation of objects and the management of dependencies can be decoupled from the application code through the container, making the application more flexible, maintainable and extensible. The main task of the control layer in the Spring Boot application is to receive and process requests from users.
It can be understood that the corresponding target item is found out according to the obtained data access request, and a spring boot frame is adopted to register in the IOC container to generate a bean named as a storage tool class. The generated storage tool class corresponds to the target cloud platform, that is, the generated storage tool class contains an access mode of the target cloud platform, and the access mode can be, for example, a mode that the target cloud platform such as an access key or an access identity mark can perform identity recognition. And inputting the storage tool class into a control layer of the spring boot, and identifying by a controller in the control layer to process a user request.
S103: and uploading target data to the target cloud platform or downloading corresponding target data from the target cloud platform by adopting a target spring boot starter according to the data access request.
The target spring boot starter is a framework which is completed by configuration update, and the framework is matched with the target cloud platform, so that the target cloud platform is accessed without re-writing codes.
It may be appreciated that introducing the configured target spring boot starter in the target item and adding the configuration related to the target item may be, for example: access key, access bucket, access service node, access area. The target spring boot starter, in combination with the generated storage tool class, employs uploading and downloading tools in the storage tool class to upload target data to or download corresponding target data from the target cloud platform. Wherein, the target data refers to the data of the target item.
According to the cloud platform data access method, the data access request sent by the user is obtained, and the data access request is used for indicating the access to the data of the target item. According to the data access request, starting a target item, registering a storage tool class corresponding to the target cloud platform in the IOC container by adopting a spring boot, and inputting the storage tool class to a control layer of the spring boot. And uploading the target data to the target cloud platform or downloading the corresponding target data from the target cloud platform by adopting the target spring boot starter according to the data access request. The method utilizes the configured target spring boot starter to realize the rapid access to target project data, gets rid of the trouble of configuring different information in the processing process of various dependency libraries, reduces the steps of developing configuration and saves the development cost.
Fig. 2 is a flow chart diagram of a method for accessing cloud platform data according to an embodiment of the present application. This embodiment is a detailed description of build targets spring boot starter based on the embodiment of fig. 1. As shown in fig. 2, the method includes:
s201: creating an initial spring boot starter in the spring boot, and introducing initial dependencies, wherein the initial dependencies comprise: and the target cloud platform corresponds to the API interface and the automatic configuration class.
The spring boot starter is a core component of the spring boot, and spring boot starter has the main function of simplifying the dependency management of the project, and integrates the common dependencies in advance, and only the corresponding starter dependency needs to be added in the XML file of the target project in the use process. Dependencies generally refer to class libraries, frameworks, or other items' dependencies on current items.
It will be appreciated that configuring the new spring boot starter framework such that the spring boot starter framework is adapted to the target cloud platform first introduces initial dependencies that ensure that subsequent applications can download and use them. Initial dependencies include: and the API interface and the automatic configuration class correspond to the target cloud platform. The API interface corresponding to the target cloud platform is an access interface unique to the target cloud platform, and the automatic configuration class is used for loading beans according to requirements when the container is started. The initial dependencies are introduced in the initial spring boot starter so that the functionality provided by the initial dependencies can be used later.
S202: and acquiring configuration information of the target cloud platform through the API interface, wherein the configuration information is used for indicating authentication information, a storage area, an access node and an access area corresponding to the target cloud platform.
The API interface comprises IAM special access authentication configuration, and user access can be authenticated and authorized by using IAM, so that the data storage safety of the target cloud platform is ensured.
It will be appreciated that the role of the configuration information is to ensure that the application is able to properly connect to and access the cloud platform. By means of the configuration information, the application can use the correct access key and access key for authentication, and at the same time specify the storage bucket, access node, access area, etc. to be accessed. Authentication information is also referred to as access key and access key. The configuration information is typically stored in the configuration file of the application in the form of a configuration file. These configuration information can be read from the configuration file and then loaded into the program at the time of container initialization.
S203: and carrying out authentication processing on the authentication information by adopting an authentication mechanism corresponding to the target cloud platform to obtain an authentication result.
Authentication, also known as entitlement control, is a means of protecting users from unauthorized access to specific resources in a computer network. Authentication typically involves both a verification and authorization of the identity of the user.
It can be appreciated that in order to ensure the data security of the cloud platform, identity verification is required when uploading and downloading data. The initial dependence comprises an API interface, the API interface comprises identity identification and access management, the configuration information of the target item and the configuration information of the cloud platform acquired by the API interface are subjected to authentication processing, if the configuration information is the same after comparison, the authentication is passed, and if the configuration information is different, the authentication is not passed.
S204: and when the authentication result indicates that authentication passes, the configuration information is injected into the IOC container by adopting the automatic configuration class, so that the attribute information is obtained.
It will be appreciated that when the authentication result indicates that the authentication is passed, i.e. the identity is correct, spring boot starter containing the target item is allowed to access the cloud platform. The automatic configuration class injects configuration information into the container to acquire attribute information, and creates a bean of a storage tool class which can access the target cloud platform, so that the bean is convenient to use in other places. Therefore, the configuration information of different subsequent projects can acquire attribute information according to the beans of the storage tool class of the target cloud platform.
S205: and loading the automatic configuration class by adopting the access file in the spring boot so as to output the attribute information.
It can be understood that when the Spring Boot framework is used for developing an application program, the access file loading automatic configuration class can be introduced to read the relevant configuration information corresponding to the target cloud platform stored in the configuration file. This information may be used in an application to connect to and access a target cloud platform storage service. The access file is used for loading the automatic configuration class, so that the configuration of an application program can be greatly simplified, manual reading and analysis of the configuration file are avoided, and the development efficiency is improved. Meanwhile, because the configuration information is sensitive, the security can be enhanced by using the automatic configuration class, and the configuration information is prevented from being leaked to the outside of the application program.
S206: and updating the initial spring boot starter according to the attribute information to obtain the target spring boot starter matched with the target cloud platform.
It can be appreciated that the target spring boot starter is adapted to the target cloud platform, i.e. the common component required by the project is packaged as a starter of the spring boot. If the packaging is not performed, the storage tool class is manually written and added to the IOC container when the storage tool class is used each time, the process is tedious, and the efficiency is reduced in the use process. Therefore, by defining a starter by the above method, dependency management is performed in the starter and automatic Configuration is performed in the Configuration, so as to obtain the target spring boot starter.
According to the cloud platform data access method, the initial spring boot starter is created in the spring boot, and initial dependence is introduced. Configuration information of the target cloud platform is obtained through the API interface, authentication processing is carried out on the authentication information by adopting an authentication mechanism corresponding to the target cloud platform, and an authentication result is obtained. And when the authentication result indicates that the authentication passes, adopting an automatic configuration class to inject configuration information into the IOC container to obtain attribute information. And loading the automatic configuration class by adopting an access file in the spring boot to output attribute information. And updating the initial spring boot starter according to the attribute information to obtain a target spring boot starter which is matched with the target cloud platform. According to the method, the spring boot is configured and updated to generate the target spring boot starter, so that the target spring boot starter is suitable for a target cloud platform, data is accessed through the target spring boot starter, steps of development and configuration are reduced, and development cost is saved.
Fig. 3 is a flowchart illustrating a method for accessing cloud platform data according to an embodiment of the present application. The present embodiment is a detailed description of a method for accessing cloud platform data based on the embodiment of fig. 1 and the embodiment of fig. 2. As shown in fig. 3, the method includes:
s301: and acquiring a data access request sent by a user, wherein the data access request is used for indicating the access to the data of the target item.
Step S301 is similar to step S101, and will not be described here.
S302: and determining the target item corresponding to the data access request according to the data access request.
It can be appreciated that the application program can be developed through the spring boot framework, so that the data on the target cloud platform can be downloaded or uploaded. After the data access request is acquired, firstly, the items needing to be uploaded and downloaded are determined according to the data access request, so that configuration information corresponding to the target items can be acquired conveniently, and uploading and downloading of files corresponding to the target items can be performed.
S303: the target spring boot starter is input into the target item, and the configuration information is added to the YML file of the target item.
It can be appreciated that adding configuration information to the YML file of an item is a more readable and manageable configuration. YML is a human-friendly data serialization format that can use indentation and compact structures to represent configuration information. Compared with the traditional properties file, the YML file can better organize and display configuration information and is easier to maintain and read. By adding configuration information to the YML file, the configuration of items can be concentrated into one file and provide an easy way to understand and modify. Therefore, when the configuration is required to be changed or added, only the YML file is required to be edited, and the configuration can be directly read and loaded by the Spring Boot frame without manual analysis and conversion.
S304: and judging whether a storage starting switch of the target item is a first identifier or not.
S305: and when the storage starting switch of the target item is the first identification, determining that the target item is started.
Wherein the first identifier refers to TRUE. A store-enabled switch, i.e., enabled, means that a certain function or option is enabled or activated, made available or validated. The enabled function has the functions of personalized customization and resource management, so that a user can enable or disable specific hardware equipment, software functions or application rights according to own requirements, and the running efficiency and performance of the system are improved.
It will be appreciated that the target spring boot starter is entered into the target item and a related configuration is introduced, in which a store-to-start switch is present, and an instance of Properties configuration class is created only when the store-to-start switch is set to TRUE, enabling the configuration class. The target item starts the target spring boot starter, and is connected with the target cloud platform to upload and download the data file.
S306: registering a storage tool class corresponding to a target cloud platform in an IOC container by adopting a spring boot, and inputting the storage tool class into a control layer of the spring boot.
Step S306 is similar to step S102, and will not be described here.
S307: and uploading target data to the target cloud platform or downloading corresponding target data from the target cloud platform by adopting a target spring boot starter according to the data access request.
Step S307 is similar to step S103, and will not be described here again.
According to the cloud platform data access method, the data access request sent by the user is obtained, and the data access request is used for indicating the access to the data of the target item. According to the data access request, a target item corresponding to the data access request is determined. The target spring boot starter is input into the target item, and the configuration information is added to the YML file of the target item. And judging whether the storage starting switch of the target item is a first mark or not. And when the storage start switch of the target item is the first identification, determining that the target item is started. And registering a storage tool class corresponding to the target cloud platform in the IOC container by adopting the spring boot, and inputting the storage tool class into a control layer of the spring boot. And uploading the target data to the target cloud platform or downloading the corresponding target data from the target cloud platform by adopting the target spring boot starter according to the data access request. The method is convenient and quick to integrate, has a simple structure, is clear, is convenient for users to quickly get up, frees service system developers, and does not need to write complex cloud storage access codes, so that the method is more focused on actual service development, and improves the development efficiency.
Fig. 4 is a schematic structural diagram of an access device for cloud platform data provided in the present application. As shown in fig. 4, the cloud platform data access device 400 provided in the present application includes:
an obtaining module 401, configured to obtain a data access request sent by a user, where the data access request is used to indicate that data of a target item is accessed;
the starting module 402 is configured to start the target item according to the data access request, register a storage tool class corresponding to a target cloud platform in an IOC container by using a spring boot, and input the storage tool class to a control layer of the spring boot;
and the processing module 403 is configured to upload target data to the target cloud platform or download corresponding target data from the target cloud platform by adopting a target spring boot starter according to the data access request.
Optionally, the apparatus further includes: a creation module 404, an output module 405;
the creating module 404 is configured to create an initial spring boot starter in the spring boot, and introduce an initial dependency, where the initial dependency includes: the API interface and the automatic configuration class correspond to the target cloud platform;
the obtaining module 401 is further configured to obtain configuration information of the target cloud platform through the API interface, where the configuration information is used to indicate authentication information, a storage area, an access node, and an access area corresponding to the target cloud platform;
The obtaining module 401 is further configured to inject the configuration information into the IOC container by using the auto-configuration class, so as to obtain attribute information corresponding to the configuration information;
the output module 405 is configured to load the auto-configuration class with an access file in the spring boot to output the attribute information;
the processing module 403 is further configured to update the initial spring boot starter according to the attribute information to obtain the target spring boot starter adapted to the target cloud platform.
Optionally, the processing module 403 is further configured to perform authentication processing on the authentication information by using an authentication mechanism corresponding to the target cloud platform, so as to obtain an authentication result;
the obtaining module 401 is further configured to inject the configuration information into the IOC container by using the auto-configuration class when the authentication result indicates that authentication passes, so as to obtain the attribute information.
Optionally, the apparatus further includes: a determining module 406, an input module 407, and a judging module 408;
the determining module 406 is configured to determine, according to the data access request, the target item corresponding to the data access request;
The input module 407 is configured to input the target spring boot starter into the target item, and add the configuration information to the YML file of the target item;
the judging module 408 is configured to judge whether the storage start switch of the target item is a first identifier;
the determining module 406 is further configured to determine that the target item is started when the storage start switch of the target item is the first identifier.
Fig. 5 is a schematic structural diagram of a cloud platform data access device provided in the present application. As shown in fig. 5, the present application provides an access device for cloud platform data, where an access device 500 for cloud platform data includes: a receiver 501, a transmitter 502, a processor 503 and a memory 504.
A receiver 501 for receiving instructions and data;
a transmitter 502 for transmitting instructions and data;
memory 504 for storing computer-executable instructions;
the processor 503 is configured to execute the computer-executable instructions stored in the memory 504, so as to implement the steps executed by the method for accessing cloud platform data in the foregoing embodiment. The description of the foregoing embodiments of the method for accessing cloud platform data may be specifically referred to.
Alternatively, the memory 504 may be separate or integrated with the processor 503.
When the memory 504 is provided separately, the electronic device further comprises a bus for connecting the memory 504 and the processor 503.
The application also provides a computer readable storage medium, in which computer execution instructions are stored, and when a processor executes the computer execution instructions, the access method of the cloud platform data executed by the access device of the cloud platform data is realized.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for accessing cloud platform data, the method comprising:
acquiring a data access request sent by a user, wherein the data access request is used for indicating to access data of a target item;
starting the target item according to the data access request, registering a storage tool class corresponding to a target cloud platform in an IOC container by adopting a spring boot, and inputting the storage tool class to a control layer of the spring boot;
And uploading target data to the target cloud platform or downloading corresponding target data from the target cloud platform by adopting a target spring boot starter according to the data access request.
2. The method of claim 1, wherein prior to uploading target data to or downloading corresponding target data from the target cloud platform using target spring boot starter, the method further comprises:
creating an initial spring boot starter in the spring boot, and introducing initial dependencies, wherein the initial dependencies comprise: the API interface and the automatic configuration class correspond to the target cloud platform;
acquiring configuration information of the target cloud platform through the API interface, wherein the configuration information is used for indicating authentication information, a storage area, an access node and an access area corresponding to the target cloud platform;
injecting the configuration information into the IOC container by adopting the automatic configuration class to obtain attribute information corresponding to the configuration information;
loading the automatic configuration class by adopting an access file in the spring boot to output the attribute information;
and updating the initial spring boot starter according to the attribute information to obtain the target spring boot starter matched with the target cloud platform.
3. The method of claim 2, wherein the injecting the configuration information into the IOC container using the auto-configuration class to obtain attribute information corresponding to the configuration information comprises:
carrying out authentication processing on the authentication information by adopting an authentication mechanism corresponding to the target cloud platform to obtain an authentication result;
and when the authentication result indicates that authentication passes, the configuration information is injected into the IOC container by adopting the automatic configuration class, so that the attribute information is obtained.
4. A method according to claim 3, wherein said initiating said target item in response to said data access request comprises:
determining the target item corresponding to the data access request according to the data access request;
inputting the target spring boot starter into the target item and adding the configuration information into the YML file of the target item;
judging whether a storage starting switch of the target item is a first mark or not;
and when the storage starting switch of the target item is the first identification, determining that the target item is started.
5. An access device for cloud platform data, the device comprising:
The acquisition module is used for acquiring a data access request sent by a user, wherein the data access request is used for indicating to access the data of the target item;
the starting module is used for starting the target item according to the data access request, registering a storage tool class corresponding to the target cloud platform in an IOC container by adopting a spring boot, and inputting the storage tool class to a control layer of the spring boot;
and the processing module is used for uploading target data to the target cloud platform or downloading corresponding target data from the target cloud platform by adopting a target spring boot starter according to the data access request.
6. The apparatus of claim 5, wherein the apparatus further comprises: a creation module and an output module;
the creating module is configured to create an initial spring boot starter in the spring boot, and introduce an initial dependency, where the initial dependency includes: the API interface and the automatic configuration class correspond to the target cloud platform;
the acquisition module is further configured to acquire configuration information of the target cloud platform through the API interface, where the configuration information is used to indicate authentication information, a storage area, an access node, and an access area corresponding to the target cloud platform;
The acquisition module is further configured to inject the configuration information into the IOC container by using the automatic configuration class, so as to obtain attribute information corresponding to the configuration information;
the output module is used for loading the automatic configuration class by adopting the access file in the spring boot so as to output the attribute information;
the processing module is further configured to update the initial spring boot starter according to the attribute information to obtain the target spring boot starter adapted to the target cloud platform.
7. The apparatus according to claim 5, wherein:
the processing module is further used for carrying out authentication processing on the authentication information by adopting an authentication mechanism corresponding to the target cloud platform to obtain an authentication result;
and the acquisition module is also used for injecting the configuration information into the IOC container by adopting an automatic configuration class when the authentication result indicates that the authentication passes, so as to obtain attribute information.
8. The apparatus of claim 5, wherein the apparatus further comprises: the device comprises a determining module, an input module and a judging module;
the determining module is used for determining the target item corresponding to the data access request according to the data access request;
The input module is used for inputting the target spring boot starter into the target item and adding configuration information into the YML file of the target item;
the judging module is used for judging whether the storage starting switch of the target item is a first mark or not;
the determining module is further configured to determine that the target item is started when the storage start switch of the target item is the first identifier.
9. An access device for cloud platform data, comprising:
a memory;
a processor;
wherein the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of accessing cloud platform data as recited in any of claims 1-4.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to implement the method of accessing cloud platform data according to any of claims 1-4.
CN202311797963.4A 2023-12-25 2023-12-25 Cloud platform data access method, device, apparatus and storage medium Pending CN117762565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311797963.4A CN117762565A (en) 2023-12-25 2023-12-25 Cloud platform data access method, device, apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311797963.4A CN117762565A (en) 2023-12-25 2023-12-25 Cloud platform data access method, device, apparatus and storage medium

Publications (1)

Publication Number Publication Date
CN117762565A true CN117762565A (en) 2024-03-26

Family

ID=90312250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311797963.4A Pending CN117762565A (en) 2023-12-25 2023-12-25 Cloud platform data access method, device, apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN117762565A (en)

Similar Documents

Publication Publication Date Title
CN107506221B (en) Application program upgrading method, device and equipment
US7640542B2 (en) Managing midlet suites in OSGI environment
CN106559438B (en) Program uploading method and device based on target network platform
US9258669B2 (en) Registering a mobile application with a server
US7757296B2 (en) Method of managing software components that are integrated into an embedded system
CN105490860A (en) Method, device and system for deploying application program operation environment
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN107220074B (en) Method and device for accessing and upgrading supporting layer software function
US10296309B1 (en) Systems and methods for automatic API generation for bi-directional communication between native and web-based components of a mobile application
EP1437657A2 (en) System and method for management of software applications
CN111596928A (en) Application control method and device and electronic equipment
CN112015448A (en) System upgrading method and device based on over-the-air technology
KR20110123867A (en) Web application executable device and web application management method therof
CN113867768A (en) Operating system processing method and device, electronic equipment and storage medium
CN117762565A (en) Cloud platform data access method, device, apparatus and storage medium
CN113448793A (en) System monitoring method and device compatible with multiple operating systems
CN107667343B (en) System and method for loading on-demand resources
CN114721699B (en) Mirror image upgrading method and device, electronic equipment and storage medium
CN114338652B (en) Distribution method and downloading method of installation package and related products
CN112437120B (en) Access monitoring method and system of cache system, electronic equipment and storage medium
US11604632B2 (en) Development environment deployment for multiple developer types
CN110955440B (en) Screen locking application separation upgrading method, device, equipment and computer readable medium
US10356265B2 (en) Image processing apparatus and application management method
CN113419756A (en) File upgrading method and device and electronic equipment
CN116431308A (en) Multi-algorithm scheduling method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination