Informatization component calling method and device, equipment and medium

By building and registering different types of components and managing their information in containers, the problem of difficult component information in the prior art is solved, and the efficient review and dynamic change of component information is achieved.

CN119597280APending Publication Date: 2025-03-11CHENGDU NEW HOPE FINANCIAL INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411704270.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, component information of process calls is difficult to be viewed and it is difficult to dynamically change the specific implementation according to abstract types.

Method used

By building several types of components, including process components, facade components, business components, basic components and virtual components, each type of component includes several attributes. For each type of component, register in the first container and the second container, extract component information from the second container according to user needs, and extract corresponding components from the first container.

Benefits of technology

It realizes that the component information of process calls can be easily and efficiently checked, know which components are called by the process and their specific functions, and can dynamically change nodes according to abstract types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597280A_ABST
    Figure CN119597280A_ABST
Patent Text Reader

Abstract

The invention discloses an informatization component calling method and device, equipment and a medium, and the method comprises the steps: constructing a plurality of types of components according to business demands; and for each type of component, executing steps S121-S122: step S121, when the target server is started, registering the component of the target type to a first container; step S122, registering component information corresponding to the component of the target type into a second container, the component information corresponding to the component of the target type being provided by a plurality of attributes of the component of the target type; extracting information of a plurality of components from the second container according to a target user demand; and extracting a corresponding type of component from the first container according to the information of the plurality of components extracted from the second container. The invention belongs to the technical field of networks. According to the method, the components called by the process and the specific function of each component can be directly fed back to a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to network technology, and in particular to an information component calling method, device, equipment and medium. Background Art

[0002] Component calling refers to the process in software development where a program module (which can be a function, method, class, or object, etc.) calls another program module (i.e., component) to perform a specific task. This calling mechanism allows developers to break down complex systems into smaller, more manageable parts, each of which is responsible for handling a specific aspect of the system.

[0003] In the existing calling scheme, it is difficult to know which components are called in the entire process and the specific functions of each component, and it is difficult to dynamically change its specific implementation based on an abstract type. Therefore, it is urgent to provide an information component calling method that is easy to check the calling information. Summary of the invention

[0004] The present invention solves the technical problem in the prior art that the information of components called by a process is difficult to access by providing an information component calling method, device, equipment and medium, and achieves the information technology effect of being able to simply and efficiently access components called by a process.

[0005] In a first aspect, the present invention provides an information component calling method, the method comprising:

[0006] According to business needs, build several types of components, including process components, facade components, business components, basic components and virtual components. Each type of component includes several attributes.

[0007] For each type of component, steps S121-S122 are performed, including:

[0008] Step S121, when the target server is started, registering the component of the target type to the first container;

[0009] Step S122, registering component information corresponding to the target type component in the second container, wherein the component information corresponding to the target type component is provided by a number of attributes of the target type component;

[0010] According to the target user's needs, extracting some component information from the second container;

[0011] According to the component information extracted from the second container, components of corresponding types are extracted from the first container.

[0012] Further, when the target server is started, registering the component of the target type into the first container includes:

[0013] When the target server starts, load the target type component;

[0014] Create a component instance corresponding to the component of the target type;

[0015] Register the component instance with the first container.

[0016] Further, registering component information corresponding to the component of the target type into the second container includes:

[0017] When the target server starts, load the target type component;

[0018] Create a component instance corresponding to the component of the target type;

[0019] Register the component information corresponding to the component instance to the second container.

[0020] Furthermore, it also includes:

[0021] Determine whether there is a next component;

[0022] If it exists, continue to load the next component; if it does not exist, terminate.

[0023] Furthermore, the method further comprises:

[0024] When the component information corresponding to the target component is constructed for the first time, the version information corresponding to the component information of the target component is constructed according to the component information corresponding to the target component.

[0025] Furthermore, the method further comprises:

[0026] Set the update time limit or version number to control the update of component information of the target component.

[0027] In a second aspect, the present invention provides an information component calling device, the device comprising:

[0028] The component type module is used to build several types of components according to business needs. The component types include: process components, facade components, business components, basic components and virtual components. Each type of component includes several attributes.

[0029] The storage module is used to execute steps S21-S22 for each type of component, including:

[0030] Step S21, when the target server is started, registering the component of the target type to the first container;

[0031] Step S22, registering component information corresponding to the component of the target type into the second container, wherein the component information corresponding to the component of the target type is provided by a number of attributes of the component of the target type;

