CN114936031A - Component calling method and electronic equipment - Google Patents

Component calling method and electronic equipment Download PDF

Info

Publication number
CN114936031A
CN114936031A CN202210860025.3A CN202210860025A CN114936031A CN 114936031 A CN114936031 A CN 114936031A CN 202210860025 A CN202210860025 A CN 202210860025A CN 114936031 A CN114936031 A CN 114936031A
Authority
CN
China
Prior art keywords
component
instance
target
installation
component instance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210860025.3A
Other languages
Chinese (zh)
Other versions
CN114936031B (en
Inventor
陈晖�
王长征
张玉丹
陆卫军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN202210860025.3A priority Critical patent/CN114936031B/en
Publication of CN114936031A publication Critical patent/CN114936031A/en
Application granted granted Critical
Publication of CN114936031B publication Critical patent/CN114936031B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading

Abstract

The application provides a calling method of a component and electronic equipment, wherein the method comprises the following steps: receiving a component instance installation request sent by terminal equipment, wherein the component instance installation request can comprise an identifier of a component installation package of a target component triggered by a user; generating a component instance of a target component corresponding to the terminal equipment according to the component instance installation request; distributing an instance installation directory to the component instance, and acquiring an installation package of a target component according to the identifier of the component installation package; and installing the installation package of the target component to the instance installation directory of the component instance, and running the component instance. The method can realize that each component is installed according to the multiple component examples, so that each component can be installed under an independent catalog and is not limited by a fixed server catalog, and a plurality of component examples of the same type can be mutually independent and do not influence each other after being installed, thereby being capable of flexibly carrying out dynamic expansion or migration according to the requirement.

Description

Component calling method and electronic equipment
Technical Field
The application relates to the technical field of communication, in particular to a component calling method and electronic equipment.
Background
With the development of Web technology, a website can be enabled to dynamically add and remove components without stopping services.
In the prior art, the front-end file and the back-end file corresponding to the component are packaged and installed in a front-end page uploading mode, the method simplifies the component installation process and facilitates subsequent uninstallation, and meanwhile, the component can be uninstalled according to the recorded corresponding relation between the back-end component and the front-end file.
However, in the prior art, a service scenario that needs multiple instances cannot be satisfied still exists, and meanwhile, a component can only be installed in a fixed directory, and cannot perform dynamic capacity expansion or migration by using multiple storage devices.
Disclosure of Invention
An object of the present application is to provide a method for calling a component and an electronic device, which can satisfy a multi-instance service scenario, and can also be installed in any directory and independently accessed after being installed without affecting each other, thereby implementing dynamic capacity expansion and data migration.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a component calling method, which is applied to a server, and the calling method includes:
receiving a component instance installation request sent by a terminal device, wherein the component instance installation request comprises: the identifier of the component installation package of the target component triggered by the user;
generating a component instance of the target component and an identifier of the component instance corresponding to the terminal device according to the component instance installation request;
distributing an instance installation directory to the component instance, and acquiring an installation package of the target component according to the identifier of the component installation package;
installing the installation package of the target component into an instance installation directory of the component instance, running the component instance, and sending the identifier of the component instance to the terminal equipment;
receiving a component instance service request sent by a terminal device, wherein the component instance service request comprises: an identification of the component instance and a data type of the request;
determining an acquisition source type of the data according to the data type, wherein the acquisition source type comprises: instance installation directory type or port type;
determining a target acquisition source under the acquisition source type according to the identifier of the component instance, and reading target data of the request through the target acquisition source;
and sending the target data to the terminal equipment.
Optionally, the determining, according to the identifier of the component instance, a target acquisition source in the acquisition source type, and reading target data of the request through the target acquisition source includes:
if the acquisition source type is the instance installation directory type, comparing the identifier of the component instance with each instance installation directory established currently respectively, and taking the instance installation directory containing the identifier of the component instance as the target acquisition source;
reading the target data from the target acquisition source.
Optionally, the determining, according to the identifier of the component instance, a target acquisition source in the acquisition source type, and reading target data of the request through the target acquisition source includes:
if the acquisition source type is the port type, inquiring a target port corresponding to the identifier of the component instance in a mapping relation table of the identifier of the currently established component instance and the port, and taking the target port as the target acquisition source;
reading the target data from the running component instance through the port.
Optionally, the determining, according to the data type, an acquisition source type of the data includes:
if the data type is static data, determining that the acquisition source type is the instance installation directory type;
and if the data type is dynamic data, determining that the acquisition source type is the port type.
Optionally, the allocating an instance installation directory to the component instance includes:
acquiring an installation catalog of the target component;
and splicing the identifier of the component example and the installation catalog of the target component to obtain the example installation catalog of the component example.
Optionally, after installing the installation package of the target component into the instance installation directory of the component instance and running the component instance, the method further includes:
acquiring the identifier of the component instance and the service type of the component instance;
allocating a target port for the component instance, establishing a mapping relation between the identifier of the component instance and the target port, and adding the mapping relation between the identifier of the component instance and the target port into a mapping relation table between the identifier of the component instance and the port.
Optionally, the method further includes:
receiving a first component instance migration request sent by a terminal device, where the first component instance migration request is used for migrating the installation directory of the target component, and the first component instance migration request includes: the identification of the target component and the post-migration directory of the target component;
determining whether to migrate the target component and files under the installation directories of the component instances belonging to the target component according to the first component instance migration request;
and if so, carrying out migration processing on the target component and the files under the installation directories of the component instances belonging to the target component.
Optionally, the method further includes:
receiving a second component instance migration request sent by a terminal device, where the migration request of the second component instance is used for migrating an installation directory of the component instance, and the second component instance migration request includes: an identification of the component instance and a post-migration directory of the component instance;
and changing the installation directory of the component instance into a post-migration directory of the component instance according to the second component instance migration request.
Optionally, the method further includes:
receiving a component instance deleting request sent by terminal equipment, wherein the component instance deleting request comprises: an identification of the component instance;
and stopping running the component instance according to the component instance deleting request, and deleting the file in the installation directory of the component instance.
In a second aspect, an embodiment of the present application provides an apparatus for invoking a component, where the apparatus includes:
a receiving module, configured to receive a component instance installation request sent by a terminal device, where the component instance installation request includes: the identifier of the component installation package of the target component triggered by the user;
a generating module, configured to generate, according to the component instance installation request, a component instance of the target component and an identifier of the component instance, where the component instance corresponds to the terminal device;
the distribution module is used for distributing an instance installation directory to the component instance and acquiring the installation package of the target component according to the identifier of the component installation package;
the installation module is used for installing the installation package of the target component into the instance installation catalog of the component instance, operating the component instance and sending the identifier of the component instance to the terminal equipment;
a receiving model, specifically configured to receive a component instance service request sent by a terminal device, where the component instance service request includes: an identification of the component instance and a data type of the request;
a determining module, configured to determine an acquisition source type of the data according to the data type, where the acquisition source type includes: instance installation directory type or port type;
a determining module, configured to determine, according to the identifier of the component instance, a target acquisition source in the acquisition source type, and read target data of the request through the target acquisition source;
and the sending module is used for sending the target data to the terminal equipment.
Optionally, the determining module is specifically configured to:
if the acquisition source type is the instance installation directory type, comparing the identifier of the component instance with each instance installation directory established currently, and taking the instance installation directory containing the identifier of the component instance as the target acquisition source;
reading the target data from the target acquisition source.
Optionally, the determining module is specifically configured to:
if the acquisition source type is the port type, inquiring a target port corresponding to the identifier of the component instance in a mapping relation table of the identifier of the currently established component instance and the port, and taking the target port as the target acquisition source;
reading the target data from the running component instance through the port.
Optionally, the determining module is specifically configured to:
if the data type is static data, determining that the acquisition source type is the instance installation directory type;
and if the data type is dynamic data, determining that the acquisition source type is the port type.
Optionally, the allocation module is specifically configured to:
acquiring an installation catalog of the target component;
and splicing the identifier of the component example and the installation catalog of the target component to obtain the example installation catalog of the component example.
Optionally, the installation module is specifically configured to:
acquiring the identifier of the component instance and the service type of the component instance;
allocating a target port for the component instance, establishing a mapping relation between the identifier of the component instance and the target port, and adding the mapping relation between the identifier of the component instance and the target port into a mapping relation table between the identifier of the component instance and the port.
Optionally, the receiving module is further configured to:
receiving a first component instance migration request sent by a terminal device, wherein the first component instance migration request is used for migrating the installation directory of the target component, and the first component instance migration request comprises: the identification of the target component and the post-migration directory of the target component;
determining whether to migrate the target component and files under the installation directories of the component instances belonging to the target component according to the first component instance migration request;
and if so, carrying out migration processing on the target component and the files under the installation directories of the component instances belonging to the target component.
Optionally, the receiving module is further configured to:
receiving a second component instance migration request sent by a terminal device, wherein the second component instance service request is used for migrating an installation directory of the component instance, and the second component instance migration request comprises: an identification of the component instance and a post-migration directory of the component instance;
and changing the installation directory of the component instance into a post-migration directory of the component instance according to the second component instance migration request.
Optionally, the receiving module is further configured to:
receiving a component instance deleting request sent by terminal equipment, wherein the component instance deleting request comprises: an identification of the component instance;
and stopping running the component instance according to the component instance deleting request, and deleting the file in the installation directory of the component instance.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the device comprises a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when an application program runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the calling method of the component according to the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is read and executes the steps of the method for invoking the component according to the first aspect.
The beneficial effect of this application is:
according to the component calling method and the electronic device, the component instance installation request sent by the terminal device is received, and the component instance installation request can include the identifier of the component installation package of the target component triggered by a user; generating a component instance of a target component corresponding to the terminal equipment according to the component instance installation request; distributing an instance installation directory to the component instance, and acquiring an installation package of a target component according to the identifier of the component installation package; and installing the installation package of the target component to the instance installation directory of the component instance, and running the component instance. The method comprises the steps that unique instance installation catalogues and identifiers of component instances are allocated to component instances of target components according to installation package identifiers of the target components, each component can be installed according to multiple component instances, each component instance can be installed in an independent installation catalog and is not limited by a fixed server catalog, multiple component instances of the same type can be independent of each other and do not affect each other after being installed, and when data of the component instances are called, the unique instance installation catalogues and the identifiers of the component instances are allocated to each component instance, so that the target acquisition source of the data can be dynamically determined through the identifiers of the component instances, and dynamic calling of the component instances is achieved.
And secondly, the component instances installed to different storage positions can be migrated at any time, so that dynamic capacity expansion and data migration are realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic diagram of an exemplary scenario provided in an embodiment of the present application;
fig. 2 is a schematic view of a user operation interface provided in an embodiment of the present application;
fig. 3 is a schematic flowchart of a component calling method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating a static data request according to an embodiment of the present application;
FIG. 5 is a flow chart illustrating a dynamic data request according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another component calling method according to an embodiment of the present application;
FIG. 7 is a schematic flowchart of an example generation component provided in an embodiment of the present application;
FIG. 8 is a flowchart illustrating migration of an installation directory of a target component according to an embodiment of the present disclosure;
FIG. 9 is a flow diagram illustrating an installation directory for migrating component instances according to an embodiment of the present application;
FIG. 10 is a flowchart illustrating an example deletion component according to an embodiment of the present application;
FIG. 11 is a diagram illustrating an apparatus for component invocation according to an embodiment of the present application;
fig. 12 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Further, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and that steps without logical context may be reversed in order or performed concurrently. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
Fig. 1 is a diagram illustrating an exemplary system architecture of a component calling method according to an embodiment of the present disclosure, where the method relates to a server and a terminal device, and the terminal device 101 in the embodiment of the present disclosure may refer to a device that displays a front page, such as a desktop computer, a notebook computer, and the like. The server 102 may be referred to as a backend server, and then the terminal device may send a request to the server 102 according to a user operation, and the backend receives the request and deploys the component instance and invokes the component instance by using the method provided in the embodiment of the present application.
Referring to fig. 1, optionally, the front page displayed by the terminal device 101 may include a component warehouse page 1011, a component upload page 1012, and a component call page 1013, where the component warehouse page 1011 is used to display a preset and user uploaded component list, for example, the component list may be displayed by using a tree structure; the component upload page 1012 is used for displaying a page when a component is uploaded, and a required component can be uploaded through the page; the component call page 1013 is used to display and set component information on the page, and the form of the page may be different according to different components, for example, any form such as a drawer, a pop-up window, and a toolbar.
A component may be indicated as a processing step, which is applied to different scenarios or applications, and the processing step in an application corresponds to one component instance, and the processing step may be applied to multiple scenarios or applications, and may correspond to multiple component instances.
Referring to fig. 1, optionally, the server 102 may include a component repository module 1021, a component installation module 1022, a component instance management module 1023, and a call forwarding module 1024. Wherein, the component repository management module 1021 may be configured to manage the component installation package in the backend server; the component installation module 1022 may be configured to receive an installation request sent by a front-end page and perform installation; the component instance management module 1023 can be used to save information of components and component instances; the component instance call forwarding module 1024 may be configured to receive a front-end service request and obtain corresponding data according to the service request.
Fig. 2 is a schematic diagram of a user operation interface provided in an embodiment of the present application, and as shown in fig. 2, the interface may include a component warehouse page 1011, a flowchart editing area 202, and a component calling page 1013.
Optionally, for the component repository in the component repository page 1011, the user may preset or upload components to the component repository in advance, or upload components to the component repository in a real-time uploading manner when installing component instances, specifically, the user may call the component upload page 1012 by clicking the "new component" button 201 in the component repository page 1011, then select a required component to upload, the uploaded component may be displayed in the component repository page 1011, and then the user may select a target component from the component repository page 1011, and further create a corresponding target component instance, where each processing step in an application in the embodiment of the present application corresponds to one component instance.
Optionally, the flow diagram edit section 202 is a visual modeling for creating component instances. Specifically, a user may place a target component in the component repository page 1011 into the flowchart editing area 202 in a dragging manner, so as to trigger execution of a method for invoking a component according to the embodiment of the present application, so as to create a corresponding target component instance, where the target component instance may be identified by using a rectangular frame in the flowchart editing area 202, or may be identified by using another shape, which is not specifically limited in the embodiment of the present application.
Optionally, the component calling page 1013 may be a front-end page included in the component itself, and is configured to display information of the component and set component information, one component may correspond to multiple component calling pages 1013, and a user may call out the corresponding component calling page 1013 in different manners, for example, the user may call out a first calling page of a target component in a single-click manner or call out a second calling page of the target component in a double-click manner, and a specific call-out manner may be set according to a specific service scenario, which is not limited in this embodiment of the present application.
Fig. 3 is a schematic flowchart of a component invoking method provided in an embodiment of the present application, where an execution subject of the method is the foregoing server, and as shown in fig. 3, the method includes:
s301, receiving a component instance installation request sent by the terminal equipment.
Optionally, the terminal device refers to a device that displays a front-end page in this embodiment of the application, and the server may receive a component instance installation request sent by the terminal device, where the component instance installation request may include an identifier of a component installation package of a target component triggered by a user.
The component installation package may be a single installation package that packages front-end files and back-end files required by the component together, the directories in the component installation package may be divided into a front-end directory and a back-end directory, and may be stored according to a preset storage path, each component installation package corresponds to a corresponding identifier, for example, the identifier of the component a may be "c 650e329-aeca-4a14-823f-aa1c2075c5f 8".
For example, referring to fig. 2, a user may first select a target component from a component repository page 1011, drag the target component from the component repository page 1011 to the flowchart editing area 202 in a dragging manner, and after the terminal device recognizes an operation of the user, obtain an identifier of a component installation package corresponding to the target component through the component repository page 1011, where the target component includes a corresponding identifier of the component installation package, use the identifier of the component installation package corresponding to the target component as data of a component instance installation request, and send the component instance installation request to a component installation module 1022 in the server.
Optionally, different users may send installation requests of different component instances by triggering the same target component, for example, user a may trigger target component H to send an installation request of component instance a, and user B may also trigger target component H to send an installation request of component instance B.
Optionally, the user may trigger the same target component to send an installation request of different component instances through different terminal devices, for example, the user may trigger the target component H to send an installation request of the component instance a through the terminal device a, and may also trigger the target component H to send an installation request of the component instance B through the terminal device B.
S302, generating a component instance of the target component corresponding to the terminal device and an identifier of the component instance according to the component instance installation request.
Optionally, the component installation module 1022 in the back-end server generates a component instance of the target component corresponding to the terminal device according to the received component instance installation request, where the component instance of one target component corresponds to one component instance identifier.
The back-end server may generate a component instance of the target component for each terminal device, where the component instance is referred to as a component instance of a target component corresponding to the terminal device in the present application.
Optionally, if different terminal devices send component instance installation requests of target components of the same type, the back-end server may generate different component installation instances, for example, for a target component H of the same type, a component instance a' may be generated according to the component instance installation request of the terminal device a; and generating a component instance B ' according to the component instance installation request of the terminal equipment B, wherein the component instance A ' and the component instance B ' can be generated according to the same component type H, the component H can be independently and correspondingly set in the component instance A ', the component H can be independently and correspondingly set in the component instance B ', and the components H in the component instance A ' and the component instance B ' can independently exist and do not influence each other.
S303, distributing an instance installation directory to the component instance, and acquiring an installation package of the target component according to the identifier of the component installation package.
Optionally, the server allocates a corresponding instance installation directory to the component instance of the target component, and then each component instance corresponds to an instance installation directory.
Optionally, the server may obtain the installation package of the target component according to the identifier of the component installation package. Specifically, the component installation module 1022 in the server uses the identifier of the component installation package as data of the request for obtaining the installation package, sends the request for obtaining the component installation package to the component repository, and the component repository obtains the installation package required by the component according to the received request for obtaining the component installation package, and sends the component installation package to the component installation module 1022.
S304, the installation package of the target component is installed to the instance installation directory of the component instance, the component instance is operated, and the identifier of the component instance is sent to the terminal equipment.
Illustratively, the component installation module 1022 installs the component installation package in the component instance installation directory, and runs the component instance and sends the identifier of the component instance to the terminal device, meanwhile, the component installation module 1022 saves the information such as the component instance identifier and the component instance installation directory as the configuration of the component instance to the component instance management module 1023, and the component instance management module 1023 may store the component instance information in the memory and also in the configuration file or the database, so that the component instance information can be reloaded when the server is restarted later.
S305, receiving a component instance service request sent by the terminal equipment.
Optionally, the component instance service request includes an identifier of the component instance and a data type of the request, where the identifier of the component instance refers to the identifier of the component instance generated in step S302, and is sent to the terminal device through step S304. For example, the component instance identifier may be "c 650e329-aeca-4a14-823f-aa1c2075c5f 8", and the data types of different service requests may be different, wherein the service requests may include static data requests and dynamic data requests.
Optionally, the data type of the request may be used to indicate that only the identifier of the component instance is used as HyperText Transfer protocol (HTTP) data, or may be used to indicate that the identifier of the component instance is filled or written into corresponding Uniform Resource Locator (URL) data or Body data as HTTP data. Of course, the data type of the request may also be used to indicate that the identity of the component instance is to be filled or written into other data as HTTP data. The embodiment of the present application does not limit this.
Specifically, in the case that the type of the requested data is static data, the requested data may be used to indicate that the identification of the component instance is filled or written in the corresponding URL data or Body data as HTTP data. In the case where the type of the requested data is dynamic data, the requested data may be used to indicate that only the identity of the component instance is to be treated as HTTP data. The embodiment of the present application does not limit this.
Illustratively, a user may call out a corresponding component calling page 1013 by clicking a component instance in a flow editing area in a terminal device, and send an identifier of the component instance and requested data to a calling and forwarding module 1024 of a server through the component calling page 1013, where the calling and forwarding module 1024 in the server receives the service request.
S306, determining the acquisition source type of the data according to the data type.
The data obtaining source type comprises an instance installation directory type or a port type, the data can be obtained through an instance installation directory of the component instance or through a port of the component instance, and different obtaining source types can be selected for different requested data types.
And S307, determining a target acquisition source under the acquisition source type according to the identifier of the component example, and reading the target data of the request through the target acquisition source.
Optionally, after the obtaining source type of the data is determined according to the requested data type in step S306, a target obtaining source may be determined by using a preset method in the determined source type according to the identifier of the component instance, and the requested target data is read from the target obtaining source.
Illustratively, the call forwarding module 1024 in the server receives the identifier of the component instance, requests the component instance management module 1023 to obtain the target data, and the component instance management module 1023 returns the read target data to the call forwarding module 1024.
And S308, sending the target data to the terminal equipment.
Illustratively, the component call forwarding module 1024 in the server sends the received request data to the terminal device, and the requested data can be displayed through the component call page 1013. In summary, in this embodiment, by receiving a component instance installation request sent by a terminal device, the component instance installation request may include an identifier of a component installation package of a target component triggered by a user; generating a component instance of a target component corresponding to the terminal equipment according to the component instance installation request; distributing an instance installation directory to the component instance, and acquiring an installation package of a target component according to the identifier of the component installation package; and installing the installation package of the target component to the instance installation directory of the component instance, and running the component instance. The method comprises the steps that unique instance installation catalogues and identifiers of component instances are allocated to component instances of target components according to installation package identifiers of the target components, each component can be installed according to multiple component instances, each component instance can be installed in an independent installation catalog and is not limited by a fixed server catalog, multiple component instances of the same type can be independent of each other and do not affect each other after being installed, and when data of the component instances are called, the unique instance installation catalogues and the identifiers of the component instances are allocated to each component instance, so that the target acquisition source of the data can be dynamically determined through the identifiers of the component instances, and dynamic calling of the component instances is achieved.
Optionally, in the above S307, determining a target obtaining source under the obtaining source type according to the identifier of the component instance, and reading the target data of the request through the target obtaining source may include:
optionally, if the type of the acquisition source is an instance installation directory type, the identifier of the component instance is respectively compared with each instance installation directory established currently, and the instance installation directory containing the identifier of the component instance is used as a target acquisition source.
Optionally, the installation directory of each component instance may be stored in a preset directory, if it is determined that the acquisition source type of the data is the instance installation directory type according to the request data type of the component instance, the identifier of the component instance may be respectively compared with each instance installation directory in the preset directory, an instance installation directory including the identifier of the component instance is found, the found instance installation directory including the identifier of the component instance is used as a target acquisition source of the component instance service request, and the target data is read from the target acquisition source.
Optionally, in the above S307, determining a target obtaining source under the obtaining source type according to the identifier of the component instance, and reading the target data of the request through the target obtaining source may include:
if the acquisition source type is the port type, inquiring a target port corresponding to the identifier of the component instance in a mapping relation table of the identifier of the currently established component instance and the port, and taking the target port as a target acquisition source.
Optionally, there is a mapping relationship between the identifier of each component instance and the port of each component instance, and if it is determined that the acquisition source type of the data is the port type according to the request data type of the component instance, a target port corresponding to the identifier of the component instance may be queried in the established mapping relationship table between the identifier of the component instance and the port, and the target port that is found is used as a target acquisition source of the service request of the component instance, and the target data is read from the target acquisition source.
Optionally, the step S306 determines the type of the data acquisition source according to the type of the data, and may include:
optionally, if the data type is static data, the obtaining source type is determined to be an instance installation directory type.
The static data can include static data such as HTML and JavaScript, and the static data can be set in a preset directory of the component instance installation directory, so that the corresponding static data can be read by acquiring the preset directory.
Specifically, the user clicks the component instance in the flow editing area of the terminal device, calls out the component calling page 1013 corresponding to the component instance, and the identifier of the component instance can be one of HTTP request data through the component calling page 1013, and fills or writes the identifier of the component instance into corresponding URL data or Body data as HTTP data, for example, the URL may be in the format of HTTP:// ip: port/static/c650e329-aeca-4a14-823 f-aa-1 c2075c5f8/index. html, sends the URL data as an HTTP data request to the call forwarding module 1024 in the server, and when the call forwarding module 1024 receives the HTTP data request, parses out the component instance identifier carried in the HTTP data, requests the installation directory of the component instance to the component instance management module 1023 according to the component instance identifier, and the call forwarding module 1024 receives the component instance installation directory acquired by the component instance management module 1023, html, the call forwarding module 1024 returns the obtained static data to the terminal device, and the component call page 1013 of the terminal device displays the page and the control, for example, displays the page and the control in the form of a file label, a text picture, and the like.
The above embodiment describes the process of requesting static data of a component example, and in order to better understand the technical solution of the present application, the following describes the process of requesting static data of a component example completely through an interactive process between a terminal device and a server. Specifically, fig. 4 is a schematic flowchart of a static data request provided in the embodiment of the present application, and as shown in fig. 4, a flow of a terminal device and a server interacting to implement a static data request of a component instance includes:
s401, the user clicks the component instance in the process editing area of the terminal device to call out a component calling page 1013 corresponding to the component instance.
S402, sending the static data request to the call forwarding module 1024 in the server by using the identifier of the component instance as an HTTP data request through the component call page 1013.
S403, the call forwarding module 1024 sends a request for obtaining an installation directory of the component instance to the component instance management module 1023 according to the received component instance identifier.
S404, invoking the forwarding module 1024 to read corresponding static data according to the received installation directory of the component instance, and returning the static data to the terminal device.
And S405, the terminal equipment calls the page 1013 through the component to display the page and the control.
The specific implementation process of the above steps has been explained in detail in the foregoing embodiments, and reference may be made to the foregoing specific embodiments, which are not described herein again.
In this embodiment, the installation catalog corresponding to the component instance may be obtained through the identifier of the component instance and the requested data type, so that the requested data may be obtained, and the requested data may be dynamically obtained through the identifier of the component instance.
Optionally, if the data type is dynamic data, it is determined that the acquisition source type is a port type.
The dynamic data may include user data such as configuration data and database information, and if a user needs to check existing configuration data or modify and store the configuration data, the user needs to read and write the dynamic data, and needs a request for the dynamic data, and the dynamic data is obtained from an operating component instance through a port of the component instance.
Specifically, when the terminal device determines that dynamic data needs to be loaded through the component calling page 1013, the terminal device sends a request of the dynamic data to the calling and forwarding module 1024 in the server by using the identifier of the component instance as HTTP data through the component calling page 1013, when the calling and forwarding module 1024 receives the HTTP data request, the calling and forwarding module analyzes the identifier of the component instance carried in the HTTP data, requests the port of the component instance to the component instance management module 1023 according to the identifier of the component instance, the component instance management module 1023 acquires the port of the component instance according to the received port request of the component instance and returns to the calling and forwarding module 1024, the calling and forwarding module 1024 creates a corresponding client by using the port of the received component instance as data, for example, if the port of the acquired component instance is an HTTP type port, an HTTP client is created, wherein communication between the module and other modules can be performed through the client, then, the call forwarding module 1024 reads the requested dynamic data from the running component instance through the client, returns the read dynamic data to the terminal device, and displays the dynamic data through the component call page 1013 in the terminal device, for example, the dynamic data may be displayed in the forms of refreshing configuration, prompting operation success, and the like.
The above embodiment describes a process of dynamic data request of a component example, and in order to better understand the technical solution of the present application, the following fully describes the process of dynamic data request of the component example through an interactive process between a terminal device and a server. Specifically, fig. 5 is a schematic flowchart of a dynamic data request provided in an embodiment of the present application, and as shown in fig. 5, a process of a terminal device interacting with a server to implement a dynamic data request includes:
s501, the terminal device judges whether dynamic data needs to be loaded or not through the component calling page 1013.
S502, the user operates on the component call page 1013.
S503, sending the dynamic data request to the call forwarding module 1024 of the server by using the identifier of the component instance as HTTP data through the component call page 1013.
S504, the call forwarding module 1024 requests the component instance management module 1023 for the port of the component instance according to the identifier of the component instance.
S505, the call forwarding module 1024 requests the dynamic data from the component instance through the corresponding client according to the component instance port.
S506, the forwarding module 1024 is called to return the acquired dynamic data to the terminal equipment.
And S507, the terminal equipment displays the dynamic data through the component calling page 1013.
It should be noted that, the specific implementation method of each step is referred to the specific implementation example, and is not described herein again.
According to the embodiment, the target port of the component instance can be acquired through the identifier of the component instance and the requested data type, the requested data can be acquired through the port, the requested data can be dynamically acquired through the identifier of the component instance, and meanwhile, the component instances can be independently accessed during calling and running without mutual influence.
Fig. 6 is a schematic flowchart of another component invoking method according to an embodiment of the present application, and as shown in fig. 6, the allocating an instance installation directory to a component instance in S303 includes:
s601, obtaining an installation catalog of the target assembly.
The installation directory of the target component may be preset by the user, for example, the installation directory of the target component may be "C:/Object".
S602, splicing the identifier of the component instance and the installation catalog of the target component to obtain the instance installation catalog of the component instance.
The identifier of the component instance is the identifier of the component instance generated in the step S302, for example, the identifier of the component instance may be "C650 e329-aeca-4a14-823f-aa1C2075C5f 8", and the identifier of the component instance is spliced with the obtained component installation directory to obtain the installation directory of the component instance, so that the obtained installation directory of the component instance is "C:/Object/C650 e329-aeca-4a14-823f-aa1C2075C5f 8".
In this embodiment, by generating the component instance installation catalog, each component may be installed in any catalog without being limited by the fixed server catalog, and multiple component instances of the same type may be independent of each other and may not affect each other after being installed.
Optionally, after the step S304 of installing the installation package of the target component to the instance installation directory of the component instance, and running the component instance, the method further includes:
optionally, the identifier of the component instance and the service type of the component instance are obtained.
Optionally, the identifier of the component instance may be the identifier of the component instance generated in step S302, for example, the identifier of the component instance may be "c 650e329-aeca-4a14-823f-aa1c2075c5f 8", where the obtained component instance may include a service type of the component instance, and the service type of the component instance may include an HTTP service (hypertext transfer protocol), an RPC service (remote procedure call, computer communication protocol), and the like.
Optionally, a target port is allocated to the component instance, a mapping relationship between the identifier of the component instance and the target port is established, and the mapping relationship between the identifier of the component instance and the target port is added to the mapping relationship table between the identifier of the component instance and the port.
Illustratively, if the component instance is of the HTTP service type, the component installation module 1022 assigns an HTTP service port to the component instance, and if the component instance is of the RPC service type, the component installation module 1022 assigns an RPC service port to the component instance.
Optionally, the port range indicated by the terminal device may be set according to actual requirements and network security settings, for example, it may be set to 2000-.
In this embodiment, a corresponding target port is allocated to the component instance, so that a mapping relationship exists between the identifier of the component instance and the port of the component instance, and a function of performing communication through the port can be realized.
In order to better understand the technical solution of the present application, the following describes the above component example generation process completely through an interaction process between the terminal device and the server. Specifically, fig. 7 is a schematic flowchart of a process for generating a component instance provided in an embodiment of the present application, and as shown in fig. 7, the process for generating the component instance by interacting between a terminal device and a server includes:
s701, the user drags a target component from a component warehouse page 1011 in the terminal device to the flowchart editing area.
S702, the terminal device uses the identifier of the installation package corresponding to the target component as a component instance installation request, and sends an installation instruction to the component installation module 1022 in the server.
S703, the component installation module 1022 requests the component installation package from the component repository according to the identifier of the component installation package.
S704, the component installation module 1022 generates a component instance identifier for the component instance corresponding to the target component.
S705, the component installation module 1022 generates an instance installation catalog of the component instance according to the component instance identifier and the preset component installation catalog.
S706, the component installation module 1022 installs the obtained component installation package to the instance installation catalog of the component instance.
S707, the component installation module 1022 allocates a target port for the component instance.
S708, the component installation module 1022 saves the component instance identification, the installation directory of the component instance, and the target port to the component instance management module 1023.
The specific implementation process of the above steps has been explained in detail in the foregoing embodiments, and reference may be made to the foregoing specific embodiments, which are not described herein again.
Optionally, the method further includes:
optionally, a first component instance migration request sent by the terminal device is received, where the first component instance migration request is used to migrate the installation directory of the target component, and the first component instance migration request includes an identifier of the target component and a post-migration directory of the target component.
Specifically, a user may migrate or change an installation directory of a target component in a terminal device, and meanwhile, the terminal device may inquire whether the user needs to migrate an existing component instance in the installation directory of the target component before migration to an installation directory of a target component after migration, after the user confirms whether migration is required, the terminal device sends an identifier of the target component, the after-migration directory of the target component, and information about whether migration is required as a first component instance migration request to a server through an HTTP service, and the server receives the first component instance migration request sent by the terminal device.
Optionally, it is determined whether to migrate the target component and the installation directories of the component instances belonging to the target component according to the first component instance migration request.
Optionally, the server may determine, according to the received first component instance migration request, the target component and the installation directories of the component instances belonging to the target component according to the identifier of the target component, specifically, for example, the component instance management module 1023 may traverse the installation directories of all the component instances, determine the installation directories of the component instances belonging to the target component according to the identifier of the target component, and determine the result of migration or non-migration according to the information about whether to migrate.
Optionally, if it is determined that the component instances need to be migrated, the migration processing is performed on the target component and the files in the installation directories of the component instances belonging to the target component, for example, the component instance management module 1023 in the server may migrate the files in the installation directories of the component instances to the installation directory of the migrated target component in a copying or cutting manner.
Optionally, after the migration processing is completed, the server further needs to update the installation directories of the component instances in the component instance management module 1023, and replace the component installation directory before the migration with the component installation directory after the migration, so that the component installation directory after the migration can be accessed when the component is called later.
Optionally, if it is determined that the migration is not required, the component installation directory before the migration may be directly replaced with the component installation directory after the migration.
The foregoing embodiment illustrates an installation directory process of a migration target component, and in order to better understand the technical solution of the present application, the following fully describes the installation directory process of the migration target component through an interaction process between a terminal device and a server. Specifically, fig. 8 is a schematic flowchart of a process of migrating an installation directory of a target component provided in the embodiment of the present application, and as shown in fig. 8, the process of interactively implementing migration by a terminal device and a server includes:
s801, migrating the installation catalog of the target component in the terminal equipment by the user.
S802, the terminal equipment inquires whether the user migrates the existing component instance belonging to the target component to the installation catalog of the migrated target component.
And S803, the terminal equipment sends the identification of the target component, the post-migration directory of the target component and the information of whether the target component is migrated or not to a server as a first component instance migration request.
S804, the server judges whether to migrate.
S805, if the component is migrated, the server traverses all the existing installation directories of the component instances through the component instance management module 1023, determines each component instance file belonging to the target component, and migrates to the installation directory of the migrated target component.
S806, the installation directory of the component instance in the component instance management module 1023 is updated.
And S807, storing the migrated component installation catalog.
The specific implementation process of the above steps has been explained in detail in the foregoing embodiments, and reference may be made to the foregoing specific embodiments, which are not described herein again.
Optionally, the method further includes:
optionally, a second component instance migration request sent by the terminal device is received, where the second component instance migration request is used to migrate an installation directory of the component instance, and the second component instance migration request includes an identifier of the component instance and a directory after component instance migration.
Specifically, a user may indicate a new installation directory in the terminal device and select one or more installation directories of the component instances for migration, the terminal device may send an identifier of the component instance to be migrated and the migrated directory as a second component instance migration request to the server, and the server receives the component instance identifier and the migrated directory sent by the terminal device.
Optionally, the installation directory of the component instance is changed into a post-migration directory of the component instance according to the second component instance migration request.
Specifically, after the server receives the second component migration request including the component instance identifier and the post-migration directory of the component instance, the server may traverse all the installation directories of the component instances through the component instance management module 1023 according to the component instance identifier, and migrate files in the installation directories of the traversed component instances to the post-migration installation directories, respectively, and meanwhile, update the installation directories of the post-migration component instances in the component instance management module 1023.
The foregoing embodiment describes a process of migrating an installation directory of a component instance, and in order to better understand the technical solution of the present application, the following describes a complete description of the installation directory of the component instance migration through an interaction process between a terminal device and a server. Specifically, fig. 9 is a schematic flowchart of a process of migrating an installation directory of an instance of a component provided in the embodiment of the present application, and as shown in fig. 9, the process of interactively implementing migration by a terminal device and a server includes:
s901, a user selects one or more installation directories of component instances for migration in the terminal equipment.
S902, the terminal device sends the identification of the component instance needing to be migrated and the post-migration directory of the component instance to a server.
S903, the server traverses all installation directories of the component instances needing to be migrated through the component instance management module 1023, and migrates files in the installation directories to the installation directories after migration.
S904, the installation directory of the component instance in the component instance management module 1023 is updated.
The specific implementation process of the above steps has been explained in detail in the foregoing embodiments, and reference may be made to the foregoing specific embodiments, which are not described herein again.
In this embodiment, the component instance is migrated or changed through the component instance identifier, and the component instances installed in different storage locations may be migrated at any time, so that dynamic capacity expansion and data migration are implemented.
Optionally, the method further includes:
optionally, a component instance deletion request sent by the terminal device is received, where the component instance deletion request includes an identifier of the component instance.
Specifically, a user may select one or more component instances in the terminal device to be deleted, and the terminal device sends an identifier of the component instance to be deleted as a deletion request to the server.
Optionally, according to the component instance deletion request, the component instance is stopped from running, and the file in the installation directory of the component instance is deleted.
Specifically, the server receives a deletion request of a component instance, traverses all installation directories of the component instance to be deleted through the component instance management module 1023 according to an identifier of the component instance in the deletion request, and deletes files in the installation directories of the traversed component instance respectively, and deletes all configuration information of the corresponding component instance in the component instance management module 1023.
The above embodiment illustrates an example process of deleting a component, and in order to better understand the technical solution of the present application, the following describes the above deletion process completely through an interaction process between a terminal device and a server. Specifically, fig. 10 is a schematic flowchart of a process for deleting an assembly example provided in the embodiment of the present application, and as shown in fig. 10, the process for interactively implementing deletion of an assembly by a terminal device and a server includes:
s101, a user selects one or more installation directories of component instances at the terminal equipment to delete. S102, the terminal device sends the identification of the component instance needing to be deleted as a deletion request to a server.
S103, the server traverses all installation directories of the component instances needing to be deleted through the component instance management module 1023.
S104, deleting the installation directory of the traversed component instance, and deleting all configuration information of the component instance in the component instance management module 1023.
The specific implementation process of the above steps has been explained in detail in the foregoing embodiments, and reference may be made to the foregoing specific embodiments, which are not described herein again.
In the embodiment, the function of completely uninstalling the component can be realized by deleting the component instance installation directory through the identifier of the component instance, so that the uninstalling efficiency is improved.
Fig. 11 is a schematic diagram of a device for invoking a component according to an embodiment of the present application, where as shown in fig. 11, the device includes:
a receiving module 111, configured to receive a component instance installation request sent by a terminal device, where the component instance installation request includes: the identifier of the component installation package of the target component triggered by the user;
a generating module 112, configured to generate, according to the component instance installation request, a component instance of the target component and an identifier of the component instance, where the component instance corresponds to the terminal device;
the distribution module 113 is configured to distribute an instance installation directory to the component instance, and obtain an installation package of the target component according to the identifier of the component installation package;
an installation module 114, configured to install the installation package of the target component into the instance installation directory of the component instance, run the component instance, and send the identifier of the component instance to the terminal device;
the receiving model 111 is specifically configured to receive a component instance service request sent by a terminal device, where the component instance service request includes: an identification of the component instance and a data type of the request;
a determining module 115, configured to determine, according to the data type, an acquisition source type of the data, where the acquisition source type includes: instance installation directory type or port type;
a determining module 115, configured to determine, according to the identifier of the component instance, a target acquisition source in the acquisition source type, and read target data of the request through the target acquisition source;
a sending module 116, configured to send the target data to the terminal device.
Optionally, the determining module 115 is specifically configured to:
if the acquisition source type is the instance installation directory type, comparing the identifier of the component instance with each instance installation directory established currently respectively, and taking the instance installation directory containing the identifier of the component instance as the target acquisition source;
reading the target data from the target acquisition source.
Optionally, the determining module 115 is specifically configured to:
if the acquisition source type is the port type, inquiring a target port corresponding to the identifier of the component instance in a mapping relation table of the identifier of the currently established component instance and the port, and taking the target port as the target acquisition source;
reading the target data from the running component instance through the port.
Optionally, the determining module 115 is specifically configured to:
if the data type is static data, determining that the acquisition source type is the instance installation directory type;
and if the data type is dynamic data, determining that the acquisition source type is the port type.
Optionally, the allocating module 113 is specifically configured to:
acquiring an installation catalog of the target component;
and splicing the identifier of the component example and the installation catalog of the target component to obtain the example installation catalog of the component example.
Optionally, the installation module 114 is specifically configured to:
acquiring the identifier of the component instance and the service type of the component instance;
allocating a target port for the component instance, establishing a mapping relation between the identifier of the component instance and the target port, and adding the mapping relation between the identifier of the component instance and the target port into a mapping relation table between the identifier of the component instance and the port.
Optionally, the receiving module 111 is further configured to:
receiving a first component instance migration request sent by a terminal device, wherein the first component instance migration request is used for migrating the installation directory of the target component, and the first component instance migration request comprises: the identification of the target component and the post-migration directory of the target component;
determining whether to migrate the target component and files under the installation directories of the component instances belonging to the target component according to the first component instance migration request;
and if so, carrying out migration processing on the target component and the files under the installation directories of the component instances belonging to the target component.
Optionally, the receiving module 111 is further configured to:
receiving a second component instance migration request sent by a terminal device, wherein the second component instance service request is used for migrating an installation directory of the component instance, and the second component instance migration request comprises: an identification of the component instance and a post-migration directory of the component instance;
and changing the installation directory of the component instance into a post-migration directory of the component instance according to the second component instance migration request.
Optionally, the receiving module 111 is further configured to:
receiving a component instance deleting request sent by terminal equipment, wherein the component instance deleting request comprises: an identification of the component instance;
and stopping running the component instance according to the component instance deleting request, and deleting the file in the installation directory of the component instance.
Fig. 12 is a block diagram of a structure of an electronic device 120 according to an embodiment of the present disclosure, where the electronic device may be, for example, a server according to the foregoing embodiment, or may also be a terminal device according to the foregoing embodiment. As shown in fig. 12, the electronic device may include: a processor 121, and a memory 122.
Optionally, a bus 123 may be further included, wherein the memory 122 is configured to store machine-readable instructions executable by the processor 121, and when the electronic device 120 operates, the processor 121 and the memory 122 communicate with each other through the bus 123. When the electronic device 120 is the aforementioned server, the machine readable instructions, when executed by the processor 121, perform the method steps performed by the server in the above method embodiments. When the electronic device 120 is the aforementioned terminal device, the machine readable instructions, when executed by the processor 121, perform the method steps performed by the terminal device in the above method embodiments.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the method steps in the above method embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (10)

1. A calling method of a component, which is applied to a server, comprises the following steps:
receiving a component instance installation request sent by a terminal device, wherein the component instance installation request comprises: the identifier of the component installation package of the target component triggered by the user;
generating a component instance of the target component and an identifier of the component instance corresponding to the terminal device according to the component instance installation request;
distributing an instance installation directory to the component instance, and acquiring an installation package of the target component according to the identifier of the component installation package;
installing the installation package of the target component into an instance installation directory of the component instance, running the component instance, and sending the identifier of the component instance to the terminal equipment;
receiving a component instance service request sent by a terminal device, wherein the component instance service request comprises: an identification of the component instance and a data type of the request;
determining an acquisition source type of the data according to the data type, wherein the acquisition source type comprises: instance installation directory type or port type;
determining a target acquisition source under the acquisition source type according to the identifier of the component instance, and reading target data of the request through the target acquisition source;
and sending the target data to the terminal equipment.
2. The method for calling the component according to claim 1, wherein the determining, according to the identifier of the component instance, a target acquisition source in the acquisition source type and reading target data of the request through the target acquisition source comprises:
if the acquisition source type is the instance installation directory type, comparing the identifier of the component instance with each instance installation directory established currently, and taking the instance installation directory containing the identifier of the component instance as the target acquisition source;
reading the target data from the target acquisition source.
3. The method for calling a component according to claim 1, wherein the determining a target acquisition source in the acquisition source type according to the identifier of the component instance and reading the requested target data through the target acquisition source comprises:
if the acquisition source type is the port type, inquiring a target port corresponding to the identifier of the component instance in a mapping relation table of the identifier of the currently established component instance and the port, and taking the target port as the target acquisition source;
reading the target data from the running component instance through the port.
4. The method for calling the component according to claim 1, wherein the determining the type of the data acquisition source according to the data type comprises:
if the data type is static data, determining that the acquisition source type is the instance installation directory type;
and if the data type is dynamic data, determining that the acquisition source type is the port type.
5. The method for invoking component according to any one of claims 1 to 4, wherein said assigning an instance installation directory to said component instance comprises:
acquiring an installation catalog of the target component;
and splicing the identifier of the component example and the installation catalog of the target component to obtain the example installation catalog of the component example.
6. The method for invoking the component according to any one of claims 1 to 4, wherein after installing the installation package of the target component into the instance installation directory of the component instance and running the component instance, further comprising:
acquiring the identifier of the component instance and the service type of the component instance;
allocating a target port for the component instance, establishing a mapping relation between the identifier of the component instance and the target port, and adding the mapping relation between the identifier of the component instance and the target port into a mapping relation table of the identifier of the component instance and the port.
7. The method for invoking a component according to any one of claims 1-4, wherein said method further comprises:
receiving a first component instance migration request sent by a terminal device, wherein the first component instance migration request is used for migrating the installation directory of the target component, and the first component instance migration request comprises: the identification of the target component and the post-migration directory of the target component;
determining whether to migrate the target component and files under the installation directories of the component instances belonging to the target component according to the first component instance migration request;
and if so, carrying out migration processing on the target component and the files under the installation directories of the component instances belonging to the target component.
8. The method for invoking a component according to any one of claims 1-4, wherein said method further comprises:
receiving a second component instance migration request sent by a terminal device, where the migration request of the second component instance is used for migrating an installation directory of the component instance, and the second component instance migration request includes: an identification of the component instance and a post-migration directory of the component instance;
and changing the installation directory of the component instance into a post-migration directory of the component instance according to the second component instance migration request.
9. The method for invoking a component according to any one of claims 1-4, wherein said method further comprises:
receiving a component instance deleting request sent by terminal equipment, wherein the component instance deleting request comprises: an identification of the component instance;
and according to the component instance deleting request, stopping running the component instance, and deleting the files in the installation directory of the component instance.
10. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor implements the steps of the method for invoking the component according to any one of claims 1-9 when executing the computer program.
CN202210860025.3A 2022-07-22 2022-07-22 Component calling method and electronic equipment Active CN114936031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210860025.3A CN114936031B (en) 2022-07-22 2022-07-22 Component calling method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210860025.3A CN114936031B (en) 2022-07-22 2022-07-22 Component calling method and electronic equipment

Publications (2)

Publication Number Publication Date
CN114936031A true CN114936031A (en) 2022-08-23
CN114936031B CN114936031B (en) 2022-11-11

Family

ID=82867921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210860025.3A Active CN114936031B (en) 2022-07-22 2022-07-22 Component calling method and electronic equipment

Country Status (1)

Country Link
CN (1) CN114936031B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1025493A1 (en) * 1998-08-17 2000-08-09 Microsoft Corporation Queued method invocations on distributed component applications
US20020188941A1 (en) * 2001-06-12 2002-12-12 International Business Machines Corporation Efficient installation of software packages
US20030084138A1 (en) * 2001-10-24 2003-05-01 Groove Networks, Inc. Method and apparatus for managing software component downloads and updates
US20060080336A1 (en) * 2004-04-02 2006-04-13 Tsinghua University Encapsulation and unified access scheme for components
CN102804132A (en) * 2009-06-15 2012-11-28 微软公司 Catalog-based software component management
US9053236B1 (en) * 2013-12-23 2015-06-09 Emc Corporation Automated directory services test setup utility
CN107291458A (en) * 2017-06-06 2017-10-24 北京知道创宇信息技术有限公司 A kind of plug-in unit construction method, system and the server of Web applications
CN108920157A (en) * 2018-06-13 2018-11-30 平安科技(深圳)有限公司 Installation method, device, computer equipment and the storage medium of Nginx software
CN108932309A (en) * 2018-06-15 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Platform database management method, device, computer equipment and storage medium
CN109597627A (en) * 2017-09-30 2019-04-09 北京国双科技有限公司 A kind of component mounting method, device, storage medium and processor
CN109614165A (en) * 2018-12-04 2019-04-12 山东财经大学 A kind of parallel operation method of the multi version of com component and device
CN111736539A (en) * 2020-02-21 2020-10-02 北京沃东天骏信息技术有限公司 Monitoring data display method, device, system, server and storage medium
CN112667223A (en) * 2021-01-05 2021-04-16 北京城市网邻信息技术有限公司 Method and device for generating component configuration table, electronic equipment and storage medium
CN113396393A (en) * 2019-01-15 2021-09-14 微软技术许可有限责任公司 Dynamic auto-configuration of multi-tenant PAAS components
CN113434158A (en) * 2021-07-08 2021-09-24 恒安嘉新(北京)科技股份公司 User-defined management method, device, equipment and medium for big data component
CN113504917A (en) * 2021-07-29 2021-10-15 青岛以萨数据技术有限公司 Method and medium for integrating big data components by Ambari big data platform
CN114090083A (en) * 2020-07-31 2022-02-25 中移(苏州)软件技术有限公司 Visual component configuration method, device, equipment and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1025493A1 (en) * 1998-08-17 2000-08-09 Microsoft Corporation Queued method invocations on distributed component applications
US20020188941A1 (en) * 2001-06-12 2002-12-12 International Business Machines Corporation Efficient installation of software packages
US20030084138A1 (en) * 2001-10-24 2003-05-01 Groove Networks, Inc. Method and apparatus for managing software component downloads and updates
US20060080336A1 (en) * 2004-04-02 2006-04-13 Tsinghua University Encapsulation and unified access scheme for components
CN102804132A (en) * 2009-06-15 2012-11-28 微软公司 Catalog-based software component management
US9053236B1 (en) * 2013-12-23 2015-06-09 Emc Corporation Automated directory services test setup utility
CN107291458A (en) * 2017-06-06 2017-10-24 北京知道创宇信息技术有限公司 A kind of plug-in unit construction method, system and the server of Web applications
CN109597627A (en) * 2017-09-30 2019-04-09 北京国双科技有限公司 A kind of component mounting method, device, storage medium and processor
CN108920157A (en) * 2018-06-13 2018-11-30 平安科技(深圳)有限公司 Installation method, device, computer equipment and the storage medium of Nginx software
CN108932309A (en) * 2018-06-15 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Platform database management method, device, computer equipment and storage medium
CN109614165A (en) * 2018-12-04 2019-04-12 山东财经大学 A kind of parallel operation method of the multi version of com component and device
CN113396393A (en) * 2019-01-15 2021-09-14 微软技术许可有限责任公司 Dynamic auto-configuration of multi-tenant PAAS components
CN111736539A (en) * 2020-02-21 2020-10-02 北京沃东天骏信息技术有限公司 Monitoring data display method, device, system, server and storage medium
CN114090083A (en) * 2020-07-31 2022-02-25 中移(苏州)软件技术有限公司 Visual component configuration method, device, equipment and storage medium
CN112667223A (en) * 2021-01-05 2021-04-16 北京城市网邻信息技术有限公司 Method and device for generating component configuration table, electronic equipment and storage medium
CN113434158A (en) * 2021-07-08 2021-09-24 恒安嘉新(北京)科技股份公司 User-defined management method, device, equipment and medium for big data component
CN113504917A (en) * 2021-07-29 2021-10-15 青岛以萨数据技术有限公司 Method and medium for integrating big data components by Ambari big data platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WOOJOONG LEE等: "An Agent Framework for CE Devices to Support Storage Virtualization on Device Ensembles", 《2009 6TH IEEE CONSUMER COMMUNICATIONS AND NETWORKING CONFERENCE》 *
薛永刚: "利用Jaguar CTS实现多种分布式组件及其互操作", 《计算机与现代化》 *

Also Published As

Publication number Publication date
CN114936031B (en) 2022-11-11

Similar Documents

Publication Publication Date Title
EP3408745B1 (en) Automatically updating a hybrid application
CN108268609B (en) File path establishing and accessing method and device
CN104426925A (en) Webpage resource obtaining method and apparatus
CN109656889B (en) File system implementation method, device, equipment and storage medium based on block chain
CN109144619B (en) Icon font information processing method, device and system
CN106817388B (en) Method and device for acquiring data by virtual machine and host machine and system for accessing data
CN111061432B (en) Service migration method, device, equipment and readable storage medium
CN110688174A (en) Container starting method, storage medium and electronic device
CN111787126A (en) Container creation method, server, and storage medium
CN108470054A (en) A kind of data access method and system
US11271895B1 (en) Implementing advanced networking capabilities using helm charts
CN110909273B (en) Page generation method and related system
CN114936031B (en) Component calling method and electronic equipment
US20210133261A1 (en) Using web application components with different web application frameworks in a web application
CN110941471A (en) Method and device for internationalizing basic data of software system
CN107977277B (en) Method and device for integrating third-party system in ERP system and computer equipment
CN112887440A (en) IP address management method and device
CN111753226A (en) Page loading method and device
CN115562871A (en) Memory allocation management method and device
CN113656041A (en) Data processing method, device, equipment and storage medium
CN114254232A (en) Cloud product page generation method and device, computer equipment and storage medium
CN113535188A (en) Privatization deployment method and device
CN114090083A (en) Visual component configuration method, device, equipment and storage medium
US10642629B2 (en) Web-application-launch application programming interfaces
CN114356231B (en) Data processing method, device and computer storage medium

Legal Events

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