Resource loading method, device, electronic device and storage medium

By analyzing the connector configuration information to generate a loading policy file, ensuring version consistency and loading order when loading connector resources on the cloud computing platform, solving the loading errors caused by differences in different connector versions and improving the stability of the connector.

CN114153512BActive Publication Date: 2025-03-11ALIBABA GROUP HOLDING LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010833411.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-18
Publication Date
2025-03-11
Estimated Expiration
2040-08-18

AI Technical Summary

Technical Problem

On cloud computing platforms, there are differences in the public code base versions referenced by different connectors, resulting in errors that are prone to loading connector resources when the workflow deployment is run.

Method used

By determining the target connector, obtaining its configuration information, parsing the configuration information generates a loading policy file, including the connector resources corresponding to the target connector, and loading the connector resources according to the loading policy file to ensure version consistency and loading order.

Benefits of technology

Dynamically analyze the loading strategies of each target connector, realize the running container isolation of the connector, avoid resource loading conflicts, and improve the stability and loading accuracy of the connector.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114153512B_ABST
    Figure CN114153512B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a resource loading method, device, electronic device and storage medium, the method comprising: determining a target connector; obtaining configuration information of the target connector; parsing the configuration information to generate a loading policy file of the target connector, the loading policy file comprising connector resources corresponding to the target connector; loading the connector resources according to the loading policy file; and being able to improve the stability of the connector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource loading method, a resource loading device, an electronic device and a storage medium. Background Art

[0002] Cloud computing platform, also known as cloud platform, refers to services based on hardware resources and software resources that provide computing, network and storage capabilities.

[0003] The existing "cloud" can support users (manufacturers / developers) to design and develop their own applications or basic protocol connectors, and publish them to the connector market in the form of jar files (JavaArchive) for other users to quickly integrate with their own applications. These third-party connector jar packages will eventually be packaged and orchestrated in the form of flow files (Flow) and handed over to the process engine for scheduling and running. Among them, jar files can also be called jar packages, which are used to aggregate a large number of Java class files, related metadata and resource (text, pictures, etc.) files into one file.

[0004] Since each connector is independently developed and released by different manufacturers or developers, there are differences in the versions of the public code base referenced by different connectors. When a group of connectors are orchestrated and deployed and run as a workflow, the process engine will obtain all related connector resources in a hot-loading manner, and use the higher version of the connector resources by default during the loading process, which is prone to loading errors. Summary of the invention

[0005] The embodiment of the present application provides a resource loading method to reduce the occurrence of loading problems.

[0006] Correspondingly, an embodiment of the present application also provides a resource loading device, an electronic device and a storage medium to ensure the implementation and application of the above system.

[0007] In order to solve the above problems, an embodiment of the present application discloses a resource loading method, which includes: determining a target connector; obtaining configuration information of the target connector; parsing the configuration information to generate a loading policy file of the target connector, wherein the loading policy file includes connector resources corresponding to the target connector; and loading the connector resources according to the loading policy file.

[0008] In order to solve the above problems, an embodiment of the present application discloses a resource loading method, which is applied to a loading engine, wherein the loading engine includes a resource class loader, an aggregation class loader and a plug-in class loader, and the method includes: the aggregation class loader obtains the target connector and the configuration information of the target connector through the resource class loader; the aggregation class loader parses the configuration information and generates a loading policy file of the target connector, wherein the loading policy file includes the connector resources corresponding to the target connector; the plug-in class loader loads the connector resources according to the loading policy file.

[0009] In order to solve the above problems, an embodiment of the present application discloses a resource loading method, including: determining service information of the required service, and determining the target connector based on the service information; obtaining configuration information of the target connector; parsing the configuration information, and generating a loading policy file of the target connector, wherein the loading policy file includes version information of the connector resources required by the target connector; and loading the connector resources of the target version according to the loading policy file.

[0010] In order to solve the above problems, an embodiment of the present application discloses a resource loading device, including: a connector determination module, used to determine a target connector; a configuration information acquisition module, used to obtain the configuration information of the target connector; a configuration information parsing module, used to parse the configuration information and generate a loading policy file of the target connector, the loading policy file including connector resources corresponding to the target connector; a connector resource loading module, used to load the connector resources according to the loading policy file.

[0011] In order to solve the above problems, an embodiment of the present application discloses a resource loading device, which includes: an aggregation class loader, used to obtain a target connector and configuration information of the target connector through a resource class loader; parsing the configuration information to generate a loading policy file of the target connector, the loading policy file including connector resources corresponding to the target connector; the plug-in class loader, used to load the connector resources according to the loading policy file.