[0032] A first extraction module is used to extract a number of component information from the second container according to target user requirements;

[0033] The second extraction module is used to extract components of corresponding types from the first container according to the component information extracted from the second container.

[0034] Furthermore, the device also includes:

[0035] An update module is set to set an update time limit or a version number to control the update of the component information of the target component.

[0036] In a third aspect, the present invention provides an electronic device, comprising:

[0037] processor;

[0038] a memory for storing processor-executable instructions;

[0039] The processor is configured to execute to implement an information component calling method provided in the first aspect.

[0040] In a fourth aspect, the present invention provides a non-temporary computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute an information component calling method as provided in the first aspect.

[0041] One or more technical solutions provided in the present invention have at least the following technical effects or advantages:

[0042] The present invention provides an information component calling method, the method comprising: constructing several types of components according to business needs, wherein the component types include: process components, facade components, business components, basic components and virtual components, and each type of component includes several attributes; for each type of component, executing steps S121-S122, including: step S121, when the target server is started, registering the component of the target type to the first container; step S122, registering the component information corresponding to the component of the target type to the second container, wherein the component information corresponding to the component of the target type is provided by several attributes of the component of the target type; extracting several component information from the second container according to the target user's needs; extracting the corresponding type of component from the first container according to the several component information extracted from the second container. The orchestration system of the present invention defines the specific functional components on the process, and in the coding process, does not rely on writing the specific implementation, and only needs to confirm the specific implementation during the orchestration, and will run according to the actual orchestration process during the calling process. The solution provided by the present invention can know the components called by the process and the specific functions of each component. And the node can be dynamically changed according to an abstract type. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0044] Figure 1 A flowchart of an information component calling method provided by the present invention;

[0045] Figure 2 A schematic diagram of the component extraction process provided by the present invention. DETAILED DESCRIPTION

[0046] The embodiment of the present invention solves the technical problem in the prior art that components called by a process are difficult to be consulted by providing an information component calling method.

[0047] The technical solution of the present invention is to solve the above technical problems, and the overall idea is as follows:

[0048] A method for calling an information component, the method comprising: constructing several types of components according to business needs, wherein the component types include: process components, facade components, business components, basic components and virtual components, and each type of component includes several attributes; for each type of component, executing steps S121-S122, including: step S121, when a target server is started, registering the component of the target type to a first container; step S122, registering component information corresponding to the component of the target type to a second container, wherein the component information corresponding to the component of the target type is provided by several attributes of the component of the target type; extracting several component information from the second container according to target user needs; extracting components of corresponding types from the first container according to the several component information extracted from the second container.

[0049] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0050] First of all, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0051] The present invention provides an information component calling method, comprising steps S11-S14:

[0052] Step S11, constructing several types of components according to business requirements, wherein the component types include: process components, facade components, business components, basic components and virtual components, and each type of component includes several attributes.

[0053] Business requirements refer to specific business needs. Different business requirements require different components to implement.

[0054] Process components: Process components are used to orchestrate business components to implement a complete business process or workflow. Process components do not directly process business logic, but act as a coordinator to decide when to call components and how to integrate the results of various components based on predefined rules or conditions.

[0055] Facade component: A component declaration provided to the outside world will provide an http address. Facade components provide a simplified and unified interface for accessing subsystems. In software architecture, facade components are used to hide the complexity of underlying components, making it easier for external systems or clients to interact with components.

[0056] Business component: A business component is a stateful component that is downstream of the process component and the facade component. It is called by the process component and the facade component to execute preset business scenarios and data operations. The downstream includes basic components.

[0057] Basic components: Basic components are stateless functional components that provide encapsulated stateless functional components. Basic components are designed to provide common and reusable functions, thereby reducing code redundancy and improving development efficiency.

[0058] Virtual component: A virtual component is also called a routing component. It implements multi-version routing of components by defining interfaces.

[0059] Each type of component includes several properties, including:

[0060] Name, componentdesc, componentType, componentSubType, componentKind, componentVersion, depends or url.

[0061] Name: also called component name, used to declare the name of the component and the name of the bean in spring. If not filled in, the class name is used by default, with the first letter in lowercase.

[0062] componentdesc: also known as component description, used for business description and functional description of components. It can also implement the ComponentDescription interface. When both the interface and annotation exist, the interface description is used first.

