CN112148342A - Component configuration method and device, electronic equipment and storage medium - Google Patents

Component configuration method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112148342A
CN112148342A CN201910566076.3A CN201910566076A CN112148342A CN 112148342 A CN112148342 A CN 112148342A CN 201910566076 A CN201910566076 A CN 201910566076A CN 112148342 A CN112148342 A CN 112148342A
Authority
CN
China
Prior art keywords
target
configuration
component
item
environment information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910566076.3A
Other languages
Chinese (zh)
Inventor
张剑波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910566076.3A priority Critical patent/CN112148342A/en
Publication of CN112148342A publication Critical patent/CN112148342A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure relates to a component configuration method, comprising: introducing an interface of a configuration platform into an entry file of a target project; acquiring a target identifier and target environment information of a target project accessing a configuration platform according to an interface; inquiring a target component associated with the target identifier and the target environment information according to the pre-stored association relationship between the identifier of the item and the environment information and the component; and loading the target component into the target item. According to the embodiment of the disclosure, when the configuration of the target component in the target project needs to be adjusted, the configuration of the target component only needs to be adjusted in the configuration platform, and the code in the project does not need to be modified, so that the project does not need to be offline and online, the cost for adjusting the configuration of the component is reduced, the operation complexity for adjusting the configuration of the component is reduced, and the efficiency for adjusting the configuration of the component is improved.

Description