[0012] In order to solve the above problems, an embodiment of the present application discloses a resource loading device, which includes: a connector acquisition module, which is used to determine the service information of the required service and determine the target connector based on the service information; a configuration information acquisition module, which is used to obtain the configuration information of the target connector; a loading strategy acquisition module, which is used to parse the configuration information and generate a loading policy file for the target connector, wherein the loading policy file includes the version information of the connector resources required by the target connector; and a resource processing module, which is used to load the connector resources of the target version according to the loading policy file.

[0013] In order to solve the above problems, an embodiment of the present application discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes one or more methods described in the above embodiments.

[0014] In order to solve the above problems, the embodiments of the present application disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the above embodiments.

[0015] Compared with the prior art, the embodiments of the present application have the following advantages:

[0016] In an embodiment of the present application, when loading a target connector, the configuration information of the target connector can be obtained, and then the configuration information is parsed to generate a loading policy file for the target connector. The loading policy file includes connector resources corresponding to the target connector, thereby being able to dynamically parse the loading strategy of each target connector, achieve isolation of the connector's running container, and then load the corresponding connector resources, so that no conflict issues arise when loading connector resources, thereby improving the stability of the connector. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a schematic diagram of an embodiment of a resource loading method of the present application;

[0018] Figure 2 This is a flowchart of the steps of an embodiment of a resource loading method of the present application;

[0019] Figure 3 is a flowchart of another resource loading method embodiment of the present application;

[0020] Figure 4 This is a flowchart of the steps of another resource loading method embodiment of the present application;

[0021] Figure 5 This is a flowchart of the steps of another resource loading method embodiment of the present application;

[0022] Figure 6 It is a structural schematic diagram of an embodiment of a resource loading device of the present application;

[0023] Figure 7 It is a structural schematic diagram of another resource loading device embodiment of the present application;

[0024] Figure 8 It is a schematic diagram of the structure of an exemplary device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0026] The embodiments of the present application can be applied to various service terminals and platforms developed based on cloud computing, where cloud computing is a service related to information technology, software, and the Internet. This computing resource sharing pool is called a "cloud". Cloud computing brings together many computing resources, realizes automated management through software, and quickly provides resources. The cloud computing-based service terminal can provide services of various hardware resources and software resources, and provide computing, network, and storage capabilities.

[0027] The server of the embodiment of the present application can provide public services, which can be understood as services available to each user. Users can access the server through various methods such as application and registration, and the server can provide various computing, network and storage capabilities. Users can also publish various services on the server, and each service can be connected based on a connector for other use. A connector can be understood as a program for connecting services. For example, in a JAVA scenario, a connector can be a standardized java program package. Among them, services can be various applications, protocols, etc. The server supports third-party service providers, users, etc. to develop their own applications and basic protocols, and provides corresponding connectors. Connectors can be published in the form of jar packages to the connector market for other users to quickly integrate with the provided applications and basic protocols. Among them, jar packages are files used to aggregate a large number of Java class files, related metadata and resource files.

[0028] The embodiment of the present application discloses a resource loading method, which can be applied to a loading engine, for example, a workflow engine, wherein the workflow engine is a part of an application system and provides core solutions for each application system, such as determining information transmission routing, content level, etc. according to different roles, division of labor, and conditions. The loading engine can run in a Java virtual machine, and based on the loading engine loading connector, isolation between different data is achieved, thereby improving the stability of loading. Figure 1 As shown, the loading engine includes multiple class loaders. The first class loader can also be called a container class loader (ContainerClassLoader). As the top-level class loader of the isolated container of the loading engine, the container class loader can be used as the parent loader of each loader to deploy and run data flows (Flow). Among them, each connector can be packaged in the form of a data flow and handed over to the loading engine for operation. For example, a container class loader can be created based on a container class loader factory (ContainerClassLoaderFactory) as a parent loader to support the operation of the loading engine.

[0029] The second class loader can also be called a resource class loader (SharedClassLoader). The resource class loader can provide various resources required for loading the engine and connector loading. The resources provided by the resource class loader include resources from various resource libraries, such as static libraries (shared-lib) or other shared resources. It can also provide various connectors published on the server and various connector resources required by the connector, such as Java class resources, function resources, etc.