[0063] componentType: also known as component type, which is abstracted and defined by the business system and represents the major category of components. If it is not filled in, the compType of the parent interface is used by default. If there is no parent interface, the current class name is used.

[0064] componentSubType: also known as component subclass, which is defined by the business system and is a subclass of the component type (compType); if not filled in, the compSubType of the parent interface is used by default, and if there is no parent interface, the current class name is used;

[0065] componentKind: also known as component category, used to agree on usage scenarios;

[0066] componentVersion: Also known as the component version number, the component version number is used to identify the specific version of a software component or module;

[0067] depends: also known as component dependency, a list of dependent component names. If left blank, the fields annotated by @ComponentResource in the instance are obtained by default.

[0068] url: only used for facade components, used for the interface address provided to the outside world.

[0069] When executing step S12, annotations can be marked above each type of component. The annotation of the flow component is @FlowComponent; the annotation of the facade component is @FaceComponent; the annotation of the business component is @BusinessComponent; the annotation of the base component is @BaseComponent; and the annotation of the virtual component is @ComponentRouter.

[0070] Step S12 provided by the present invention can also refer to Figure 2 , step S12, for each type of component, executing steps S121-S122, including:

[0071] Step S121: When the target server is started, register the component of the target type to the first container.

[0072] When the target server is started, registering the target type component in the first container includes: when the target server is started, loading the target type component; creating a component instance corresponding to the target type component; and registering the component instance in the first container.

[0073] The target server is the server that runs the service or application, which can be a physical server, a virtual machine, or a container. Booting refers to the process of starting the server and getting it ready to start running the application.

