CN116954713A - Component generation method, device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN116954713A
CN116954713A CN202310817365.2A CN202310817365A CN116954713A CN 116954713 A CN116954713 A CN 116954713A CN 202310817365 A CN202310817365 A CN 202310817365A CN 116954713 A CN116954713 A CN 116954713A
Authority
CN
China
Prior art keywords
component
information
generated
target
component 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
CN202310817365.2A
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 CN202310817365.2A priority Critical patent/CN116954713A/en
Publication of CN116954713A publication Critical patent/CN116954713A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • 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)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure relates to a component generating method, apparatus, electronic device, storage medium and computer program product. The method comprises the following steps: acquiring initial component information of a component to be generated; updating the initial component information by utilizing the operation configuration information of the component to be generated in at least two component operation environments respectively to obtain target component information of the component to be generated in each component operation environment; the method comprises the steps of carrying out fusion processing on target component information of a component to be generated in each component operation environment to obtain fusion component information of the component to be generated; the fusion component information is used for the terminal to acquire target component information corresponding to the component running environment of the terminal from the fusion component information, and generate a corresponding component according to the acquired target component information. By adopting the method, the assembly generation efficiency can be improved.

Description

Component generation method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a component generating method, an apparatus, an electronic device, a storage medium, and a computer program product.
Background
With the development of computer technology, the speed of updating the running environment is gradually increased. In each field, there are cases where different operating environments are used simultaneously; for example, the framework systems vue2 and vue3 are used simultaneously. Therefore, how to efficiently generate components in different operating environments has become an important research direction.
In the conventional technology, when generating a component, different component development codes are generally written for different running environments by developers, so that component generation is realized; however, when facing multiple operating environments, a developer is required to write codes multiple times, and the process is complicated, so that the component generation efficiency is low.
Disclosure of Invention
The present disclosure provides a component generating method, apparatus, electronic device, storage medium, and computer program product to at least solve the problem of low component generating efficiency in the related art. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a component generating method, including:
acquiring initial component information of a component to be generated;
updating the initial component information by utilizing the operation configuration information of the component to be generated in at least two component operation environments respectively to obtain target component information of the component to be generated in each component operation environment;
Performing fusion processing on target component information of the component to be generated in each component operation environment to obtain fusion component information of the component to be generated; the fusion component information is used for the terminal to acquire target component information corresponding to the component operation environment of the terminal from the fusion component information, and generate a corresponding component according to the acquired target component information.
In an exemplary embodiment, before updating the initial component information by using the operation configuration information of the component to be generated in at least two component operation environments respectively to obtain the target component information of the component to be generated in each component operation environment, the method further includes:
acquiring component dependency information and operation environment information of the component to be generated in at least two component operation environments;
and respectively carrying out fusion processing on the component dependency information and the running environment information of the component to be generated in each component running environment to obtain the running configuration information of the component to be generated in each component running environment.
In an exemplary embodiment, the updating the initial component information by using the operation configuration information of the component to be generated in at least two component operation environments to obtain target component information of the component to be generated in each component operation environment includes:
Acquiring operation configuration information of the component to be generated in at least two component operation environments, and a position identifier in the initial component information;
and adding each piece of operation configuration information to the corresponding position in the initial component information according to each piece of position identifier to obtain target component information of the component to be generated in each component operation environment.
In an exemplary embodiment, before the fusing processing is performed on the target component information of the component to be generated in the running environment of each component to obtain the fused component information of the component to be generated, the method further includes:
generating preview components under each component operation environment according to the target component information of the components to be generated under each component operation environment;
verifying the function information of the preview component in the running environment of each component;
the fusing processing is performed on the target component information of the component to be generated in each component operation environment to obtain fused component information of the component to be generated, including:
and under the condition that the function information verification of the preview component in each component running environment is passed, carrying out fusion processing on the target component information of the component to be generated in each component running environment to obtain the fusion component information of the component to be generated.
In an exemplary embodiment, the acquiring initial component information of the component to be generated includes:
determining a component information template matched with the component to be generated from a component information template library;
and generating initial component information of the component to be generated according to the component information template.
According to a second aspect of the embodiments of the present disclosure, there is provided a component generating method, applied to a terminal, including:
acquiring fusion component information of a component to be generated; the fusion component information of the component to be generated is obtained by fusion processing of target component information of the component to be generated in each component operation environment; the target component information of the component to be generated in each component operation environment is obtained by updating the initial component information of the component to be generated by utilizing the operation configuration information of the component to be generated in at least two component operation environments respectively;
acquiring target component information corresponding to the component running environment of the terminal from the fused component information;
and generating a corresponding component according to the acquired target component information.
In an exemplary embodiment, the obtaining, from the fused component information, target component information corresponding to a component running environment of the terminal includes:
Determining a target component information identifier corresponding to a component running environment of the terminal;
and acquiring target component information corresponding to the target component information identifier from the fused component information, and taking the target component information as target component information corresponding to the component running environment of the terminal.
In an exemplary embodiment, before generating the corresponding component according to the obtained target component information, the method further includes:
storing the obtained target component information into a preset file;
the generating a corresponding component according to the obtained target component information comprises the following steps:
responding to a component generating request aiming at the component to be generated, and extracting the acquired target component information from the preset file;
and generating a corresponding component according to the extracted target component information.
According to a third aspect of the embodiments of the present disclosure, there is provided a component generating apparatus, including:
an information acquisition unit configured to perform acquisition of initial component information of a component to be generated;
the information updating unit is configured to execute updating of the initial component information by utilizing operation configuration information of the component to be generated in at least two component operation environments respectively to obtain target component information of the component to be generated in each component operation environment;
The information fusion unit is configured to perform fusion processing on target component information of the component to be generated in each component operation environment to obtain fusion component information of the component to be generated; the fusion component information is used for the terminal to acquire target component information corresponding to the component operation environment of the terminal from the fusion component information, and generate a corresponding component according to the acquired target component information.
In an exemplary embodiment, the apparatus further includes an information processing unit configured to perform acquiring component dependency information and runtime environment information of the component to be generated in at least two component runtime environments; and respectively carrying out fusion processing on the component dependency information and the running environment information of the component to be generated in each component running environment to obtain the running configuration information of the component to be generated in each component running environment.
In an exemplary embodiment, the information updating unit is further configured to perform obtaining operation configuration information of the component to be generated in at least two component operation environments, and a location identifier in the initial component information; and adding each piece of operation configuration information to the corresponding position in the initial component information according to each piece of position identifier to obtain target component information of the component to be generated in each component operation environment.
In an exemplary embodiment, the apparatus further includes an information verification unit configured to execute generation of preview components under respective component operation environments according to target component information of the components to be generated under the respective component operation environments; verifying the function information of the preview component in the running environment of each component; and the information fusion unit is further configured to perform fusion processing on the target component information of the component to be generated in each component operation environment under the condition that the function information of the preview component in each component operation environment passes verification, so as to obtain the fusion component information of the component to be generated.
In an exemplary embodiment, the information obtaining unit is further configured to perform determining, from a component information template library, a component information template matching the component to be generated; and generating initial component information of the component to be generated according to the component information template.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a component generating apparatus, applied to a terminal, including:
a first acquisition unit configured to perform acquisition of fusion component information of a component to be generated; the fusion component information of the component to be generated is obtained by fusion processing of target component information of the component to be generated in each component operation environment; the target component information of the component to be generated in each component operation environment is obtained by updating the initial component information of the component to be generated by utilizing the operation configuration information of the component to be generated in at least two component operation environments respectively;
A second acquisition unit configured to perform acquisition of target component information corresponding to a component operation environment of the terminal from the fused component information;
and the component generating unit is configured to execute the generation of the corresponding component according to the acquired target component information.
In an exemplary embodiment, the second obtaining unit is further configured to perform determining a target component information identifier corresponding to a component running environment of the terminal; and acquiring target component information corresponding to the target component information identifier from the fused component information, and taking the target component information as target component information corresponding to the component running environment of the terminal.
In an exemplary embodiment, the apparatus further includes an information storage unit configured to perform storing the obtained target component information into a preset file; the component generating unit is further configured to execute extracting the obtained target component information from the preset file in response to a component generating request for the component to be generated; and generating a corresponding component according to the extracted target component information.
According to a fifth aspect of embodiments of the present disclosure, there is provided 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 generation method of any of the above.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the component generating method as set forth in any one of the preceding claims.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising instructions therein, which when executed by a processor of an electronic device, enable the electronic device to perform a component generating method as described in any one of the above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
updating initial component information of a component to be generated by utilizing operation configuration information of different component operation environments respectively to obtain target component information of the component to be generated in the different component operation environments, carrying out fusion processing on the target component information to obtain fusion component information of the component to be generated, providing the fusion component information to a terminal, acquiring target component information corresponding to the component operation environments of the terminal from the fusion component information by the terminal, and generating a corresponding component according to the acquired target component information. In this way, when the component is generated, the same initial component information is updated by utilizing the operation configuration information of different component operation environments, so that target component information required by component generation under different component operation environments is obtained efficiently, then fusion processing is carried out on each target component information, and the fusion component information obtained by fusion is provided to the terminal, so that the terminal can acquire corresponding target component information from the fusion component information according to the component operation environments of the terminal, generate the component according to the target component information, and therefore, the terminal of different component operation environments can acquire the target component information corresponding to the component operation environments of the terminal from the fusion component information, the generation process of the component is more efficient, and the improvement of the component generation efficiency is facilitated.
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 disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is an application environment diagram illustrating a component generation method according to an example embodiment.
FIG. 2 is a flow chart illustrating a component generation method according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating a component generation method according to another exemplary embodiment.
Fig. 4 is a flowchart illustrating a component generation method according to yet another exemplary embodiment.
Fig. 5 is a block diagram illustrating a component generation apparatus according to an example embodiment.
Fig. 6 is a block diagram of a component generating apparatus according to another exemplary embodiment.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of 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 foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be further noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
The component generating method provided by the disclosure can be applied to an application environment shown in fig. 1, and comprises a first terminal and a second terminal. Wherein the first terminal communicates with the second terminal via a network. Specifically, a first terminal acquires initial component information of a component to be generated, updates the initial component information by using operation configuration information of the component to be generated in at least two component operation environments to obtain target component information of the component to be generated in each component operation environment, performs fusion processing on the target component information of the component to be generated in each component operation environment to obtain fusion component information of the component to be generated, a second terminal acquires the fusion component information of the component to be generated, acquires target component information corresponding to the component operation environments of the terminal from the fusion component information, and generates a corresponding component according to the acquired target component information. The first terminal may be, but not limited to, various personal computers, notebook computers, smart phones, and tablet computers. The second terminal may be, but is not limited to, various personal computers, notebook computers, smart phones and tablet computers. It will be appreciated that the method may also be applied to a server, and may also be applied to a system comprising a terminal and a server, and implemented by interaction between the terminal and the server.
Fig. 2 is a flowchart of a component generating method according to an exemplary embodiment, and as shown in fig. 2, the method is applied to the first terminal in fig. 1, and is described by way of example, and includes the following steps:
in step S210, initial component information of a component to be generated is acquired.
The component to be generated may be a component to be generated at the second terminal, for example, the component to be generated may be a component to be generated corresponding to version vue or version vue; note that vue may refer to a set of front end frames for building user interfaces, vue and vue3 refer to different versions of vue.
The initial component information may refer to information for generating the component to be generated, for example, the initial component information may be code of the component to be generated.
Specifically, the first terminal selects initial component information corresponding to the component to be generated from a pre-stored initial component information set.
In step S220, the initial component information is updated by using the operation configuration information of the component to be generated in at least two component operation environments, so as to obtain the target component information of the component to be generated in each component operation environment.
As shown in FIG. 3, the component runtime environment may refer to a host environment in which the component is running, such as a first component runtime environment (e.g., vue 2), a second component runtime environment (e.g., vue 3), and so on.
The running configuration information in at least two component running environments may refer to frame information corresponding to different component running environments, for example, vue frame information and vue frame information.
As shown in fig. 3, the target component information may refer to component information obtained by fusing different operation configuration information with initial component information and performing packaging processing, for example, a first product and a second product for different component operation environments.
Specifically, the first terminal acquires operation configuration information in a plurality of component operation environments, respectively fuses each operation configuration information with initial component information, and then performs packaging processing to obtain target component information of the component to be generated in each component operation environment.
For example, the first terminal respectively soft links the initial component information to the items of the preset multiple component operation environments (for example, the items or the files taking vue and vue3 as host environments) by using a soft link method, and performs component compiling and packaging processing on each item by using a template compiler, so that each operation configuration information and the initial component information are respectively fused and packaged to generate target component information of the component to be generated in each component operation environment.
In step S230, the target component information of the component to be generated in each component operation environment is fused, so as to obtain fused component information of the component to be generated; the fusion component information is used for the terminal to acquire target component information corresponding to the component running environment of the terminal from the fusion component information, and generate a corresponding component according to the acquired target component information.
The converged component information may be information obtained by combining the target component information, for example, a component packet may be referred to as a npm (Node Package Manager, node packet manager) packet.
Wherein, the terminal refers to the second terminal.
The component running environment of the terminal may refer to a hosting environment of the second terminal running component, for example, a version of a front end framework installed by the second terminal, such as vue2 or vue.
Specifically, the first terminal combines target component information of the component to be generated in each component operation environment to obtain a component package, the component package is used as fusion component information of the component to be generated, the fusion component information is provided to the second terminal, the second terminal recognizes the component operation environment of the second terminal, the target component information corresponding to the component operation environment of the second terminal is obtained in the fusion component information, and a corresponding component is generated according to the obtained target component information.
For example, the first terminal adds each target component information to one component package, publishes the component package as a fused component information to the platform, the second terminal obtains the fused component information from the platform, installs the fused component information, and obtains corresponding target component information from the fused component information according to the component operation environment of the second terminal, so that a component supporting the component operation environment of the second terminal can be generated in the second terminal by using the obtained target component information.
In the component generating method, the initial component information of the component to be generated is updated by utilizing the operation configuration information of different component operation environments respectively to obtain the target component information of the component to be generated in the different component operation environments, the target component information is subjected to fusion processing to obtain the fusion component information of the component to be generated, the fusion component information is provided to the terminal, the terminal acquires the target component information corresponding to the component operation environments of the terminal from the fusion component information, and the corresponding component is generated according to the acquired target component information. In this way, when the component is generated, the same initial component information is updated by utilizing the operation configuration information of different component operation environments, so that target component information required by component generation under different component operation environments is obtained efficiently, then fusion processing is carried out on each target component information, and the fusion component information obtained by fusion is provided to the terminal, so that the terminal can acquire corresponding target component information from the fusion component information according to the component operation environments of the terminal, generate the component according to the target component information, and therefore, the terminal of different component operation environments can acquire the target component information corresponding to the component operation environments of the terminal from the fusion component information, the generation process of the component is more efficient, and the improvement of the component generation efficiency is facilitated.
In an exemplary embodiment, the step S220 further includes a step of acquiring operation configuration information of the component to be generated in each component operation environment before updating the initial component information by using operation configuration information of the component to be generated in at least two component operation environments to obtain target component information of the component to be generated in each component operation environment, and specifically includes the following steps: acquiring component dependency information and running environment information of a component to be generated in at least two component running environments; and respectively carrying out fusion processing on the component dependency information and the running environment information of the component to be generated in each component running environment to obtain the running configuration information of the component to be generated in each component running environment.
The component dependency information may be information that the initial component information needs to depend on, for example, information of a library that needs to depend on and is recorded in the initial component information, where the library may be a library corresponding to a component running environment, such as a database supporting a vue2 framework, a database supporting a vue3 framework, or a database supporting both a vue2 framework and a vue3 framework.
The running environment information may be frame information corresponding to running environments of different components.
Specifically, the first terminal obtains component dependency information and running environment information of components to be generated in different component running environments, and respectively combines the component dependency information and the running environment information of the components to be generated in each component running environment to obtain running configuration information of the components to be generated in each component running environment.
For example, before updating initial component information by using operation configuration information of a component to be generated in at least two component operation environments respectively to obtain target component information of the component to be generated in each component operation environment, the first terminal determines a plurality of component operation environments to obtain operation environment information corresponding to the plurality of component operation environments, performs dependency identification on the initial component information, identifies dependency data of different component environments corresponding to the initial component information, and respectively combines the component dependency information and the operation environment information of the component to be generated in each component operation environment as the component dependency information of the component to be generated in the different component operation environments to obtain operation configuration information of the component to be generated in each component operation environment.
According to the technical scheme provided by the embodiment of the disclosure, the component dependence information and the operation environment information of the component to be generated in at least two component operation environments are determined, and the operation configuration information of the component to be generated in each component operation environment is obtained by combining the component dependence information and the operation environment information, so that the operation configuration information of the component to be generated in each component operation environment can be determined more accurately, and the follow-up improvement of the component generation accuracy is facilitated.
In an exemplary embodiment, in step S220, the initial component information is updated by using the operation configuration information of the component to be generated in at least two component operation environments, so as to obtain the target component information of the component to be generated in each component operation environment, which specifically includes the following contents: acquiring operation configuration information of the component to be generated in at least two component operation environments, and a position identifier in initial component information; and adding each piece of operation configuration information to the corresponding position in the initial component information according to each position identifier to obtain the target component information of the component to be generated in each component operation environment.
The location identifier may be an identifier for indicating a location in the initial component information, and may specifically refer to a location number, such as a line.
Specifically, the first terminal obtains operation configuration information of the component to be generated in at least two component operation environments and position identifiers of the operation configuration information of different component operation environments in initial component information, and adds each operation configuration information to corresponding positions in the initial component information according to the corresponding position identifiers to obtain target component information of the component to be generated in each component operation environment.
For example, the first terminal determines the operation configuration information of each component operation environment according to the initial component information and a preset position identification rule, and adds each operation configuration information to a corresponding position in the initial component information according to a corresponding position identifier in the initial component information to realize the combination of each operation configuration information and the initial component information, thereby obtaining the target component information of the component to be generated in each component operation environment.
According to the technical scheme provided by the embodiment of the disclosure, the operation configuration information of each component operation environment is determined, the position identifier in the initial component information is determined, and then the operation configuration information is added to the initial component information according to the position identifier, so that the combination of each operation configuration information and the initial component information is realized, the target component information of the component to be generated in each component operation environment can be obtained more efficiently and accurately, and the subsequent improvement of the component generation efficiency and accuracy is facilitated.
In an exemplary embodiment, the step S230 further includes a step of verifying the target component information before the target component information of the component to be generated in the operating environment of each component is fused to obtain the fused component information of the component to be generated, and specifically includes the following steps: generating preview components in each component running environment according to target component information of the components to be generated in each component running environment; and verifying the function information of the preview component in the running environment of each component. Further, in step S230, the fusion processing is performed on the target component information of the component to be generated in each component operating environment, so as to obtain the fusion component information of the component to be generated, which specifically includes the following contents: and under the condition that the function information verification of the preview component in each component running environment is passed, carrying out fusion processing on the target component information of the component to be generated in each component running environment to obtain the fusion component information of the component to be generated.
The preview component may be a component generated according to the target component information and used for verifying the exposable or previewable component of the target component information, for example, a component of real-time previewing generated according to the real-time target component information in a development stage.
The function information of the preview component may refer to the component functions displayed by the preview component.
Specifically, the first terminal generates preview components in each component running environment according to target component information of the components to be generated in each component running environment, verifies the function information of the preview components in each component running environment according to preset component function conditions, confirms that the function information of the preview components in each component running environment passes verification when the function information of the preview components in each component running environment meets the component function conditions, and fuses the target component information of the components to be generated in each component running environment to obtain fused component information of the components to be generated.
For example, the first terminal generates a preview component under each component running environment according to target component information of the component to be generated under each component running environment, determines preset component function conditions, verifies the function information of the preview component under each component running environment according to the preset component function conditions, performs fusion processing on the target component information of the component to be generated under each component running environment when the function information verification of the preview component under each component running environment passes the component function conditions, obtains fusion component information of the component to be generated, and performs modification processing on initial component information according to differences between the function information of the preview component and the component function conditions when the verification does not pass the component function conditions, so that the target component information is correspondingly modified along with the initial component information, thereby generating a latest preview component according to the latest target component information until the function information verification of the latest preview component passes the component function conditions, and then performs fusion processing on the latest target component information of the component to be generated under each component running environment, thereby obtaining the fusion component information of the component to be generated.
According to the technical scheme provided by the embodiment of the disclosure, the preview component corresponding to the target component information is generated, the preview component is functionally verified, the target component information is verified, under the condition that verification is passed, the target information is fused, the fused component information is obtained, the accuracy of the target component information is improved, the accuracy of the fused component information is improved, and the follow-up improvement of the component generation accuracy is facilitated.
In an exemplary embodiment, in step S210, acquiring initial component information of a component to be generated specifically includes: determining a component information template matched with a component to be generated from a component information template library; and generating initial component information of the component to be generated according to the component information template.
The component information template library may be a database storing a plurality of component information templates.
The component information template may be a template component information, such as a template or a code block of a code.
Specifically, the first terminal responds to a selection instruction for the component information template, selects a component information template matched with the component to be generated from a preset component information template library, and generates initial component information of the component to be generated according to the component information template.
According to the technical scheme provided by the embodiment of the disclosure, the component information templates matched with the components to be generated are determined from the preset component information templates, and the initial component information of the components to be generated is generated by utilizing the component information templates, so that the initial component information of the components to be generated is rapidly determined according to the preset component information templates, the efficiency of acquiring the initial component information is improved, and the subsequent improvement of the component generation efficiency is facilitated.
Fig. 4 is a flowchart of a component generating method according to still another exemplary embodiment, and as shown in fig. 4, an example of application of the method to the second terminal in fig. 1 is described, including the steps of:
in step S410, fused component information of a component to be generated is acquired; the fusion component information of the component to be generated is obtained by carrying out fusion processing on the target component information of the component to be generated in each component operation environment; the method comprises the steps that target component information of a component to be generated in each component operation environment is obtained by updating initial component information of the component to be generated by utilizing operation configuration information of the component to be generated in at least two component operation environments respectively;
In step S420, target component information corresponding to the component running environment of the terminal is obtained from the fused component information;
in step S430, a corresponding component is generated according to the acquired target component information.
Specifically, a first terminal acquires initial component information of a component to be generated, updates the initial component information by using operation configuration information of the component to be generated in at least two component operation environments to obtain target component information of the component to be generated in each component operation environment, performs fusion processing on the target component information of the component to be generated in each component operation environment to obtain fusion component information of the component to be generated, issues the fusion component information to a platform, a second terminal acquires the fusion component information of the component to be generated from the platform, acquires target component information corresponding to the component operation environments of the terminal from the fusion component information, and generates a corresponding component according to the acquired target component information.
It should be noted that, regarding the specific limitations of the steps S410 to S430, reference may be made to the relevant limitations of the steps S210 to S230, which are not repeated herein.
In the component generating method, the initial component information of the component to be generated is updated by utilizing the operation configuration information of different component operation environments respectively to obtain the target component information of the component to be generated in the different component operation environments, the target component information is subjected to fusion processing to obtain the fusion component information of the component to be generated, the fusion component information is provided to the terminal, the terminal acquires the target component information corresponding to the component operation environments of the terminal from the fusion component information, and the corresponding component is generated according to the acquired target component information. In this way, when the component is generated, the same initial component information is updated by utilizing the operation configuration information of different component operation environments, so that target component information required by component generation under different component operation environments is obtained efficiently, then fusion processing is carried out on each target component information, and the fusion component information obtained by fusion is provided to the terminal, so that the terminal can acquire corresponding target component information from the fusion component information according to the component operation environments of the terminal, generate the component according to the target component information, and therefore, the terminal of different component operation environments can acquire the target component information corresponding to the component operation environments of the terminal from the fusion component information, the generation process of the component is more efficient, and the improvement of the component generation efficiency is facilitated.
In an exemplary embodiment, in step S420, target component information corresponding to a component running environment of a terminal is obtained from the fused component information, which specifically includes the following contents: determining a target component information identifier corresponding to a component running environment of the terminal; and acquiring target component information corresponding to the target component information identifier from the fused component information, and taking the target component information as target component information corresponding to the component running environment of the terminal.
The target component information identifier may be an identifier corresponding to a component running environment of the second terminal, for example, a version number corresponding to the component running environment of the second terminal, such as vue2 or vue.
Specifically, the second terminal performs environment recognition on the component running environment of the second terminal, determines a target component information identifier corresponding to the component running environment of the second terminal, determines target component information corresponding to the target component information identifier from the fused component information, and obtains the target component information corresponding to the component running environment of the second terminal as the target component information corresponding to the component running environment of the second terminal.
According to the technical scheme provided by the embodiment of the disclosure, the component operation environment of the second terminal is determined, the target component information corresponding to the target component information identifier is acquired from the fused component information by utilizing the target component information identifier corresponding to the component operation environment of the second terminal, so that the target component information corresponding to the component operation environment of the second terminal in the fused component information can be recognized more quickly and accurately, and the subsequent component generation can be performed more quickly and accurately.
In an exemplary embodiment, the step S430 further includes a step of storing the acquired target component information before generating the corresponding component according to the acquired target component information, and specifically includes the following steps: and storing the acquired target component information into a preset file. Further, in step S430, according to the obtained target component information, a corresponding component is generated, which specifically includes the following contents: responding to a component generating request aiming at a component to be generated, and extracting the acquired target component information from a preset file; and generating a corresponding component according to the extracted target component information.
The preset file may be a file or a folder preset in the fusion component information, or may be a file or a folder preset in the second terminal, which is not limited herein.
Wherein the component generation request may be a request indicating that component generation is to be performed.
Specifically, after obtaining the target component information, the second terminal stores the obtained target component information in a preset file or folder, and when receiving a component generation request for a component to be generated, the second terminal responds to the component generation request, extracts the obtained target component information from the preset file or folder, and generates a corresponding component in the second terminal according to the obtained target component information.
According to the technical scheme provided by the embodiment of the disclosure, the target component information corresponding to the component running environment of the second terminal is stored in the preset file or folder, so that the target component information can be conveniently and rapidly called or extracted more accurately later, and the corresponding component is generated according to the target component information, and the efficiency and accuracy of component generation are improved.
The component generating method provided by the present disclosure is described in the following by an exemplary embodiment, where the method is applied to the first terminal and the second terminal in fig. 1 for illustration, and the main steps include:
(1) And the first terminal determines a component information template matched with the component to be generated from the component information template library.
(2) And the first terminal generates initial component information of the component to be generated according to the component information template.
(3) The first terminal acquires component dependency information and running environment information of the component to be generated in at least two component running environments.
(4) And the first terminal respectively fuses the component dependency information and the running environment information of the components to be generated in the running environments of the components to obtain the running configuration information of the components to be generated in the running environments of the components.
(5) The first terminal acquires operation configuration information of the component to be generated in at least two component operation environments, and a position identifier in initial component information.
(6) And the first terminal adds each piece of operation configuration information to the corresponding position in the initial component information according to each position identifier to obtain the target component information of the component to be generated in each component operation environment.
(7) And the first terminal generates preview components in each component running environment according to the target component information of the components to be generated in each component running environment.
(8) And the first terminal verifies the function information of the preview component in the running environment of each component.
(9) And under the condition that the function information of the preview component in each component running environment passes verification, the first terminal fuses the target component information of the component to be generated in each component running environment to obtain fused component information of the component to be generated.
(10) And the second terminal acquires the fusion component information of the component to be generated.
(11) The second terminal determines a target component information identifier corresponding to the component operating environment of the terminal.
(12) And the second terminal acquires the target component information corresponding to the target component information identifier from the fused component information, and the target component information is used as the target component information corresponding to the component operation environment of the terminal.
(13) And the second terminal stores the acquired target component information into a preset file.
(14) And the second terminal responds to the component generating request aiming at the component to be generated, and extracts the acquired target component information from the preset file.
(15) And the second terminal generates a corresponding component according to the extracted target component information.
In the component generating method, when the component is generated, the same initial component information is updated by utilizing the operation configuration information of different component operation environments, so that target component information required by component generation under the different component operation environments is obtained efficiently, then fusion processing is carried out on each target component information, the fusion component information obtained by fusion is provided to the terminal, the terminal can acquire the corresponding target component information from the fusion component information according to the component operation environments of the terminal, and the component is generated according to the target component information, so that the terminal of the different component operation environments can acquire the target component information corresponding to the component operation environments of the terminal from the fusion component information, the component generating process is more efficient, and the component generating efficiency is improved.
In order to more clearly clarify the component generating method provided by the embodiment of the present disclosure, the component generating method will be specifically described in the following with a specific embodiment. In one embodiment, the present disclosure also provides an engineering solution to implement vue2 and vue3 component multiplexing. As shown in fig. 3, the method specifically comprises the following steps:
(1) The first terminal creates a template by using the template generation tool as initial component information, and can edit or modify the component logic of the initial component information.
(2) The first terminal performs local preview and local development on the initial component information, and soft links the initial component information to the projects (projects which can be used for debugging, previewing and packaging) of two host environments, namely vue (first component operating environment) and vue (second component operating environment), so that development processing and packaging processing are completed in the projects of the host environments respectively.
Wherein, the items of the host environment integrate the functions of preview, display and the like; the soft chain can adopt a soft chain link mode or a dynamic import mode; the host environment can be in the project or can be revealed out and fused with the initial component information.
(3) The first terminal performs packaging processing in the projects of the vue and vue environments respectively to generate corresponding products, which can be vue product and vue product (first product and second product). Wherein the product contains packaged logic code, dts (which can be used to describe data structures and language) type declaration files, etc.
(4) The first terminal integrates packaging resources, puts the packaged vue product and vue product into the same npm package, provides npm package to the second terminal as fused component information, judges the component running environment (such as vue version) of the second terminal in the service project through a post-installation script (such as a post-installation hook) of npm, switches npm package entry files, so that target component information (such as vue product or vue product) corresponding to the component running environment of the second terminal is stored in the entry files so as to extract or call the corresponding target component information, and finally the second terminal generates corresponding components according to vue product or vue product.
The engineering solution method for realizing the multiplexing of vue and vue3 components can achieve the following technical effects: firstly, development efficiency is improved, and maintenance cost is reduced; the method has the advantages that the vue items and the vue items are supported simultaneously in a mode of one code and one npm package, the problems that two version packages are independent and difficult to maintain are effectively solved, and the component generation efficiency is improved; second, solve vue-demi (general library) functional limitations; specifically, the component codes are respectively soft-linked into prepared items vue and vue in a soft-linking manner, so that Single File Component (SFC) compiling is supported; thirdly, the usability is improved; a template can be quickly created through a cli tool (command line interface tool), and development, local preview, packaging release and the like can be performed based on the template; fourth, the integration is improved; the components supporting both vue and vue2 and the components supporting preview, markdown (lightweight markup language) display, dts generation and the like are built in, and can be released after unpacking.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
It should be understood that the same/similar parts of the embodiments of the method described above in this specification may be referred to each other, and each embodiment focuses on differences from other embodiments, and references to descriptions of other method embodiments are only needed.
Based on the same inventive concept, the embodiments of the present disclosure further provide a component generating apparatus for implementing the above-mentioned related component generating method.
Fig. 5 is a block diagram illustrating a component generation apparatus according to an example embodiment. Referring to fig. 5, the apparatus includes an information acquisition unit 510, an information update unit 520, and an information fusion unit 530.
The information acquisition unit 510 is configured to perform acquisition of initial component information of a component to be generated.
The information updating unit 520 is configured to perform updating of the initial component information by using the operation configuration information of the component to be generated in at least two component operation environments, so as to obtain the target component information of the component to be generated in each component operation environment.
An information fusion unit 530 configured to perform fusion processing on target component information of the component to be generated in each component operation environment, to obtain fused component information of the component to be generated; the fusion component information is used for the terminal to acquire target component information corresponding to the component running environment of the terminal from the fusion component information, and generate a corresponding component according to the acquired target component information.
In an exemplary embodiment, the component generating apparatus further includes an information processing unit configured to perform acquisition of component dependency information and execution environment information of the component to be generated in at least two component execution environments; and respectively carrying out fusion processing on the component dependency information and the running environment information of the component to be generated in each component running environment to obtain the running configuration information of the component to be generated in each component running environment.
In an exemplary embodiment, the information updating unit 520 is further configured to perform obtaining operation configuration information of the component to be generated in at least two component operation environments, and a location identifier in the initial component information; and adding each piece of operation configuration information to the corresponding position in the initial component information according to each position identifier to obtain the target component information of the component to be generated in each component operation environment.
In an exemplary embodiment, the component generating apparatus further includes an information verifying unit configured to execute generating preview components under respective component operating environments according to target component information of the component to be generated under the respective component operating environments; verifying the function information of the preview component in the running environment of each component; the information fusion unit 530 is further configured to perform fusion processing on the target component information of the component to be generated in each component operation environment to obtain fused component information of the component to be generated when the function information verification of the preview component in each component operation environment passes.
In an exemplary embodiment, the information obtaining unit 510 is further configured to perform determining, from the component information template library, a component information template matching the component to be generated; and generating initial component information of the component to be generated according to the component information template.
Fig. 6 is a block diagram of a component generating apparatus according to another exemplary embodiment, which is applied to a terminal. Referring to fig. 6, the apparatus includes a first acquisition unit 610, a second acquisition unit 620, and a component generation unit 630.
A first acquiring unit 610 configured to perform acquisition of fusion component information of a component to be generated; the fusion component information of the component to be generated is obtained by carrying out fusion processing on the target component information of the component to be generated in each component operation environment; the target component information of the component to be generated in each component operation environment is obtained by updating the initial component information of the component to be generated by utilizing the operation configuration information of the component to be generated in at least two component operation environments.
The second obtaining unit 620 is configured to obtain target component information corresponding to the component running environment of the terminal from the fused component information.
The component generating unit 630 is configured to perform generation of a corresponding component according to the acquired target component information.
In an exemplary embodiment, the second obtaining unit 620 is further configured to perform determining a target component information identifier corresponding to a component running environment of the terminal; and acquiring target component information corresponding to the target component information identifier from the fused component information, and taking the target component information as target component information corresponding to the component running environment of the terminal.
In an exemplary embodiment, the component generating apparatus further includes an information storing unit configured to perform storing the acquired target component information into a preset file; the component generating unit 630 is further configured to perform extracting the obtained target component information from the preset file in response to the component generating request for the component to be generated; and generating a corresponding component according to the extracted target component information.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The respective modules in the above-described component generating apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 7 is a block diagram illustrating an electronic device 700 for implementing a component generation method, according to an example embodiment. For example, the electronic device 700 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 7, an electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 702 can include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, video, and so forth. The memory 704 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.
The power supply component 706 provides power to the various components of the electronic device 700. Power supply components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 700.
The multimedia component 708 includes a screen between the electronic device 700 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front-facing camera and/or a rear-facing camera. When the electronic device 700 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the electronic device 700. For example, the sensor assembly 714 may detect an on/off state of the electronic device 700, a relative positioning of the components, such as a display and keypad of the electronic device 700, the sensor assembly 714 may also detect a change in position of the electronic device 700 or a component of the electronic device 700, the presence or absence of a user's contact with the electronic device 700, an orientation or acceleration/deceleration of the device 700, and a change in temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communication between the electronic device 700 and other devices, either wired or wireless. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi, an operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 716 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a computer-readable storage medium is also provided, such as memory 704, including instructions executable by processor 720 of electronic device 700 to perform the above-described method. For example, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer program product is also provided, comprising instructions executable by the processor 720 of the electronic device 700 to perform the above-described method.
It should be noted that the descriptions of the foregoing apparatus, the electronic device, the computer readable storage medium, the computer program product, and the like according to the method embodiments may further include other implementations, and the specific implementation may refer to the descriptions of the related method embodiments and are not described herein in detail.
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 adaptations, uses, or adaptations of the disclosure following the general 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A method of generating a component, comprising:
acquiring initial component information of a component to be generated;
updating the initial component information by utilizing the operation configuration information of the component to be generated in at least two component operation environments respectively to obtain target component information of the component to be generated in each component operation environment;
performing fusion processing on target component information of the component to be generated in each component operation environment to obtain fusion component information of the component to be generated; the fusion component information is used for the terminal to acquire target component information corresponding to the component operation environment of the terminal from the fusion component information, and generate a corresponding component according to the acquired target component information.
2. The method according to claim 1, wherein before updating the initial component information by using the operation configuration information of the component to be generated in at least two component operation environments, respectively, to obtain target component information of the component to be generated in each component operation environment, the method further comprises:
acquiring component dependency information and operation environment information of the component to be generated in at least two component operation environments;
And respectively carrying out fusion processing on the component dependency information and the running environment information of the component to be generated in each component running environment to obtain the running configuration information of the component to be generated in each component running environment.
3. The method according to claim 1, wherein updating the initial component information by using operation configuration information of the component to be generated in at least two component operation environments to obtain target component information of the component to be generated in each component operation environment includes:
acquiring operation configuration information of the component to be generated in at least two component operation environments, and a position identifier in the initial component information;
and adding each piece of operation configuration information to the corresponding position in the initial component information according to each piece of position identifier to obtain target component information of the component to be generated in each component operation environment.
4. The method according to claim 1, wherein before the target component information of the component to be generated in each component operation environment is fused to obtain fused component information of the component to be generated, the method further comprises:
Generating preview components under each component operation environment according to the target component information of the components to be generated under each component operation environment;
verifying the function information of the preview component in the running environment of each component;
the fusing processing is performed on the target component information of the component to be generated in each component operation environment to obtain fused component information of the component to be generated, including:
and under the condition that the function information verification of the preview component in each component running environment is passed, carrying out fusion processing on the target component information of the component to be generated in each component running environment to obtain the fusion component information of the component to be generated.
5. The method according to any one of claims 1 to 4, wherein the obtaining initial component information of the component to be generated includes:
determining a component information template matched with the component to be generated from a component information template library;
and generating initial component information of the component to be generated according to the component information template.
6. A component generating method, applied to a terminal, the method comprising:
acquiring fusion component information of a component to be generated; the fusion component information of the component to be generated is obtained by fusion processing of target component information of the component to be generated in each component operation environment; the target component information of the component to be generated in each component operation environment is obtained by updating the initial component information of the component to be generated by utilizing the operation configuration information of the component to be generated in at least two component operation environments respectively;
Acquiring target component information corresponding to the component running environment of the terminal from the fused component information;
and generating a corresponding component according to the acquired target component information.
7. The method according to claim 6, wherein the obtaining, from the fused component information, target component information corresponding to a component running environment of the terminal includes:
determining a target component information identifier corresponding to a component running environment of the terminal;
and acquiring target component information corresponding to the target component information identifier from the fused component information, and taking the target component information as target component information corresponding to the component running environment of the terminal.
8. The method of claim 6, further comprising, prior to generating the corresponding component from the acquired target component information:
storing the obtained target component information into a preset file;
the generating a corresponding component according to the obtained target component information comprises the following steps:
responding to a component generating request aiming at the component to be generated, and extracting the acquired target component information from the preset file;
and generating a corresponding component according to the extracted target component information.
9. A component generating apparatus, comprising:
an information acquisition unit configured to perform acquisition of initial component information of a component to be generated;
the information updating unit is configured to execute updating of the initial component information by utilizing operation configuration information of the component to be generated in at least two component operation environments respectively to obtain target component information of the component to be generated in each component operation environment;
the information fusion unit is configured to perform fusion processing on target component information of the component to be generated in each component operation environment to obtain fusion component information of the component to be generated; the fusion component information is used for the terminal to acquire target component information corresponding to the component operation environment of the terminal from the fusion component information, and generate a corresponding component according to the acquired target component information.
10. A component generating apparatus, applied to a terminal, comprising:
a first acquisition unit configured to perform acquisition of fusion component information of a component to be generated; the fusion component information of the component to be generated is obtained by fusion processing of target component information of the component to be generated in each component operation environment; the target component information of the component to be generated in each component operation environment is obtained by updating the initial component information of the component to be generated by utilizing the operation configuration information of the component to be generated in at least two component operation environments respectively;
A second acquisition unit configured to perform acquisition of target component information corresponding to a component operation environment of the terminal from the fused component information;
and the component generating unit is configured to execute the generation of the corresponding component according to the acquired target component information.
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 generation method of any of claims 1 to 8.
12. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the component generating method of any one of claims 1 to 8.
CN202310817365.2A 2023-07-05 2023-07-05 Component generation method, device, electronic equipment and storage medium Pending CN116954713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310817365.2A CN116954713A (en) 2023-07-05 2023-07-05 Component generation method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310817365.2A CN116954713A (en) 2023-07-05 2023-07-05 Component generation method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116954713A true CN116954713A (en) 2023-10-27