[0030] The third class loader can also be called the aggregate class loader (RegionClassLoader). The aggregate class loader determines the loading strategy of the connector. It can dynamically parse the configuration file of the connector to obtain the connector loading strategy file. Among them, the loading strategy file is the loading strategy of various resources required by the connector. The aggregate class loader can also realize the loading of a group of cooperatively running connectors and determine its dynamic loading strategy. The aggregate class loader can be used as a proxy for the plugin class loader (ArtifactClassLoader). It does not load resources itself, but determines the loading strategy of resources. Resources are loaded by the plugin class loader. The aggregate class loader can complete the delegation of the class loader (ClassLoader) by inheriting from the parent loader, such as the loading strategy of the container class loader, the internally maintained plugin registry, and the plugin export resource mapping table. The aggregate class loader can export resources based on the configuration file, and load the exported connector resources into the target region. Then each connector in the region can provide classes and resources for other connectors. The aggregate class loader can understand the dependencies between the members of the region and provide the correct loading strategy.

[0031] In some examples, an aggregate class loader may be a group of class loaders that collaborate to run connector plug-ins, each of which may provide resources, understand dependencies between members within a region, and provide the correct loading strategy.

[0032] For example, for any member X in a region, if it has a dependency relationship with another member Y in another region, X can add the resources exported by Y as a loading strategy of loading the parent first (PARENT_FIRST) to indicate that X needs to use the resources of member Y; for another example, if there is another non-dependent member Y, X can add all resources exported from Y as a loading strategy of loading only the child (CHILD_ONLY) to indicate that X does not need to load these resources; in addition, other loading strategies can also be included, such as recording only the parent (PARENT_ONLY) and loading the child first (CHILD_FIRST).

[0033] The above members can be determined according to the scenario, such as members are connectors, connector resources, etc., and members can also be class loaders of some plug-ins in the aggregate class loader. In some examples, members in a region can export the same resources, and the order in which resources are loaded depends on the order in which class loaders are added to the region.

[0034] Among them, the configuration information of the connector may include the import and export rule files, definition files, etc. of the connector. For example, the configuration file includes export packages and export resources (exportedPackages&exportedResources). The aggregation class loader can parse the configuration information, determine the various connector resources and other resources required by the connector, such as the required Java classes, functions and other information, and can determine the loading order of various connector resources.

[0035] The fourth class loader can also be called a plug-in class loader (ArtifactClassLoader). The plug-in class loader is used to implement the loading of the target connector. It can use the aggregate class loader as an agent to determine the loading policy file and load various connector resources required by the connector based on the loading policy file. Among them, the plug-in class loader can also be regarded as the basic implementation of class loading. The container class loader and the aggregate class loader are polymorphic versions of the plug-in class loader, which can be understood as class loaders for different purposes. When the loading engine is deployed, a template plug-in class loader (MoudleArtifactClassLoader) can be created for each connector. It loads resources from the resource path of the connector. The resource path can be determined based on the area where the resource is located, thereby realizing isolation between connectors, and can monitor the life cycle of the connector and release resources when needed.

[0036] The loading engine may also include an external loader, such as an application container class loader (BizClassLoader). The application container class loader is passed in as a parameter when creating the loading engine. It is an application class loader (Application Class Loader) in a third-party application container that needs to perform class import / export interaction.

[0037] In an embodiment of the present application, the corresponding connector resources can be determined based on the configuration information of the connector and added to the target area. For example, the connector resources of the connector, the connector resources that the connector depends on, and the connector resources of the connector that the connector depends on can be determined based on the configuration information of the connector and added to the target area. And based on the dependency relationship between the connector resources, the loading order between the connector resources is determined, and a loading strategy file is generated. Then, according to the loading strategy file, the specified connector resources are loaded according to the loading order to complete the loading of the connector. In an embodiment of the present application, the connector resources corresponding to the connector and the loading order of the connector resources can be determined based on the configuration information of the connector, and then the specified connector resources can be loaded according to the loading order, which can avoid loading other versions of connector resources and reduce the problem of loading errors.

[0038] The following describes the embodiment of the present application by taking the connector as a Java connector as an example. The embodiment of the present application discloses a resource loading method, which can be executed by a loading engine, such as Figure 2 As shown, the method includes:

[0039] Step 202: Determine the target connector.

[0040] When users use applications, protocols, etc., they need to implement calls with corresponding connectors. The corresponding target connector can be determined based on information such as user requests.

[0041] The loading engine can be run by transmitting parameters based on the application container class loader, so a container class loader can be created as a parent loader to support the operation of the loading engine. Then a resource class loader can be created to share various loaders, connectors, databases and other resources, so that the target connector can be obtained based on the resource class loader.

[0042] Step 204: Obtain configuration information of the target connector.