Component configuration method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of software technologies, and in particular, to a component configuration method, a component configuration apparatus, an electronic device, and a storage medium.
Background
In the related art, multiple components are often required to be loaded in a project, and the same component can be referred to by multiple projects as a general component, but when different projects are loaded, the same component needs to be adjusted according to the needs of the projects.
At present, for the adjustment mode of components in a project, the project needs to be offline, then a user manually modifies the codes of the components in the project loaded with the components, and after the codes are modified, the project is online. And the code of the component in the project is modified, the address of the component is fixed, and the parameter of the component is also fixed, however, in the environments of development, test and the like of the project, the parameters of the required component are often different, so that when the project is in different environments, the project needs to be offline first, then the code of the component in the project needs to be modified, and then the component in the project after being online can adapt to the environment needs.
In the above process of modifying the code of the component, frequent on-line and off-line items are required, which results in higher cost of modifying the component and complex operation, thus making the efficiency lower.
Disclosure of Invention
The present disclosure provides a component configuring method, a component configuring apparatus, an electronic device, and a storage medium to solve at least a problem that ambient light information determined in the related art does not include information of a color, an irradiation direction, and the like of ambient light. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a component configuration method is provided, which is suitable for a configuration platform, and the method includes:
introducing an interface of the configuration platform into an entry file of the target project;
acquiring a target identifier and target environment information of the target project accessing the configuration platform according to the interface;
inquiring a target component associated with the target identifier and the target environment information according to the pre-stored item identifier and the association relationship between the environment information and the component;
loading the target component into the target item.
Optionally, the interface of the configuration platform is configured to indicate that the target item carries a target identifier and/or target environment information of the target item when accessing the configuration platform.
Optionally, the interface of the configuration platform is configured to indicate that the target item carries a target identifier of the target item when accessing the configuration platform, and the obtaining the target identifier and the target environment information of the target item accessing the configuration platform according to the interface includes:
acquiring a target identifier of the target project accessing the configuration platform according to the interface;
and when the target item is accessed, acquiring the target environment information of the target item according to the environment domain name of the target item.
Optionally, before introducing the interface of the configuration platform into the entry file of the target item, the method further includes:
configuring the environmental information of the project according to the received first configuration instruction;
according to the received second configuration instruction, configuring components required by the project under the environment corresponding to the environment information;
and establishing and storing the identification and the environment information of the item and the incidence relation of the components required by the item under the environment corresponding to the environment information.
Optionally, before introducing the interface of the configuration platform into the entry file of the target item, the method further includes:
adjusting the available state of the target component according to the received adjustment instruction;
the querying of the target component associated with the target identifier and the target environment information according to the pre-stored association relationship between the identifier of the item and the environment information and the component includes:
and inquiring available target components in the target components related to the target identification and the target environment information according to the pre-stored association relationship between the identification of the item and the environment information and the components.
According to a second aspect of the embodiments of the present disclosure, a component configuration apparatus is provided, which is adapted to configure a platform, and the method includes:
an interface importing module configured to perform importing an interface of the configuration platform in an entry file of the target project;
the project acquisition module is configured to execute acquisition of target identification and target environment information of the target project accessing the configuration platform according to the interface;
the association query module is configured to execute query of a target component associated with the target identifier and the target environment information according to the pre-stored association relationship between the identifier of the item and the environment information and the component;
a component loading module configured to perform loading of the target component into the target item.
Optionally, the interface of the configuration platform is configured to indicate that the target item carries a target identifier and/or target environment information of the target item when accessing the configuration platform.
Optionally, the interface of the configuration platform is configured to indicate that the target item carries a target identifier of the target item when accessing the configuration platform, and the item obtaining module includes:
an identification acquisition submodule configured to perform acquisition of a target identification of the target item accessing the configuration platform according to the interface;
and the environment acquisition sub-module is configured to acquire the target environment information of the target item according to the environment domain name of the target item when the target item is accessed.
Optionally, the apparatus further comprises:
the environment configuration module is configured to execute the configuration of the environment information of the project according to the received first configuration instruction;
the component configuration module is configured to execute components required by the configuration project under the environment corresponding to the environment information according to the received second configuration instruction;
and the establishing and storing module is configured to establish and store the identification of the item and the environment information and the association relation of the components required by the item under the environment corresponding to the environment information.
Optionally, the apparatus further comprises:
a state adjustment module configured to perform adjusting the available state of the target component according to the received adjustment instruction;
the association query module is configured to execute, and query available target components in target components associated with the target identifiers and the target environment information according to pre-stored item identifiers and association relations between the environment information and the components.
According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the component configuration method according to any of the embodiments described above.
According to a fourth aspect of the embodiments of the present disclosure, a storage medium is proposed, in which instructions are executed by a processor of an electronic device, so that the electronic device can execute the component configuration method according to any one of the embodiments.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product configured to perform the component configuration method of any of the above embodiments.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the embodiment of the disclosure, since the association relationship between the item identification and the environment information and the component is established and stored in advance, the target component queried according to the association relationship is also configured and stored in advance in the configuration platform.
In this case, when the configuration of the target component in the target project needs to be adjusted, the configuration of the target component only needs to be adjusted in the configuration platform. And because the interface of the configuration platform in the entry file of the target project is not changed, the target project still accesses the configuration platform through the interface of the configuration platform during running, and then the configuration platform can inquire the target component after the configuration is adjusted according to the target identifier and the target environment information of the target project, so that the target component after the configuration is adjusted can be loaded into the target project.
In the process, codes in the project do not need to be modified, so that the project does not need to be offline and online, the cost of adjusting the component configuration is reduced, the operation complexity of adjusting the component configuration is reduced, and the efficiency of adjusting the component configuration is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a schematic flow chart diagram illustrating a component configuration method in accordance with an embodiment of the present disclosure.
Fig. 2 is a schematic diagram illustrating a configuration platform according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram illustrating another configuration platform according to an embodiment of the present disclosure.
Fig. 4 is a schematic flow chart diagram illustrating another component configuration method in accordance with an embodiment of the present disclosure.
Fig. 5 is a schematic flow chart diagram illustrating yet another component configuration method in accordance with an embodiment of the present disclosure.
Fig. 6 is a schematic flow chart diagram illustrating yet another component configuration method in accordance with an embodiment of the present disclosure.
Fig. 7 is a schematic diagram illustrating yet another configuration platform according to an embodiment of the present disclosure.
Fig. 8 is a hardware configuration diagram of a device in which a component configuring apparatus according to an embodiment of the present disclosure is shown.
Fig. 9 is a schematic block diagram illustrating a component configuration apparatus in accordance with an embodiment of the present disclosure.
Fig. 10 is a schematic block diagram illustrating an object acquisition module in accordance with an embodiment of the present disclosure.
Fig. 11 is a schematic block diagram illustrating another component configuration apparatus in accordance with an embodiment of the present disclosure.
Fig. 12 is a schematic block diagram illustrating yet another component configuration apparatus in accordance with an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic flow chart diagram illustrating a component configuration method in accordance with an embodiment of the present disclosure. The component configuration method shown in this embodiment may be applicable to a configuration platform, the configuration platform may operate on a server, or may operate on a terminal such as a mobile phone, a tablet computer, a wearable device, or the like, and specifically, a device where the configuration platform operates may be set as needed.
In one embodiment, the configuration platform may be developed using node.js, and other environments may be selected to be developed as needed; the front end of the configuration platform can use vue frames, and other frames are also selected according to requirements; the configuration platform can use MySQL database to store data, and can select other databases to store data according to requirements.
As shown in fig. 1, the component configuration method may include the steps of:
in step S1, introducing an interface of the configuration platform in the entry file of the target item;
html, in one embodiment, the interface of the configuration platform may be introduced in a portal file (e.g., index. html) of the target item, where the interface of the configuration platform may be introduced in a script tag of the portal file. The target item can access the configuration platform through the interface of the configuration platform, and can indicate, through the interface, that the target item carries its own information when accessing the configuration platform, for example, can indicate, through the interface, that the target item carries a target identifier when accessing the configuration platform.
For example, the interfaces are: https:// umd-config.com/api/umd? productName ═ xxx; then the script tag that introduced the interface is < script src ═ https:// umd-config.com/api/umd? The method includes the steps that a product name is xxx ', and a field is xxx', wherein the product name can be used for indicating that a target item carries a target identifier when accessing a configuration platform.
It should be noted that, an interface of the configuration platform is introduced into the entry file of the target item, and the operation may be performed on the configuration platform by a user, and then the configuration platform adjusts the entry file of the target item through a code writing program, or the user may directly perform the operation on the entry file of the target item.
In step S2, acquiring a target identifier of a target item accessing the configuration platform, and acquiring target environment information of the target item;
in one embodiment, the item may be a system, or may be a product such as an application program having some functions, and a component may be loaded therein, so that the item may implement the function corresponding to the component. The identification of the item may be the name, code, etc. of the item. The environment information of the project may represent the environment in which the project is located, such as a local environment, an online environment, a development environment, a testing environment, and so forth.
In an embodiment, the target identifier and the target environment information may be carried by the target item when accessing the configuration platform, and further, when the target item accesses the configuration platform, the configuration platform may obtain the target identifier and the target environment information carried by the target item.
The target identifier and the target environment information may be carried by the target item when accessing the configuration platform, or may be acquired by the configuration platform in other manners, for example, an environment domain name of the target item may be acquired by accessing the target item, and the target environment information of the target item is determined according to the environment domain name.
In step S3, according to the pre-established association relationship between the identifier of the item and the environment information and the component, querying a target component associated with the target identifier and the target environment information;
in one embodiment, before obtaining the target environment information of the target item, the component may be stored in the configuration platform in advance, for example, a name of the component and an address of the component may be stored, and the address may be represented by a Uniform Resource Locator (URL).
In one embodiment, before obtaining the target identifier of the target item accessing the configuration platform and obtaining the target environment information of the target item, an association relationship between the identifier of the item and the environment information and components required by the item under the environment information may be established and stored.
The components may be configured according to the requirement of the target item in the target environment information, for example, the addresses and parameters of the components may be configured, then the configured components are used as the target components required by the target item in the target environment information, and the target identifier of the target item and the association relationship between the target environment information and the target components may be established and stored.
The components in this embodiment may be general components, which may be applicable to one or more items.
In step S4, the target component is loaded into the target item.
According to the embodiment of the disclosure, since the association relationship between the item identification and the environment information and the component is established and stored in advance, the target component queried according to the association relationship is also configured and stored in advance in the configuration platform.
In this case, when the configuration of the target component in the target project needs to be adjusted, the configuration of the target component only needs to be adjusted in the configuration platform. And because the interface of the configuration platform in the entry file of the target project is not changed, the target project still accesses the configuration platform through the interface of the configuration platform during running, and then the configuration platform can inquire the target component after the configuration is adjusted according to the target identifier and the target environment information of the target project, so that the target component after the configuration is adjusted can be loaded into the target project.
In the process, codes in the project do not need to be modified, so that the project does not need to be offline and online, the cost of adjusting the component configuration is reduced, the operation complexity of adjusting the component configuration is reduced, and the efficiency of adjusting the component configuration is improved.
For example, in the local environment of the project "user analysis", the component "feedback" and the component "buried point module" need to be configured, and the address of the component "feedback" is:
https://data.corp.xx.com/web/feedback/platform-feedback-form.umd.js;
the address of the component "buried point module" is:
https://umd-config.com/api/umd?productName=xxx;
wherein the value of the parameter isShowicon in the component is true.
In the related art, a code may be written in the item "user analysis" according to the above address of the component "feedback" and the parameter value true of the parameter isShowicon, for example, a script tag of a portal file of the item "user analysis" is written as:
<script src=“https://data.corp.xx.com/web/feedback/platform-feedback-form.umd.js”></script>
<script src=“https://honeyguide.corp.xx.com/platform-log.umd.js”></script>
the project "user analysis" is then brought online.
And when the parameter value of the parameter isShowicon in the component feedback is required to be adjusted to be false, the item user analysis is required to be offline, then the parameter value of the parameter isShowicon of the component feedback in the item user analysis is modified, and the item user analysis is online after the modification. The process is complex to operate, low in efficiency and high in cost.
Fig. 2 is a schematic diagram illustrating a configuration platform according to an embodiment of the present disclosure.
In one embodiment, as shown in fig. 2, the method may be performed in a configuration platform, a user may select an environment of an item, a first configuration instruction may be generated based on the operation of selecting the environment, and the configuration platform configures environment information of the item according to the first configuration instruction, for example, the environment information of the target item configured according to the first instruction is used to represent a local environment.
The user can then configure the address and the parameter of the component, a second configuration instruction can be generated based on the configuration operation, the configuration platform configures the address and the parameter of the component according to the second configuration instruction, for example, the address of the component "feedback" is configured as https:// data.
The parameters of the component can be added as needed, for example, clicking the "add parameter" button shown in FIG. 2; the parameters of the component can also be deleted according to the requirement, for example, clicking a delete button in the same box as the feedback button in FIG. 2; the component can also be edited according to the requirement, for example, clicking an "edit" button in the same box as the "feedback" button in fig. 2; the number of components may also need to be adjusted, for example, a component "buried point module" is also configured below the component "feedback", and a "add component" button on the lower right of fig. 2 may be clicked to further add other components.
After the configuration of the component is completed, the "save" button at the lower right of fig. 2 may be clicked, so as to establish and save the association relationship between the component "feedback" and the component "buried point module" configured as shown in fig. 2, the identifier of the project "user analysis", and the environment information representing the local environment.
After the component configuration is completed, the configured component may be loaded into the project "user analysis", for example, a JavaScript code is generated according to data in the configured component, the configured component parameter is assigned to the code, the code is loaded into the project "user analysis", and then the project "user analysis" is brought online.
Fig. 3 is a schematic diagram illustrating another configuration platform according to an embodiment of the present disclosure.
According to the embodiment of the present disclosure, when the parameter value of the isShowicon in the component "feedback" needs to be adjusted to be false, as shown in fig. 3, the parameter value of the isShowicon in the component "feedback" is adjusted in the configuration platform, and the future in fig. 2 is adjusted to be false, because the interface of the configuration platform in the entry file of the target item is still:
https://umd-config.com/api/umd?productName=xxx;
the interface of the configuration platform is not changed, so that the target item still accesses the configuration platform through the interface of the configuration platform during running, the configuration platform can query the target component after configuration adjustment according to the target identification and the target environment information of the target item, namely, the component after configuration adjustment, namely the feedback module and the buried point module are determined, and the two components are loaded into the target item, and the parameter value of the parameter isShowicon in the loaded component, namely the feedback module, is adjusted to be false.
In the process, the configuration of the component can be adjusted in the configuration platform, and the code in the project user analysis is not required to be modified after the project user analysis is offline, so that the operation complexity is simplified, the efficiency is improved, and the cost is reduced.
In one embodiment, other functions may also be implemented by the configuration platform, for example, a script tag may be displayed for a user to observe whether the script tag is wrong, a default environment may also be set, and the user may select whether to select the default environment.
For example, as shown in fig. 2, by clicking the "view current environment script key", specific content in the script tag with the interface introduced may be displayed, and by clicking a switch key next to the character "default environment", the default environment may be selected or the user may select the environment autonomously.
Optionally, the interface of the configuration platform is configured to indicate that the target item carries a target identifier and/or target environment information of the target item when accessing the configuration platform.
In an embodiment, through an interface of a configuration platform, it may be indicated that a target item carries a target identifier and/or target environment information of its own target item when accessing the configuration platform, so that the configuration platform acquires the target identifier and/or the target environment information.
For example, the interface of the configuration platform is https:// umd-config. com/api/umd? The production name xxx may be used to indicate that the target item carries the target identifier when accessing the configuration platform, and in addition to setting the field in the interface, other fields may also be set as needed, so that the target item carries the target environment information when accessing the configuration platform.
Fig. 4 is a schematic flow chart diagram illustrating another component configuration method in accordance with an embodiment of the present disclosure. As shown in fig. 4, the interface of the configuration platform is configured to indicate that the target item carries a target identifier of the target item when accessing the configuration platform, and the obtaining the target identifier and the target environment information of the target item accessing the configuration platform according to the interface includes:
in step S21, acquiring a target identifier of the target item accessing the configuration platform according to the interface;
in step S22, when accessing the target item, target environment information of the target item is acquired according to the environment domain name of the target item.
In an embodiment, when the interface of the configuration platform is only used to indicate that the target item carries the target identifier of the target item when accessing the configuration platform, the target environment information of the target item may be obtained according to the environment domain name of the target item when accessing the target item, for example, as shown in fig. 2, the current environment domain name may be displayed in the configuration platform as localhost, and the environment information obtained according to the environment domain name may represent a local environment.
Therefore, when the interface of the configuration platform is only used for indicating that the target item accesses the configuration platform, the target identifier of the target item is carried, and the target environment information of the target item can be acquired in other modes.
Fig. 5 is a schematic flow chart diagram illustrating yet another component configuration method in accordance with an embodiment of the present disclosure. As shown in fig. 5, before introducing the interface of the configuration platform into the entry file of the target item, the method further includes:
in step S5, configuring environmental information of the item according to the received first configuration instruction;
in step S6, according to the received second configuration instruction, configuring components required by the item in the environment corresponding to the environment information;
in step S7, an association between the item identifier and the environment information and the components required by the item in the environment corresponding to the environment information is established and stored.
In one embodiment, before obtaining the target identifier of the target item accessing the configuration platform and obtaining the target environment information of the target item, an association relationship between the identifier of the item and the environment information and components required by the item under the environment information may be established and stored.
For example, as shown in fig. 2, the method may be performed in a configuration platform, a user may select an environment of an item, a first configuration instruction may be generated based on the operation of selecting the environment, and the configuration platform configures environment information of the item according to the first configuration instruction, for example, the environment information of a target item configured according to the first instruction is used to represent a local environment.
The user can then configure the address and the parameter of the component, a second configuration instruction can be generated based on the configuration operation, the configuration platform configures the address and the parameter of the component according to the second configuration instruction, for example, the address of the component "feedback" is configured as https:// data.
After the configuration of the component is completed, the "save" button at the lower right of fig. 2 may be clicked, so as to establish and save the association relationship between the component "feedback" and the component "buried point module" configured as shown in fig. 2, the identifier of the project "user analysis", and the environment information representing the local environment.
Fig. 6 is a schematic flow chart diagram illustrating yet another component configuration method in accordance with an embodiment of the present disclosure. As shown in fig. 6, before introducing the interface of the configuration platform into the entry file of the target item, the method further includes:
in step S8, adjusting the availability status of the target component according to the received adjustment instruction;
the querying of the target component associated with the target identifier and the target environment information according to the pre-stored association relationship between the identifier of the item and the environment information and the component includes:
in step S31, according to the pre-stored item identifier and the association relationship between the environment information and the component, the available target component in the target component associated with the target identifier and the target environment information is queried.
Fig. 7 is a schematic diagram illustrating yet another configuration platform according to an embodiment of the present disclosure.
In one embodiment, in the configuration platform, a user may adjust the available state of the target component by inputting an adjustment instruction, for example, as shown in fig. 7, in the configuration platform, a switch button next to the character "available or not" may be clicked to switch the corresponding component, thereby changing the available state of the corresponding component.
For example, for the component "feedback" and the component "buried point module", the component "feedback" may be adjusted to be unavailable, so that the available target component queried by the configuration platform according to the association relationship is only the "buried point module", and the component "buried point module" may be loaded into the target project.
In the process, the component 'feedback' is not deleted, so that when the component 'feedback' needs to be loaded into the target item in the following process, the component 'feedback' can be adjusted to be available, the component 'feedback' does not need to be added and edited again, and the operation of loading the component is simplified.
The embodiment of the component configuration apparatus shown in the embodiment of the present disclosure may be applied to a terminal or a server and other devices. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the device where the software implementation is located as a logical means. From a hardware level, as shown in fig. 8, a hardware structure diagram of a device in which an apparatus is configured for a component shown in the embodiment of the present disclosure is located is shown, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 8, the device in which the apparatus is located in the embodiment may generally include other hardware, such as a forwarding chip responsible for processing a packet, and the like; the device may also be a distributed device in terms of hardware structure, and may include multiple interface cards to facilitate expansion of message processing at the hardware level.
The present disclosure also proposes embodiments of an assembly configuration device, corresponding to the embodiments of the assembly configuration method described above.
Fig. 9 is a schematic block diagram illustrating a component configuration apparatus in accordance with an embodiment of the present disclosure. The component configuration device shown in this embodiment can be applied to a configuration platform, the configuration platform can operate on a server, can also operate on a mobile phone, a tablet computer, a wearable device and other terminals, and specifically can set equipment where the configuration platform operates as required.
In one embodiment, the configuration platform may be developed using node.js, and other environments may be selected to be developed as needed; the front end of the configuration platform can use vue frames, and other frames are also selected according to requirements; the configuration platform can use MySQL database to store data, and can select other databases to store data according to requirements.
As shown in fig. 9, the component configuring apparatus includes:
an interface importing module 1 configured to perform importing an interface of the configuration platform in an entry file of the target project;
the project acquisition module 2 is configured to execute acquisition of target identification and target environment information of the target project accessing the configuration platform according to the interface;
the association query module 3 is configured to execute query of a target component associated with the target identifier and the target environment information according to the pre-stored association relationship between the identifier of the item and the environment information and the component;
a component loading module 4 configured to perform loading of the target component into the target item.
In one embodiment, the interface of the configuration platform is configured to indicate that the target item carries a target identifier and/or target environment information of the target item when accessing the configuration platform.
Fig. 10 is a schematic block diagram illustrating an object acquisition module in accordance with an embodiment of the present disclosure. As shown in fig. 10, an interface of the configuration platform is configured to indicate that the target item carries a target identifier of the target item when accessing the configuration platform, and the item obtaining module 2 includes:
an identifier obtaining sub-module 21 configured to perform obtaining a target identifier of the target item accessing the configuration platform according to the interface;
and the environment obtaining sub-module 22 is configured to obtain the target environment information of the target item according to the environment domain name of the target item when the target item is accessed.
Fig. 11 is a schematic block diagram illustrating another component configuration apparatus in accordance with an embodiment of the present disclosure. As shown in fig. 11, the apparatus further includes:
the environment configuration module 5 is configured to execute the configuration of the environment information of the project according to the received first configuration instruction;
the component configuration module 6 is configured to execute components required by the configuration items under the environment corresponding to the environment information according to the received second configuration instruction;
and the establishing storage module 7 is configured to execute establishing and storing the identification of the item and the environment information, and the association relation of the components required by the item under the environment corresponding to the environment information.
Fig. 12 is a schematic block diagram illustrating yet another component configuration apparatus in accordance with an embodiment of the present disclosure. As shown in fig. 12, the apparatus further includes:
a state adjusting module 8 configured to adjust the available state of the target component according to the received adjusting instruction;
the association query module 3 is configured to execute querying available target components in target components associated with the target identifiers and the target environment information according to pre-stored identifiers of items and association relations between the environment information and the components.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present disclosure also provides an electronic device, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the component configuration method of any of the above embodiments.
Embodiments of the present disclosure also provide a storage medium, where instructions executed by a processor of an electronic device enable the electronic device to perform the component configuration method according to any of the above embodiments.
Embodiments of the present disclosure also provide a computer program product configured to execute the component configuration method according to any of the above embodiments.
Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Embodiments of the present disclosure also provide a computer program product configured to execute the component configuration method according to any of the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and apparatus provided by the embodiments of the present disclosure are described in detail above, and the principles and embodiments of the present disclosure are explained herein by applying specific examples, and the above description of the embodiments is only used to help understanding the method and core ideas of the present disclosure; meanwhile, for a person skilled in the art, based on the idea of the present disclosure, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present disclosure should not be construed as a limitation to the present disclosure.