Family

ID=88450389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310817365.2A Pending CN116954713A (en) 2023-07-05 2023-07-05 Component generation method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116954713A (en)

Similar Documents

Publication Publication Date Title
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
CN111221559B (en) Application updating method, device, storage medium, terminal and server
CN111273899B (en) Code processing method, device, electronic equipment and storage medium
CN111736916A (en) Dynamic expansion method and device based on Java language, electronic equipment and storage medium
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN113377370A (en) File processing method and device, electronic equipment and storage medium
CN112114814A (en) Compiled file determining method and device and application program generating method and device
CN115373763B (en) Plug-in loading method and device, electronic equipment and storage medium
CN112631695B (en) Data verification method and device, electronic equipment and storage medium
CN111596980B (en) Information processing method and device
CN112445484B (en) Register processing method and device, electronic equipment and storage medium
CN111338961B (en) Application debugging method and device, electronic equipment and storage medium
CN114546436A (en) Micro front-end service updating method and device, electronic equipment and storage medium
CN116954713A (en) Component generation method, device, electronic equipment and storage medium
CN110989987B (en) Portal webpage generation method and device, client, server and storage medium
CN111831292A (en) Method and device for generating installation package, storage medium and electronic equipment
CN109933357B (en) Application program upgrading method and device
CN111597106A (en) Point burying management method and device
CN113407879A (en) Data reporting method, device and readable medium
CN111596949B (en) Method and device for developing application program
CN111124553B (en) Program execution method, device, terminal and storage medium
CN113342355B (en) Code compiling method and device, electronic equipment and storage medium
CN116450534B (en) Method, device, equipment and medium for generating mobile terminal application program
CN113867992B (en) Call chain resource isolation method and device, storage medium and electronic equipment
CN110647351B (en) Source code map file restoration method, device and 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