[0043] Step 206: Parse the configuration information to generate a loading strategy file for the target connector, wherein the loading strategy file includes connector resources corresponding to the target connector; the loading strategy file also includes a loading order for connector resources.

[0044] The aggregate class loader of the loading engine can obtain the target connector and the configuration information of the target connector based on the resource class loader. The configuration information may include the connector's import and export rule files, definition files, etc. Then the aggregate class loader can parse the configuration information, such as determining the various functions, function classes, Java classes and other connector resources required by the connector based on the definition file, and then determine the loading order of each connector resource based on the import and export rule files.

[0045] Among them, the connector resources required by the connector may include various different connector resources, such as the connector resources required by the connector definition, other connector resources that the connector resources depend on, connector resources of the connector's dependent connectors, etc. Therefore, the connector resources defined by the target connector can be called the first connector resource, the connector resources that a certain connector resource depends on can be called the second connector resource, and the connector resources of the connector that the connector depends on can be called the third connector resource.

[0046] The corresponding connector resource can be determined by parsing the information corresponding to the first connector resource in the configuration information. As an optional embodiment, the parsing of the configuration information to generate the loading strategy file of the target connector includes: obtaining the first connector resource corresponding to the target connector according to the configuration information; adding the first connector resource to the target area, and determining the corresponding loading order to generate the loading strategy file. The configuration information may include the first data information corresponding to the first connector resource, and the fourth class loader may parse the first data information of the configuration information to obtain the first connector resource added to the target area and determine the corresponding loading order. The relationship between the java connector and the java class (connector resource) in the area may include a corresponding relationship and a non-corresponding relationship, wherein the relationship between the connector resource called by the java connector and the java connector is a corresponding relationship, and the relationship between other connector resources and the java connector is a non-corresponding relationship. In the process of generating the configuration information, the first data information in the configuration information can be determined according to whether there is a corresponding relationship between the java connector and the java class in the area.

[0047] The corresponding connector resource can be determined by parsing the information corresponding to the second connector resource in the configuration information. As an optional embodiment, the parsing of the configuration information to generate the loading strategy file of the target connector also includes: obtaining the second connector resource according to the second connector resource on which the first connector resource depends; adding the second connector resource to the target area, and determining the corresponding loading order. The configuration information may include the second data information corresponding to the second connector resource, and the fourth class loader may parse the second data information of the configuration information to obtain the second data information added to the target area, and determine the corresponding loading order. The relationship between the java connector and the java class (connector resource) in the area may include a dependency relationship and a non-dependency relationship, wherein the connector resource that the java connector needs to rely on during the loading process has a dependency relationship with the java connector, and the other connector resources have a non-dependency relationship with the java connector. In the process of generating the configuration information, it is possible to identify whether there is a dependency relationship between the java connector and the java class in the area to determine the second data information in the configuration information.

[0048] The corresponding connector resource can be determined by parsing the information corresponding to the third connector resource in the configuration information. As an optional embodiment, the parsing of the configuration information to generate the loading strategy file of the target connector also includes: determining the dependent connector of the target connector; obtaining the third connector resource of the dependent connector; adding the third connector resource to the target area, and determining the corresponding loading order. The configuration information may include the third data information corresponding to the dependent connector. The fourth class loader may parse the third data information of the configuration information, determine the dependent connector of the target connector, and determine the connector resource corresponding to the dependent connector according to the configuration information of the dependent connector, add it to the target area, and determine the corresponding loading order. Among them, the connector resource corresponding to the dependent connector may include the connector resource of the dependent connector, the connector resource that the dependent connector depends on, and the connector resource of other dependent connectors that the dependent connector depends on. The relationship between the java connector and the java connector in the region may include an association relationship and a non-association relationship. Among them, if the loading of a certain java connector is based on the loading of another java connector, then the two java connectors are in an association relationship, and the other java connectors and the java connector are in a non-association relationship. In the process of generating the configuration information, it is possible to identify whether there is an association relationship between the java connector and the java class in the region to determine the third data information in the configuration information.

[0049] Step 208: Load the connector resource according to the loading strategy file.

[0050] The plug-in class loader of the loading engine can load the connector resource according to the loading policy file. Among them, the plug-in class loader can obtain the connector resource from the target area according to the loading policy file, such as loading the connector resource in the loading order according to the class path information of the java class of each connector resource in the target area, such as loading the connector resource through the class loader. The isolation of different loaders is achieved through the target area, and the required connector resources can be obtained based on the specified path of the target area, avoiding connector resource loading errors, and loading in the loading order can reduce conflicts in loading.