Claims (12)

1. A component configuration method adapted for configuring a platform, the method comprising:
introducing an interface of the configuration platform into an entry file of the target project;
acquiring a target identifier and target environment information of the target project accessing the configuration platform according to the interface;
inquiring a target component associated with the target identifier and the target environment information according to the pre-stored item identifier and the association relationship between the environment information and the component;
loading the target component into the target item.
2. The method of claim 1, wherein an interface of the configuration platform is configured to instruct the target item to carry a target identifier and/or target environment information of the target item when accessing the configuration platform.
3. The method according to claim 1, wherein an interface of the configuration platform is used to indicate that the target item carries a target identifier of the target item when accessing the configuration platform, and the obtaining the target identifier and the target environment information of the target item accessing the configuration platform according to the interface comprises:
acquiring a target identifier of the target project accessing the configuration platform according to the interface;
and when the target item is accessed, acquiring the target environment information of the target item according to the environment domain name of the target item.
4. The method of claim 1, wherein prior to introducing the interface of the configuration platform in the entry file of the target item, the method further comprises:
configuring the environmental information of the project according to the received first configuration instruction;
according to the received second configuration instruction, configuring components required by the project under the environment corresponding to the environment information;
and establishing and storing the identification and the environment information of the item and the incidence relation of the components required by the item under the environment corresponding to the environment information.
5. The method of claim 4, wherein prior to introducing the interface of the configuration platform in the entry file of the target item, the method further comprises:
adjusting the available state of the target component according to the received adjustment instruction;
the querying of the target component associated with the target identifier and the target environment information according to the pre-stored association relationship between the identifier of the item and the environment information and the component includes:
and inquiring available target components in the target components related to the target identification and the target environment information according to the pre-stored association relationship between the identification of the item and the environment information and the components.
6. A component configuration apparatus adapted to configure a platform, the method comprising:
an interface importing module configured to perform importing an interface of the configuration platform in an entry file of the target project;
the project acquisition module is configured to execute acquisition of target identification and target environment information of the target project accessing the configuration platform according to the interface;
the association query module is configured to execute query of a target component associated with the target identifier and the target environment information according to the pre-stored association relationship between the identifier of the item and the environment information and the component;
a component loading module configured to perform loading of the target component into the target item.
7. The apparatus of claim 6, wherein the interface of the configuration platform is configured to instruct the target item to carry a target identifier and/or target environment information of the target item when accessing the configuration platform.
8. The apparatus of claim 6, wherein the interface of the configuration platform is configured to instruct the target item to carry a target identifier of the target item when accessing the configuration platform, and the item acquisition module comprises:
an identification acquisition submodule configured to perform acquisition of a target identification of the target item accessing the configuration platform according to the interface;
and the environment acquisition sub-module is configured to acquire the target environment information of the target item according to the environment domain name of the target item when the target item is accessed.
9. The apparatus of claim 6, further comprising:
the environment configuration module is configured to execute the configuration of the environment information of the project according to the received first configuration instruction;
the component configuration module is configured to execute components required by the configuration project under the environment corresponding to the environment information according to the received second configuration instruction;
and the establishing and storing module is configured to establish and store the identification of the item and the environment information and the association relation of the components required by the item under the environment corresponding to the environment information.
10. The apparatus of claim 9, further comprising:
a state adjustment module configured to perform adjusting the available state of the target component according to the received adjustment instruction;
the association query module is configured to execute, and query available target components in target components associated with the target identifiers and the target environment information according to pre-stored item identifiers and association relations between the environment information and the components.
11. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the component configuration method of any of claims 1 to 6.
12. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the component configuration method of any of claims 1 to 6.
CN201910566076.3A 2019-06-27 2019-06-27 Component configuration method and device, electronic equipment and storage medium Pending CN112148342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910566076.3A CN112148342A (en) 2019-06-27 2019-06-27 Component configuration method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910566076.3A CN112148342A (en) 2019-06-27 2019-06-27 Component configuration method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112148342A true CN112148342A (en) 2020-12-29

