Resource access method and device and related equipment
By introducing a functional component adaptation layer into the operation and maintenance platform, encapsulating each middleware and functional API interface, and defining the association relationship between the middleware and API interface, the problem that the IT operation and maintenance management platform is difficult to achieve an integrated architecture and high reliability in a diversified IT resource environment, and the flexibility of decoupling between the application layer and the middleware and resource access are achieved.
Patent Information
- Application Number
- CN202411620885.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-13
AI Technical Summary
When building an IT operation and maintenance management platform, it is difficult for the existing technology to achieve unified management of integrated architecture, cluster capabilities, high reliability, resource utilization efficiency and operation experience, especially in a complex environment with diversified IT resources.
By introducing a functional component adaptation layer into the operation and maintenance platform, encapsulating each middleware and functional API interface, and defining the association relationship between the middleware and the API interface, the application layer and middleware are decoupled. The application layer accesses target resources through the functional component adaptation layer, dynamically adjusts the association relationship between the API interface and the middleware, and supports middleware replacement and extension.
It realizes non-aware replacement between the application layer and each middleware, reduces the operation and maintenance workload, improves improvement efficiency and cluster high availability capabilities, and supports the iterative evolution of software.
Smart Images

Figure CN119583626A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network operation and maintenance technology, and in particular to a resource access method, device and related equipment. Background Art
[0002] With the continuous research on digital transformation and the increasing complexity of enterprise IT environment, it is necessary to deal with diverse devices, systems and applications. Building an IT operation and maintenance management platform can better adapt to and manage these diverse IT resources.
[0003] In the process of building the operation and maintenance platform, more requirements are put forward for the platform's integrated architecture, cluster capabilities, high reliability capabilities, resource utilization efficiency, and operating experience. Summary of the invention
[0004] The present application provides a resource access method, apparatus and related equipment.
[0005] In a first aspect, the present application provides a resource access method, which is applied to an operation and maintenance platform, wherein the operation and maintenance platform includes a functional component adaptation layer, wherein the functional component adaptation layer encapsulates various middlewares adapted to various underlying resources, wherein the functional component adaptation layer encapsulates various functional API interfaces, and wherein the functional component adaptation layer defines an association relationship between each middleware and a corresponding functional API interface; the method includes:
[0006] Receiving a resource access request from the application layer to access a target resource, wherein the access of the application layer to an underlying resource depends on the middleware corresponding to the underlying resource;
[0007] Based on the resource access request, determine the target resource that the application layer needs to access, and determine the target API interface of the functional component adaptation layer that needs to be called to access the target resource;
[0008] Determine the target middleware associated with the target API based on the target resource and the association relationship between each middleware and the corresponding functional API interface defined by the functional component adaptation layer;
[0009] The target resource is accessed based on the target middleware.
[0010] Optionally, the method further comprises:
[0011] When it is detected that the first middleware encapsulated by the functional component adaptation layer is replaced by the second middleware, an association relationship between the second middleware and the corresponding functional API interface is defined.
[0012] Optionally, the functional component adaptation layer encapsulates each middleware basic operation API interface, and the association relationship between each middleware and the corresponding functional API interface is the association relationship between each middleware basic operation API interface and the corresponding functional API interface.
[0013] Optionally, each middleware runs in a container.
[0014] In a second aspect, the present application provides a resource access device, which is applied to an operation and maintenance platform, wherein the operation and maintenance platform includes a functional component adaptation layer, wherein the functional component adaptation layer encapsulates various middlewares adapted to the underlying resources, respectively, and the functional component adaptation layer encapsulates various functional API interfaces, wherein the functional component adaptation layer defines an association relationship between each middleware and the corresponding functional API interface; the device includes:
[0015] A receiving unit, configured to receive a resource access request from an application layer to access a target resource, wherein the access of the application layer to an underlying resource depends on the middleware corresponding to the underlying resource;
[0016] A determination unit, configured to determine, based on the resource access request, a target resource that the application layer needs to access, and determine a target API interface of the functional component adaptation layer that needs to be called to access the target resource;
[0017] The determining unit is further used to determine the target middleware associated with the target API based on the target resource and the association relationship between each middleware and the corresponding functional API interface defined by the functional component adaptation layer;
[0018] An execution unit is used to access the target resource based on the target middleware.
[0019] Optionally, the device further comprises:
[0020] The definition unit is used to define the association relationship between the second middleware and the corresponding functional API interface when it is detected that the first middleware encapsulated by the functional component adaptation layer is replaced by the second middleware.
[0021] Optionally, the functional component adaptation layer encapsulates each middleware basic operation API interface, and the association relationship between each middleware and the corresponding functional API interface is the association relationship between each middleware basic operation API interface and the corresponding functional API interface.
[0022] Optionally, each middleware runs in a container.
[0023] In a third aspect, an embodiment of the present application provides a resource access device, the resource access device comprising:
[0024] A memory for storing program instructions;
[0025] The processor is used to call the program instructions stored in the memory, and execute the steps of the method as described in any one of the first aspects above according to the obtained program instructions.
[0026] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method described in any one of the first aspects above.
[0027] In summary, the resource access method provided in the embodiment of the present application is applied to an operation and maintenance platform, wherein the operation and maintenance platform includes a functional component adaptation layer, wherein the functional component adaptation layer encapsulates various middlewares adapted to the underlying resources respectively, and the functional component adaptation layer encapsulates various functional API interfaces, and the functional component adaptation layer defines the association relationship between each middleware and the corresponding functional API interface; the method includes: receiving a resource access request from the application layer to access a target resource, wherein the application layer's access to an underlying resource depends on the middleware corresponding to the underlying resource; based on the resource access request, determining the target resource that the application layer needs to access, and determining the target API interface of the functional component adaptation layer that needs to be called to access the target resource; determining the target middleware associated with the target API based on the target resource and the association relationship between each middleware and the corresponding functional API interface defined by the functional component adaptation layer; and accessing the target resource based on the target middleware.
[0028] By adopting the resource access method provided in the embodiment of the present application, the functional component adaptation layer is encapsulated in the form of a black box, and the corresponding API interface is encapsulated externally for application layer calling, and several middlewares on which calling resources depend are encapsulated internally, and a mapping relationship between each API interface and the middleware is constructed. Then, the association relationship between the application layer and each middleware is realized. In the scenario where the specified resources are transformed and replaced, the encapsulation is decoupled, and only the association relationship between each API interface and the middleware needs to be adjusted. The application layer is unaware of this, and there is no need to adjust the association relationship between each application and the replaced middleware, which greatly reduces the operation and maintenance workload, improves improvement efficiency, and improves the high-possibility capability of the cluster and the iterative evolution efficiency of the software. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0030] Figure 1 A detailed flow chart of a resource access method provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of the structure of a resource access device provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the hardware architecture of a resource access device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0034] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".
[0035] For example, see Figure 1 As shown, it is a detailed flow chart of a resource access method provided by an embodiment of the present application, the method is applied to an operation and maintenance platform, the operation and maintenance platform includes a function component adaptation layer, the function component adaptation layer encapsulates various middlewares adapted to various underlying resources, the function component adaptation layer encapsulates various types of function API interfaces, and the function component adaptation layer defines the association relationship between each middleware and the corresponding function API interface; the method includes the following steps:
[0036] Step 100: Receive a resource access request from the application layer to access a target resource, wherein the access of the application layer to an underlying resource depends on the middleware corresponding to the underlying resource.
[0037] The application layer refers to the user-oriented layer. Specific business applications may include monitoring, automation, configuration management, data analysis, alarm, reporting, large screen, AIGC and other services. The underlying resources may include databases. The underlying resource is a database as an example. Database operations include addition, deletion, query and modification. Different databases use different middleware, and the driver / client / API call formats / rules provided to the outside are different.
[0038] In the embodiment of the present application, a functional component adaptation layer is encapsulated, and the functional component adaptation layer encapsulates the middleware corresponding to each underlying resource internally, and encapsulates various functional API interfaces for the application layer externally. It should be noted that the mapping relationship between the various functional API interfaces encapsulated by the functional component adaptation layer and the various applications included in the application layer is unchanged. If application 1 needs to execute function 1, it can call the corresponding functional API interface 1 based on the preset mapping relationship. The functional component adaptation layer also defines the association relationship between each middleware and the corresponding functional API interface, that is, when it is determined that application 1 executes function 1 and thus calls functional API interface 1, it can further determine the middleware to be called based on the defined association relationship between each middleware and the corresponding functional API interface.
[0039] Step 110: Based on the resource access request, determine the target resource that the application layer needs to access, and determine the target API interface of the functional component adaptation layer that needs to be called to access the target resource.
[0040] Specifically, the resource access request is parsed to determine the target resource information that the application layer needs to access this time, and based on the target resource information, the API interface encapsulated externally by the functional component adaptation layer that needs to be called to access the resource is determined.
[0041] For example, assuming that API interface 1 of the function adaptation layer component is associated with middleware 1 of resource 1 and middleware 2 of resource 2, and API interface 2 of the function adaptation layer component is associated with middleware 3 of resource 3, then if the resource access request is parsed and it is determined that the resource that the application layer needs to access is resource 1, then API interface 1 of the function adaptation layer component is called.
[0042] Step 120: Based on the target resource and the association relationship between each middleware and the corresponding functional API interface defined by the functional component adaptation layer, determine the target middleware associated with the target API.
[0043] Below, we still take the API interface 1 of the function adaptation layer component, the middleware 1 associated with resource 1, and the middleware 2 associated with resource 2 as an example for explanation. The application layer accesses resource 1, calls the API interface 1 of the function adaptation layer component, and based on resource 1, the middleware 1 and middleware 2 associated with the API interface 1 of the function adaptation layer component, determines that the target middleware associated with the API interface 1 of the function adaptation layer component is middleware 1 (the middleware that access to resource 1 depends on).
[0044] Step 130: Access the target resource based on the target middleware.
[0045] Specifically, the target middleware is indirectly called by calling the target API interface of the function adaptation layer component, thereby achieving access to the target resource.
[0046] In the embodiment of the present application, each middleware runs in a container manner.
[0047] The above method may further include the following steps:
[0048] When it is detected that the first middleware encapsulated by the functional component adaptation layer is replaced by the second middleware, an association relationship between the second middleware and the corresponding functional API interface is defined.
[0049] That is to say, when the underlying resource type (manufacturer / model) changes, the adapted command format and calling method will also change, and the corresponding middleware needs to be replaced. For example, the database of manufacturer A needs to be replaced with the database of manufacturer B. At this time, it is necessary to replace the middleware A on which the operation and maintenance system relies on the database of manufacturer A. The application layer includes several applications. In the embodiment of the present application, each application is directly associated with the API interface of the functional component adaptation layer, but not with the middleware. When determining that one middleware is replaced by another, it is only necessary to change the mapping relationship between the interface of each middleware and the API interface of the functional component adaptation layer in the functional component adaptation layer. This is unaware to the user and greatly reduces the modification of the system framework code.
[0050] For example, enterprise users require software suppliers to carry out transformation according to specified databases and middleware. The operation and maintenance platform software designed based on the above architecture will be able to meet the needs with extremely low R&D costs, thereby meeting market demand and improving customer satisfaction and product competitiveness.
[0051] Below, the resource management method provided in the embodiment of the present application is described in detail in combination with specific application scenarios.
[0052] First, run K8S+Docker on the operating system (OS) to build a container cluster. The software is based on the microservice container architecture and is easy to scale horizontally and vertically (cluster node expansion and contraction, POD replica expansion and contraction, PODlimit setting, etc.). On the above container cluster, by encapsulating the database adapter layer and the middleware adapter layer, the upper-level business application program is shielded from the operational perception of different databases and middleware. There is no need to worry about it, and the encapsulated API can be directly called to perform operations.
[0053] Advantages of using the above approach:
[0054] The cluster HA (High Availability) capability is greatly improved because there is no need to worry about the direct database and middleware. Under the premise that the database and middleware have built cluster services based on containers, the upper-layer business applications can be unaware of cluster node failures.
[0055] For users who require special requirements such as specifying middleware or database, the adapter layer can reduce R&D costs and greatly improve development efficiency. Only the Platform layer needs to iterate the adapter, and the upper-level business applications do not need to worry about it.
[0056] Based on the same inventive concept as the above-mentioned embodiment of the inventor, for example, refer to Figure 2 As shown, it is a structural schematic diagram of a resource access device provided by an embodiment of the present application, the device is applied to an operation and maintenance platform, the operation and maintenance platform includes a functional component adaptation layer, the functional component adaptation layer encapsulates various middlewares adapted to various underlying resources, the functional component adaptation layer encapsulates various functional API interfaces, and the functional component adaptation layer defines the association relationship between each middleware and the corresponding functional API interface; the device includes:
[0057] The receiving unit 20 is used to receive a resource access request from the application layer to access a target resource, wherein the access of the application layer to an underlying resource depends on the middleware corresponding to the underlying resource;
[0058] A determination unit 21 is used to determine the target resource that the application layer needs to access based on the resource access request, and determine the target API interface of the functional component adaptation layer that needs to be called to access the target resource;
[0059] The determining unit 21 is further configured to determine the target middleware associated with the target API based on the target resource and the association relationship between each middleware and the corresponding functional API interface defined by the functional component adaptation layer;
[0060] The execution unit 22 is configured to access the target resource based on the target middleware.
[0061] Optionally, the device further comprises:
[0062] The definition unit is used to define the association relationship between the second middleware and the corresponding functional API interface when it is detected that the first middleware encapsulated by the functional component adaptation layer is replaced by the second middleware.
[0063] Optionally, the functional component adaptation layer encapsulates each middleware basic operation API interface, and the association relationship between each middleware and the corresponding functional API interface is the association relationship between each middleware basic operation API interface and the corresponding functional API interface.
[0064] Optionally, each middleware runs in a container.
[0065] The above units may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a certain unit above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0066] Furthermore, the resource access device provided in the embodiment of the present application, from the hardware level, the hardware architecture diagram of the resource access device can be seen in Figure 3 As shown, the resource access device may include: a memory 30 and a processor 31,
[0067] The memory 30 is used to store program instructions; the processor 31 calls the program instructions stored in the memory 30 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar and will not be repeated here.
[0068] Optionally, the present application also provides a resource access device, comprising at least one processing element (or chip) for executing the above method embodiment.
[0069] Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above method embodiments.
[0070] Here, the machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0071] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0072] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0073] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0074] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0075] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0077] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A resource access method, characterized in that: Applied to an operation and maintenance platform, the operation and maintenance platform includes a function component adaptation layer, the function component adaptation layer encapsulates various middlewares adapted to various underlying resources, the function component adaptation layer encapsulates various types of functional API interfaces, and the function component adaptation layer defines an association relationship between various middlewares and corresponding functional API interfaces; the method includes: Receiving a resource access request from the application layer to access a target resource, wherein the access of the application layer to an underlying resource depends on the middleware corresponding to the underlying resource; Based on the resource access request, determine the target resource that the application layer needs to access, and determine the target API interface of the functional component adaptation layer that needs to be called to access the target resource; Determine the target middleware associated with the target API based on the target resource and the association relationship between each middleware and the corresponding functional API interface defined by the functional component adaptation layer; The target resource is accessed based on the target middleware.
2. The method according to claim 1, characterized in that The method further comprises: When it is detected that the first middleware encapsulated by the functional component adaptation layer is replaced by the second middleware, an association relationship between the second middleware and the corresponding functional API interface is defined.
3. The method according to claim 1 or 2, characterized in that The functional component adaptation layer encapsulates each middleware basic operation API interface, and the association relationship between each middleware and the corresponding functional API interface is the association relationship between each middleware basic operation API interface and the corresponding functional API interface.
4. The method according to claim 1, characterized in that Each middleware runs in container mode.
5. A resource access device, characterized in that: Applied to an operation and maintenance platform, the operation and maintenance platform includes a functional component adaptation layer, the functional component adaptation layer encapsulates various middlewares adapted to various underlying resources, the functional component adaptation layer encapsulates various functional API interfaces, and the functional component adaptation layer defines the association relationship between each middleware and the corresponding functional API interface; the device includes: A receiving unit, configured to receive a resource access request from an application layer to access a target resource, wherein the access of the application layer to an underlying resource depends on the middleware corresponding to the underlying resource; A determination unit, configured to determine, based on the resource access request, a target resource that the application layer needs to access, and determine a target API interface of the functional component adaptation layer that needs to be called to access the target resource; The determining unit is further used to determine the target middleware associated with the target API based on the target resource and the association relationship between each middleware and the corresponding functional API interface defined by the functional component adaptation layer; An execution unit is used to access the target resource based on the target middleware.
6. The device according to claim 5, characterized in that The device also includes: The definition unit is used to define the association relationship between the second middleware and the corresponding functional API interface when it is detected that the first middleware encapsulated by the functional component adaptation layer is replaced by the second middleware.
7. The device according to claim 5 or 6, characterized in that The functional component adaptation layer encapsulates each middleware basic operation API interface, and the association relationship between each middleware and the corresponding functional API interface is the association relationship between each middleware basic operation API interface and the corresponding functional API interface.
8. The device according to claim 5, characterized in that Each middleware runs in container mode.
9. A resource access device, characterized in that: The resource access device comprises: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps of the method according to any one of claims 1 to 4 according to the obtained program instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Framework-layer interface calling method and device of application program
CN106990996A
Embedded software operation method and device, terminal and computer readable storage medium
CN110083433A
Micro-service-based multi-cloud interface adaptation method and system, and storage medium
CN114691567A
Resource access control method and device
CN115622742A
Artificial intelligence experiment cloud platform data processing method and system based on K8S
CN116346909A
Cited By
Power distribution network energy management method considering underlying resources and related device
CN119965995A
Distribution network energy management method and related device considering underlying resources
CN119965995B