[0051] The object class loader of the loading engine can also monitor the loader and release the connector resources after the end. For example, when the task of the connector resource is executed, and when the task corresponding to the connector resource is completed, the connector resource is released. In an optional embodiment, the loading engine can monitor the task cycle of each connector resource in the connector, and release the connector resource when the task cycle of the connector resource is completed. The task cycle of the connector resource (java class) may include: loading (Loading), verification (Verification), preparation (Preparation), resolution (Resolution), initialization (Initialization), use (Using) and unloading (Unloading) and other stages. When the task cycle of the connector resource is in the unloading stage, the loading engine releases the connector resource.

[0052] Based on the above embodiments, the present application also provides a resource loading method, which can be executed by a loading engine, such as Figure 3 As shown, the method includes:

[0053] Step 302: Obtain connector information. The corresponding connector library, configuration information library and connector resource library may be loaded to determine the target connector, the configuration information of the connector and the connector resources of the connector.

[0054] Step 304: Determine the target connector from the connector library according to the connector information.

[0055] Step 306: Obtain the configuration information of the connector from the configuration information library.

[0056] Step 308: Determine whether the connector has a dependent connector. If it is determined according to the configuration information that the target connector has a related dependent connector, return to step 306 to obtain the dependent connector configuration information. If it is determined according to the configuration information that the target connector has no related dependent connector, execute step 310.

[0057] Step 310: Obtain the connector resource corresponding to the target connector according to the configuration information, add the connector resource corresponding to the target connector to the target area, and determine the corresponding loading order to generate a loading strategy file. The connector resource includes at least one of a first connector resource of the target connector, a second connector resource that the first connector resource depends on, and a third connector resource of a dependent connector of the target connector. Determine the configuration information of the connector, and determine the corresponding connector resource and loading order according to the configuration information.

[0058] Step 312: Load the connector resources in the loading order. According to the class path information of each connector resource in the target area, establish an object class loader for each connector resource, and execute the object loader in sequence, so that the connector resources are loaded in the loading order.

[0059] In an embodiment of the present application, the corresponding connector can be determined based on the connector information, and then the corresponding connector resource can be determined based on the configuration information of the connector and added to the target area. And based on the dependency relationship between the connector resources, the loading order between the connector resources is determined, and a loading strategy file is generated. Then the specified connector resources are loaded in the loading order to complete the loading of the connector. In an embodiment of the present application, the connector resources corresponding to the connector and the loading order of the connector resources can be determined based on the configuration information of the connector, and then the specified connector resources are loaded in the loading order, which can avoid loading other versions of connector resources and reduce the probability of loading problems. In addition, the embodiment of the present application determines the corresponding connector resources through configuration information, and can load the connector resources required during the connector loading process without loading other irrelevant connector resources, which can reduce processing pressure.

[0060] Based on the above embodiments, the present application also provides a resource loading method that can be executed by a loading engine. Figure 4 As shown, the method includes:

[0061] Step 402: The aggregate class loader obtains the target connector and the configuration information of the target connector through the resource class loader.

[0062] Step 404: The aggregate class loader parses the configuration information and generates a loading policy file for the target connector. The loading policy file includes connector resources corresponding to the target connector. The loading policy file may also include a loading order for connector resources.

[0063] Step 406: The plug-in class loader loads the connector resource according to the loading policy file.

[0064] The steps of the embodiment of the present application are similar to the steps of the above embodiment. The implementation methods of the steps of the embodiment of the present application can refer to the implementation methods of the above embodiment, and will not be repeated here.

[0065] In an embodiment of the present application, the resource library is loaded, the corresponding target connector is determined, and then the configuration information of the connector is obtained to determine the corresponding connector resource and add it to the target area. And according to the dependency relationship between the connector resources, the loading order between the connector resources is determined, and a loading strategy file is generated. Then the specified connector resources are loaded in the loading order to complete the loading of the connector. In an embodiment of the present application, the connector resources corresponding to the connector and the loading order of the connector resources can be determined based on the configuration information of the connector, and then the specified connector resources can be loaded in the loading order, which can avoid loading other versions of connector resources and reduce the probability of loading problems.

[0066] Based on the above embodiments, the present application also provides a resource loading method that can be executed by a loading engine. Figure 5 As shown, the method includes:

[0067] Step 502: Determine service information of the required service, and determine a target connector according to the service information.

[0068] Step 504: Obtain configuration information of the target connector.

[0069] Step 506: Parse the configuration information to generate a loading policy file for the target connector, wherein the loading policy file includes version information of connector resources required by the target connector, and the loading policy file may also include a loading order for connector resources of the target version.