Family

ID=73870006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910566076.3A Pending CN112148342A (en) 2019-06-27 2019-06-27 Component configuration method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112148342A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460077A (en) * 2022-09-01 2022-12-09 杭州华橙软件技术有限公司 Configuration information updating method and device, storage medium and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100281461A1 (en) * 2009-05-04 2010-11-04 Microsoft Corporation Automatic configuration of project system from project capabilities
CN104298512A (en) * 2014-10-10 2015-01-21 南京莱斯信息技术股份有限公司 OSGi-based (open service gateway initiative) functional unit type integrated development system
CN105278942A (en) * 2014-07-23 2016-01-27 腾讯科技(深圳)有限公司 Component management method and apparatus
CN105512955A (en) * 2015-12-29 2016-04-20 深圳市科漫达智能管理科技有限公司 Method and system for assembling modular products
CN108536428A (en) * 2018-03-28 2018-09-14 四川斐讯信息技术有限公司 A kind of environment changing method and system of front end exploitation
CN109086051A (en) * 2018-06-29 2018-12-25 平安科技(深圳)有限公司 Application component dispositions method, device and computer storage medium
CN109683947A (en) * 2018-12-13 2019-04-26 重庆戴昂科技有限公司 Low code hardware and software platform event triggers configuration system
CN109783130A (en) * 2018-12-14 2019-05-21 深圳市创梦天地科技有限公司 A kind of packaging method and server of front end project

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100281461A1 (en) * 2009-05-04 2010-11-04 Microsoft Corporation Automatic configuration of project system from project capabilities
CN105278942A (en) * 2014-07-23 2016-01-27 腾讯科技(深圳)有限公司 Component management method and apparatus
CN104298512A (en) * 2014-10-10 2015-01-21 南京莱斯信息技术股份有限公司 OSGi-based (open service gateway initiative) functional unit type integrated development system
CN105512955A (en) * 2015-12-29 2016-04-20 深圳市科漫达智能管理科技有限公司 Method and system for assembling modular products
CN108536428A (en) * 2018-03-28 2018-09-14 四川斐讯信息技术有限公司 A kind of environment changing method and system of front end exploitation
CN109086051A (en) * 2018-06-29 2018-12-25 平安科技(深圳)有限公司 Application component dispositions method, device and computer storage medium
CN109683947A (en) * 2018-12-13 2019-04-26 重庆戴昂科技有限公司 Low code hardware and software platform event triggers configuration system
CN109783130A (en) * 2018-12-14 2019-05-21 深圳市创梦天地科技有限公司 A kind of packaging method and server of front end project

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460077A (en) * 2022-09-01 2022-12-09 杭州华橙软件技术有限公司 Configuration information updating method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN106528432B (en) The construction method and device of test scene data bury a test method
CN112073471B (en) Control method and device of equipment, storage medium and electronic device
CN104820643B (en) Method and apparatus for establishing connection between user equipment and smart machine
CN105099811A (en) Interface testing method and device
CN110868763B (en) Method, device and system for establishing Bluetooth connection
CN105827841A (en) Icon display method and device
CN107391182A (en) Generation method, device, server and storage medium of theme installation package
CN111949508A (en) Method, device, equipment and computer readable medium for testing interface
CN114389969B (en) Method and device for testing client, electronic equipment and storage medium
CN108282455A (en) Web-page requests method, apparatus and domain-name information analysis result processing method, device
CN112148342A (en) Component configuration method and device, electronic equipment and storage medium
CN107918617A (en) Data query method and apparatus
CN105468776A (en) Method, device and system for operating database
CN109446445A (en) A kind of resource acquiring method and device
CN109951549B (en) Network page access method and device and computer readable storage medium
CN108134811A (en) The methods, devices and systems that file destination is distributed or downloaded
CN107483294B (en) Method and device for monitoring network request
CN106341449A (en) Data synchronization method and device
CN110401709A (en) Processing method, device and the storage medium of session in a kind of instant messaging application
CN113127335A (en) System testing method and device
CN106354761A (en) Identification handling method used in electronic data of instruction books and device thereof
CN106202289B (en) Webpage positioning method and electronic equipment
CN115408569A (en) Process traceability tree simplification method, device, equipment and medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN112346961B (en) Method and device for debugging client

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