[0074] For example, a Java application using the Spring framework loads the component definition and implementation code into memory, reads the component definition (such as class name, definition in configuration file, etc.), uses a class loader (such as Java's ClassLoader) to load the bytecode into memory, and parses the class metadata (such as annotations, interfaces, etc.).

[0075] Create a specific object instance based on the class definition loaded into memory. Create an object based on the class definition. For example, create an instance of UserService. Add the created component instance to the first container so that other components or services can find and use it.

[0076] Step S122, registering component information corresponding to the component of the target type into the second container, wherein the component information corresponding to the component of the target type is provided by a number of properties of the component of the target type.

[0077] Registering component information corresponding to the target type component in the second container includes: loading the target type component when the target server is started; creating a component instance corresponding to the target type component; and registering component information corresponding to the component instance in the second container.

[0078] Component information refers to the specific content in the attribute, for example, the specific name in the Name attribute. The corresponding component information is composed of the specific contents in several attributes. The component information is registered in the second container, and the second container is used to store the component information. The second container can be an information container.

[0079] The method also includes: determining whether there is a next component; if so, continuing to load the next component; if not, terminating.

[0080] Step S13: extracting some component information from the second container according to the target user's needs.

[0081] It can be understood that, generally speaking, the functions of a process are usually fixed, there are several nodes in the process, and the functions of each node are implemented by several components. In order to change the functions of the nodes, the entire process is defined using abstract interfaces, and the specific components that the target node needs to use are orchestrated through the component information in the second container when in standby.

[0082] The component information of the service can be provided to the outside world, which is conducive to the service of the orchestration process to set the specific components in the process.

[0083] You can query the corresponding service instance information from the service registration center according to user needs.

[0084] Step S14: extract components of corresponding types from the first container according to the component information extracted from the second container.

[0085] The corresponding component instance can be obtained from the dependency injection container based on the service instance information obtained from the service registration center.

[0086] When the component information corresponding to the target component is constructed for the first time, the version information corresponding to the component information of the target component is constructed according to the component information corresponding to the target component, and an update time limit or version number is set to control the update of the component information of the target component.

[0087] In summary, the present invention provides an information component calling method, the method includes: according to business needs, constructing several types of components, wherein the component types include: process components, facade components, business components, basic components and virtual components, and each type of component includes several attributes; for each type of component, executing steps S121-S122, including: step S121, when the target server is started, registering the component of the target type to the first container; step S122, registering the component information corresponding to the component of the target type to the second container, wherein the component information corresponding to the component of the target type is provided by several attributes of the component of the target type; according to the target user needs, extracting several component information from the second container; according to the several component information extracted from the second container, extracting the corresponding type of component from the first container. The orchestration system of the present invention defines the specific functional components on the process. During the coding process, it does not rely on writing the specific implementation. It only needs to confirm the specific implementation during the orchestration. During the calling process, it will run according to the actual orchestration process. The solution provided by the present invention can know the components called by the process and the specific functions of each component. And the node can be dynamically changed according to an abstract type.

[0088] Based on the same inventive concept, the present invention provides an information component calling device, the device comprising:

[0089] The component type module is used to build several types of components according to business needs. The component types include: process components, facade components, business components, basic components and virtual components. Each type of component includes several attributes.

[0090] The storage module is used to execute steps S21-S22 for each type of component, including:

[0091] Step S21, when the target server is started, registering the component of the target type to the first container;

[0092] Step S22, registering component information corresponding to the component of the target type into the second container, wherein the component information corresponding to the component of the target type is provided by a number of attributes of the component of the target type;

[0093] A first extraction module is used to extract a number of component information from the second container according to target user requirements;

[0094] The second extraction module is used to extract components of corresponding types from the first container according to the component information extracted from the second container.

[0095] Furthermore, the device also includes:

[0096] An update module is set to set an update time limit or a version number to control the update of the component information of the target component.

[0097] Based on the same inventive concept, the present application also provides an electronic device, including:

[0098] processor;

[0099] a memory for storing processor-executable instructions;

[0100] The processor is configured to execute to implement an information component calling method as provided above.

[0101] Based on the same inventive concept, the present application also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute an information component calling method as provided above.

[0102] Since the electronic device introduced in this embodiment is an electronic device used to implement the information processing method in the embodiment of the present invention, based on the information processing method introduced in the embodiment of the present invention, a person skilled in the art can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present invention is not described in detail here. As long as the electronic device used by a person skilled in the art to implement the information processing method in the embodiment of the present invention, it belongs to the scope of protection of the present invention.

[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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 1A device that provides the functions specified in a block or multiple blocks.

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising 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.

[0106] 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 implementing 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.

[0107] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other 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 present invention.

[0108] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for calling an information component, characterized in that: The method comprises: According to business needs, build several types of components, including process components, facade components, business components, basic components and virtual components. Each type of component includes several attributes. For each type of component, steps S121-S122 are performed, including: Step S121, when the target server is started, registering the component of the target type to the first container; Step S122, registering component information corresponding to the target type component in the second container, wherein the component information corresponding to the target type component is provided by a number of attributes of the target type component; extracting some component information from the second container according to target user needs; According to the information of the components extracted from the second container, components of corresponding types are extracted from the first container.

2. The method for calling an information component according to claim 1, characterized in that: When the target server starts, register the target type component in the first container, including: When the target server starts, load the target type component; Create a component instance corresponding to the component of the target type; Register the component instance with the first container.

3. The method for calling an information component according to claim 2, characterized in that: Register the component information corresponding to the target type component in the second container, including: When the target server starts, load the target type component; Create a component instance corresponding to the component of the target type; Register the component information corresponding to the component instance to the second container.

4. The method for calling an information component according to claim 3, characterized in that: Also includes: Determine whether there is a next component; If it exists, continue to load the next component; If not present, terminate.

5. The method for calling an information component according to claim 1, characterized in that: The method further comprises: When the component information corresponding to the target component is constructed for the first time, the version information corresponding to the component information of the target component is constructed according to the component information corresponding to the target component.

6. The method for calling an information component according to claim 5, characterized in that: The method further comprises: An update time limit or version number is set to control the update of the component information of the target component.

7. An information component calling device, characterized in that: The device comprises: The component type module is used to build several types of components according to business needs. The component types include: process components, facade components, business components, basic components and virtual components. Each type of component includes several attributes. The storage module is used to execute steps S21-S22 for each type of component, including: Step S21, when the target server is started, registering the component of the target type to the first container; Step S22, registering component information corresponding to the component of the target type into the second container, wherein the component information corresponding to the component of the target type is provided by a number of attributes of the component of the target type; A first extraction module, used to extract a number of component information from the second container according to target user requirements; The second extraction module is used to extract components of corresponding types from the first container according to the component information extracted from the second container.

8. The information component calling device according to claim 7, characterized in that: The device also includes: An update module is set to set an update time limit or a version number to control the update of the component information of the target component.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute to implement an information component calling method as described in any one of claims 1 to 6.

10. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to implement an information component calling method as described in any one of claims 1 to 6.