[0070] Step 508: Load the connector resource of the target version according to the loading strategy file.

[0071] The steps of the embodiment of the present application are similar to the steps of the above embodiment. The implementation methods of the steps of the embodiment of the present application can refer to the implementation methods of the above embodiment, and will not be repeated here.

[0072] In an embodiment of the present application, a manufacturer or developer deploys a connector on a cloud platform to provide services. When a user uses the corresponding service, the cloud platform obtains the service information, determines the corresponding target connector based on the service information, and then obtains the configuration information of the target connector to determine the version information of the corresponding connector resource. And according to the dependencies between the connector resources of the target version, the loading order between the connector resources is determined, and a loading policy file is generated. Then, the connector resources of the target version are loaded in the loading order to complete the loading of the connector. In an embodiment of the present application, the connector resources of the target version corresponding to the connector and the loading order of the connector resources can be determined based on the configuration information of the connector, and then the specified connector resources can be loaded in the loading order, which can avoid loading connector resources of other versions and reduce the probability of loading problems.

[0073] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0074] Based on the above embodiment, this embodiment also provides a resource loading device, such as Figure 6 As shown, the following modules may be included:

[0075] The connector determination module 602 is used to determine a target connector.

[0076] The configuration information acquisition module 604 is used to acquire the configuration information of the target connector.

[0077] The configuration information parsing module 606 is used to parse the configuration information and generate a loading policy file of the target connector. The loading policy file includes a loading sequence of connector resources corresponding to the target connector.

[0078] The connector resource loading module 608 is used to load the connector resource according to the loading strategy file.

[0079] In summary, in an embodiment of the present application, the connector resource corresponding to the connector can be determined based on the configuration information of the connector, which can avoid loading connector resources of other versions and reduce the probability of loading problems. And based on the dependencies between the connector resources, the loading order between the connector resources is determined, and a loading strategy file is generated. Then, the specified connector resources are loaded in the loading order to complete the loading of the connector. In addition, the embodiment of the present application determines the corresponding connector resources through configuration information, and can load the connector resources required during the connector loading process without loading other irrelevant connector resources, which can reduce processing pressure.

[0080] The configuration information parsing module 606 is used to obtain the first connector resource corresponding to the target connector according to the configuration information; add the first connector resource to the target area, determine the corresponding loading order, and generate a loading strategy file.

[0081] The configuration information parsing module 606 is further configured to obtain the second connector resource according to the second connector resource on which the first connector resource depends; add the second connector resource to the target area, and determine the corresponding loading order.

[0082] The configuration information parsing module 606 is further used to determine the dependent connector of the target connector; obtain the third connector resource of the dependent connector; add the third connector resource to the target area, and determine the corresponding loading order.

[0083] The connector resource loading module 608 is used to obtain connector resources from the target area according to the loading strategy file; and load the connector resources according to the loading order.

[0084] The connector resource loading module 608 is further used to monitor the task cycle of the connector and release the connector resources when the task cycle of the connector ends.

[0085] In an embodiment of the present application, the corresponding connector can be determined based on the connector information, and then the corresponding connector resource can be determined based on the configuration information of the connector and added to the target area. And based on the dependency relationship between the connector resources, the loading order between the connector resources is determined, and a loading strategy file is generated. Then the specified connector resources are loaded in the loading order to complete the loading of the connector. In an embodiment of the present application, the connector resources corresponding to the connector and the loading order of the connector resources can be determined based on the configuration information of the connector, and then the specified connector resources can be loaded in the loading order, which can avoid loading other versions of connector resources and reduce the probability of loading problems.

[0086] Based on the above embodiment, this embodiment further provides a resource loading device, which is applied to a loading engine and may specifically include the following modules:

[0087] An aggregation class loader, used to obtain a target connector and configuration information of the target connector through a resource class loader; parse the configuration information to generate a loading policy file of the target connector, wherein the loading policy file includes a loading order of connector resources corresponding to the target connector;

[0088] The plug-in class loader is used to load the connector resource according to the loading policy file.

[0089] In summary, in an embodiment of the present application, the resource library is loaded, the corresponding target connector is determined, and then the configuration information of the connector is obtained to determine the corresponding connector resource and add it to the target area. And according to the dependencies between the connector resources, the loading order between the connector resources is determined, and a loading strategy file is generated. Then the specified connector resources are loaded in the loading order to complete the loading of the connector. In an embodiment of the present application, the connector resources corresponding to the connector and the loading order of the connector resources can be determined based on the configuration information of the connector, and then the specified connector resources can be loaded in the loading order, which can avoid loading other versions of connector resources and reduce the probability of loading problems.

[0090] Based on the above embodiment, this embodiment also provides a resource loading device, such as Figure 7 As shown, the following modules may be included:

[0091] The connector obtaining module 702 is used to determine the service information of the required service and determine the target connector according to the service information.

[0092] The configuration information obtaining module 704 is used to obtain the configuration information of the target connector.

[0093] The loading strategy obtaining module 706 is used to parse the configuration information and generate a loading strategy file of the target connector. The loading strategy file includes version information of connector resources required by the target connector.

[0094] The resource processing module 708 is used to load the connector resource of the target version according to the loading strategy file.

[0095] In an embodiment of the present application, a manufacturer or developer deploys a connector on a cloud platform to provide services. When a user uses the corresponding service, the cloud platform obtains the service information, determines the corresponding target connector based on the service information, and then obtains the configuration information of the target connector to determine the version information of the corresponding connector resource. And according to the dependencies between the connector resources of the target version, the loading order between the connector resources is determined, and a loading policy file is generated. Then, the connector resources of the target version are loaded in the loading order to complete the loading of the connector. In an embodiment of the present application, the connector resources of the target version corresponding to the connector and the loading order of the connector resources can be determined based on the configuration information of the connector, and then the specified connector resources can be loaded in the loading order, which can avoid loading connector resources of other versions and reduce the probability of loading problems.

[0096] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0097] The present application embodiment provides one or more machine-readable media, on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more methods as described in the above embodiments. In the present application embodiment, the electronic device includes a server, a terminal device, and the like.

[0098] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as a server (cluster), a terminal, etc. Figure 8 An exemplary apparatus 800 that can be used to implement various embodiments described in this application is schematically illustrated.

[0099] For one embodiment, Figure 8 An exemplary apparatus 800 is shown having one or more processors 802, a control module (chip set) 804 coupled to at least one of the processor(s) 802, a memory 806 coupled to the control module 804, a non-volatile memory (NVM) / storage device 808 coupled to the control module 804, one or more input / output devices 810 coupled to the control module 804, and a network interface 812 coupled to the control module 804.

[0100] The processor 802 may include one or more single-core or multi-core processors, and the processor 802 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 800 can be used as a server, terminal, or other device described in the embodiments of the present application.

[0101] In some embodiments, the apparatus 800 may include one or more computer-readable media (e.g., memory 806 or NVM / storage device 808) having instructions 814 and one or more processors 802 combined with the one or more computer-readable media and configured to execute the instructions 814 to implement a module to perform the actions described in the present disclosure.

[0102] For one embodiment, the control module 804 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 802 and / or any suitable device or component in communication with the control module 804 .

[0103] The control module 804 may include a memory controller module to provide an interface to the memory 806. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0104] The memory 806 may be used, for example, to load and store data and / or instructions 814 for the device 800. For one embodiment, the memory 806 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 806 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0105] For one embodiment, control module 804 may include one or more input / output controllers to provide an interface to NVM / storage device 808 and input / output device(s) 810 .

[0106] For example, NVM / storage 808 may be used to store data and / or instructions 814. NVM / storage 808 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0107] NVM / storage device 808 may include storage resources that are part of the device on which apparatus 800 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 808 may be accessed via (one or more) input / output devices 810 over a network.

[0108] (One or more) input / output devices 810 may provide an interface for the apparatus 800 to communicate with any other appropriate device, and the input / output device 810 may include a communication component, an audio component, a sensor component, etc. The network interface 812 may provide an interface for the apparatus 800 to communicate through one or more networks, and the apparatus 800 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0109] For one embodiment, at least one of the processor(s) 802 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 804. For one embodiment, at least one of the processor(s) 802 may be packaged together with the logic of one or more controllers of the control module 804 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 802 may be integrated on the same die with the logic of one or more controllers of the control module 804. For one embodiment, at least one of the processor(s) 802 may be integrated on the same die with the logic of one or more controllers of the control module 804 to form a system-on-chip (SoC).

[0110] In various embodiments, the device 800 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 800 may have more or fewer components and / or different architectures. For example, in some embodiments, the device 800 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0111] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0112] An embodiment of the present application further provides an electronic device, comprising: a processor; and a memory, on which executable code is stored, and when the executable code is executed, the processor executes one or more methods described in the embodiments of the present application.

[0113] The embodiments of the present application also provide one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.

[0114] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0115] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0116] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.

[0117] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0118] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal 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.

[0119] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0120] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0121] The resource loading method, resource loading device, electronic device and storage medium provided by the present application are introduced in detail above. The principle and implementation mode of the present application are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A resource loading method, characterized in that: The method includes: Determine the target connector; Obtaining configuration information of the target connector; Parsing the configuration information to generate a loading strategy file for the target connector, wherein the loading strategy file includes connector resources corresponding to the target connector and a loading order of the connector resources; Load the connector resource according to the loading strategy file; The step of parsing the configuration information and generating a loading strategy file for the target connector includes: Acquire a first connector resource corresponding to the target connector according to the configuration information; adding the first connector resource to a target zone; Acquire the second connector resource according to the second connector resource on which the first connector resource depends; The second connector resource is added to the target area, and the corresponding loading order is determined to generate a loading strategy file for the target connector.

2. The method according to claim 1, characterized in that The parsing of the configuration information to generate a loading strategy file for the target connector also includes: Determining dependent connectors of the target connector; Acquire a third connector resource of the dependent connector; The third connector resource is added to the target area, and a corresponding loading order is determined.

3. The method according to claim 1, characterized in that The loading of the connector resource according to the loading strategy file includes: Acquire connector resources from the target area according to the loading strategy file; The connector resources are loaded according to the loading order.

4. The method according to claim 1, characterized in that: Also includes: Monitor the task cycle of the connector, and release the connector resources when the task cycle of the connector ends.

5. A resource loading method, characterized in that: Applied to a loading engine, the loading engine includes a resource class loader, an aggregate class loader and a plug-in class loader, the method includes: The aggregation class loader obtains the target connector and the configuration information of the target connector through the resource class loader; The aggregate class loader obtains the first connector resource corresponding to the target connector according to the configuration information; adding the first connector resource to a target zone; Acquire the second connector resource according to the second connector resource on which the first connector resource depends; Add the second connector resource to the target area, determine the corresponding loading order, and generate a loading strategy file for the target connector, wherein the loading strategy file includes the connector resource corresponding to the target connector and the loading order of the connector resource; The plug-in class loader loads the connector resource according to the loading policy file.

6. A resource loading method, characterized in that: include: Determine service information of the required service, and determine the target connector according to the service information; Get the configuration information of the target connector; Acquire a first connector resource corresponding to the target connector according to the configuration information; adding the first connector resource to a target zone; Acquire the second connector resource according to the second connector resource on which the first connector resource depends; Add the second connector resource to the target area, determine the corresponding loading order, and generate a loading strategy file for the target connector, wherein the loading strategy file includes version information of the connector resource required by the target connector and the loading order of the connector resource; Load the target version of the connector resource according to the loading strategy file.

7. A resource loading device, characterized in that: include: A connector determination module, used for determining a target connector; A configuration information acquisition module, used to acquire the configuration information of the target connector; A configuration information parsing module, used for acquiring a first connector resource corresponding to the target connector according to the configuration information; adding the first connector resource to a target zone; Acquire the second connector resource according to the second connector resource on which the first connector resource depends; Add the second connector resource to the target area, determine the corresponding loading order, and generate a loading strategy file for the target connector, wherein the loading strategy file includes the connector resource corresponding to the target connector and the loading order of the connector resource; A connector resource loading module is used to load the connector resource according to the loading strategy file.

8. A resource loading device, characterized in that: The device comprises: An aggregate class loader, used to obtain a target connector and configuration information of the target connector through a resource class loader; obtain a first connector resource corresponding to the target connector according to the configuration information; add the first connector resource to a target area; obtain the second connector resource according to the second connector resource on which the first connector resource depends; add the second connector resource to the target area, determine the corresponding loading order, and generate a loading policy file for the target connector, wherein the loading policy file includes the connector resource corresponding to the target connector and the loading order of the connector resource; A plug-in class loader is used to load the connector resource according to the loading policy file.

9. A resource loading device, characterized in that: The device comprises: A connector acquisition module, used to determine service information of a required service, and determine a target connector according to the service information; A configuration information acquisition module, used to obtain the configuration information of the target connector; A loading strategy acquisition module, used to obtain a first connector resource corresponding to the target connector according to the configuration information; add the first connector resource to the target area; obtain the second connector resource according to the second connector resource on which the first connector resource depends; add the second connector resource to the target area, and determine the corresponding loading order, and generate a loading strategy file for the target connector, wherein the loading strategy file includes version information of the connector resource required by the target connector and the loading order of the connector resource; The resource processing module is used to load the connector resource of the target version according to the loading strategy file.

10. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the method according to any one of claims 1 to 6.

11. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Matching method and device for resources and environments and computer readable storage medium

    CN108536489A