Component generation method and device, computer-readable storage medium and electronic equipment
1. A component generation method, comprising:
acquiring a target code segment for generating a page with a preset function;
determining at least one object code unit from the object code snippet for generating an application component;
extracting the basic components corresponding to the target code unit from at least one component library respectively, wherein the at least one component library corresponds to a component display page respectively;
generating at least one presentation component based on the extracted at least one base component based on the object code unit;
and for the display component included by the at least one display component, displaying the display component on a component display page corresponding to the display component.
2. The method of claim 1, wherein said determining, from the target code snippet, a target code unit for generating an application component comprises:
determining a target component identification from the target code snippet;
and determining the code unit containing the target component identification as a target code unit.
3. The method of claim 2, wherein the extracting the basic components corresponding to the target code unit from at least one pre-established component library respectively comprises:
and respectively extracting the basic components corresponding to the component identifications from at least one pre-established component library as the basic components corresponding to the target code unit based on the corresponding relation between the pre-established component identifications and the basic components.
4. The method of claim 1, wherein the generating, based on the object code unit, at least one presentation component based on the extracted at least one base component comprises:
determining component attribute information from the object code unit;
generating at least one presentation component based on the at least one base component based on the component attribute information.
5. The method according to one of claims 1 to 4, wherein the at least one component library is generated beforehand based on:
determining basic components with the same functions from at least one preset original component library;
and marking the basic components with the same functions as the same component identification to obtain the at least one component library.
6. A component generation apparatus comprising:
the acquisition module is used for acquiring a target code segment of a page for generating a preset function;
a determination module to determine an object code unit from the object code snippet for generating an application component;
the extracting module is used for respectively extracting the basic components corresponding to the target code unit from at least one component library, wherein the at least one component library respectively corresponds to a component display page;
a generating module for generating at least one presentation component based on the extracted at least one base component based on the object code unit;
and the display module is used for displaying the display component on a component display page corresponding to the display component for the display component included by the at least one display component.
7. The apparatus of claim 6, wherein the means for determining comprises:
a first determining unit, configured to determine a target component identification from the target code segment;
a second determining unit, configured to determine a code unit containing the target component identifier as a target code unit;
preferably, the extraction module is further configured to:
and respectively extracting the basic components corresponding to the component identifications from at least one pre-established component library as the basic components corresponding to the target code unit based on the corresponding relation between the pre-established component identifications and the basic components.
8. A computer-readable storage medium, the storage medium storing a computer program for performing the method of any of the preceding claims 1-5.
9. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize the method of any one of the claims 1 to 5.
10. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 5.
Background
The web page form is an important element in internet web pages for collecting user input. In a large number of application scenarios of electronic information entry, a webpage form records information input by a user, and when the user requests to submit the form, the information input by the user is submitted to a server, so that interaction and storage of form data are realized. Currently, web forms can be applied to various types of terminals, such as personal computers, mobile phones, tablet computers, and the like, and the web forms can be set on browsers installed on the terminals.
At present, in order to enable a user to fill in forms at multiple terminals at the same time, it is generally required to develop forms supporting different types of terminals respectively.
Disclosure of Invention
The embodiment of the disclosure provides a component generation method and device, a computer-readable storage medium and an electronic device.
An embodiment of the present disclosure provides a component generation method, including: acquiring a target code segment for generating a page with a preset function; determining an object code unit for generating an application component from the object code snippet; extracting basic components corresponding to the target code unit from at least one component library respectively, wherein the at least one component library corresponds to a component display page respectively; generating at least one presentation component based on the extracted at least one base component based on the object code unit; and for the display component included by at least one display component, displaying the display component on a component display page corresponding to the display component.
In some embodiments, determining the target code unit from the target code snippet for generating the application component comprises: determining a target component identification from the target code fragment; the code unit containing the target component identification is determined to be the target code unit.
In some embodiments, extracting the basic components corresponding to the target code unit from at least one pre-established component library respectively comprises: and respectively extracting the basic components corresponding to the component identifications from at least one pre-established component library as the basic components corresponding to the target code unit based on the corresponding relation between the pre-established component identifications and the basic components.
In some embodiments, generating at least one presentation component based on the extracted at least one base component based on the object code unit comprises: determining component attribute information from the object code unit; based on the component attribute information, at least one presentation component is generated based on the at least one base component.
In some embodiments, the at least one component library is generated in advance based on the steps of: determining basic components with the same functions from at least one preset original component library; and marking the basic components with the same functions as the same component identification to obtain at least one component library.
According to another aspect of the embodiments of the present disclosure, there is provided a component generation apparatus including: the acquisition module is used for acquiring a target code segment of a page for generating a preset function; a determination module for determining an object code unit from the object code snippet for generating the application component; the extraction module is used for respectively extracting the basic components corresponding to the target code unit from at least one component library, wherein the at least one component library respectively corresponds to a component display page; a generating module for generating at least one presentation component based on the extracted at least one base component based on the object code unit; and the display module is used for displaying the display component on a component display page corresponding to the display component for the display component included by at least one display component.
In some embodiments, the determining module comprises: a first determining unit, configured to determine a target component identifier from the target code segment; a second determining unit for determining the code unit containing the target component identification as the target code unit.
In some embodiments, the extraction module is further to: and respectively extracting the basic components corresponding to the component identifications from at least one pre-established component library as the basic components corresponding to the target code unit based on the corresponding relation between the pre-established component identifications and the basic components.
In some embodiments, the generating module comprises: a third determining unit for determining component attribute information from the object code unit; and the generating unit is used for generating at least one display component on the basis of the at least one basic component based on the component attribute information.
In some embodiments, the at least one component library is generated in advance based on the steps of: determining basic components with the same functions from at least one preset original component library; and marking the basic components with the same functions as the same component identification to obtain at least one component library.
According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the above-described component generation method.
According to another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; and the processor is used for reading the executable instructions from the memory and executing the instructions to realize the component generation method.
According to another aspect of an embodiment of the present disclosure, there is provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the above-described component generation method.
Based on the component generation method, the device, the computer-readable storage medium and the electronic device provided by the above embodiments of the present disclosure, an object code unit for generating a preset type of component is determined from an object code fragment, basic components corresponding to the object code unit are respectively extracted from at least one pre-established component library, then at least one display component is generated based on the object code unit and the extracted at least one basic component, and finally each display component is respectively displayed to a corresponding component display page. The display component is generated according to the code segment, so that components of preset types do not need to be developed independently for component display pages of different types, the page design speed is improved, and the manpower consumed for designing the component display pages of different types is saved.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a system diagram to which the present disclosure is applicable.
Fig. 2 is a flowchart illustrating a component generation method according to an exemplary embodiment of the present disclosure.
FIG. 3 is a schematic diagram of one application scenario of the component generation method of the embodiments of the present disclosure.
Fig. 4 is a schematic structural diagram of a component generation apparatus according to an exemplary embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of a component generation apparatus according to another exemplary embodiment of the present disclosure.
Fig. 6 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure.
Detailed Description
Hereinafter, example embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of the embodiments of the present disclosure and not all embodiments of the present disclosure, with the understanding that the present disclosure is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Summary of the application
At present, in order to enable a user to fill in forms at multiple terminals at the same time, it is generally required to develop forms supporting different types of terminals respectively. For the form realizing a certain function, although the contents of the forms applied on various terminals are the same, because the development components used for developing the forms supported by different types of terminals are different, the same form needs to be performed twice, and the development time is wasted.
Exemplary System
Fig. 1 illustrates an exemplary system architecture 100 to which a component generation method or a component generation apparatus of an embodiment of the present disclosure may be applied.
As shown in fig. 1, system architecture 100 may include terminal device 101, network 102, and server 103. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with server 103 over network 102 to receive or send messages and the like. The terminal device 101 may have various communication client applications installed thereon, such as a web browser application, a search-type application, a shopping-type application, an instant messaging tool, and the like.
The terminal device 101 may be various electronic devices including, but not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), etc., and a fixed terminal such as a digital TV, a desktop computer, etc.
The server 103 may be a server that provides various services, such as a background form server that analyzes code snippets uploaded by the terminal device 101. The background form server may process the obtained code fragments to obtain a processing result (e.g., at least one display component with the same function but different types).
It should be noted that the component generation method provided in the embodiment of the present disclosure may be executed by the server 103 or the terminal device 101, and accordingly, the component generation apparatus may be provided in the server 103 or the terminal device 101.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. In the case where the target code segment does not need to be obtained remotely, the system architecture described above may not include a network, and only include a server or a terminal device.
Exemplary method
Fig. 2 is a flowchart illustrating a component generation method according to an exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device (such as the terminal device 101 or the server 103 shown in fig. 1), and as shown in fig. 2, the method includes the following steps:
step 201, acquiring a target code segment for generating a page with a preset function.
In this embodiment, the electronic device may obtain, locally or remotely, a target code segment of a page configured in advance for generating preset functions. The page with the preset function may be various types of pages, for example, a web form type page. The target code segment may include relevant content of the page, and a corresponding page may be generated according to the content. The target code fragments may be various types of code fragments, such as JSON code fragments.
At step 202, an object code unit for generating an application component is determined from the object code snippet.
In this embodiment, the electronic device may determine the object-code units from the object-code snippet that are used to generate the application components. Wherein the object code unit corresponds to an application component. The object code snippet may include a plurality of code units for generating application components (e.g., buttons, menus, text boxes, etc.), i.e., each code unit corresponds to an application component. The electronic device may select target code units from the code units, for example, sequentially selecting the code units in order as the target code units.
Step 203, extracting the basic components corresponding to the target code unit from at least one component library respectively.
In this embodiment, the electronic device may extract the basic components corresponding to the object code unit from at least one pre-established component library, where the at least one component library corresponds to a component display page. As an example, two fact component libraries may be pre-established, one for providing a component applied to a presentation page on an H5 side (e.g., a terminal such as a mobile phone, a tablet computer, etc.), and one for applying to a presentation page on a PC side (e.g., a terminal such as a desktop computer, a notebook computer, etc.). The electronic device may extract the base component from the two component libraries separately.
Step 204, based on the object code unit, generating at least one display component based on the extracted at least one basic component.
In this embodiment, the electronic device may generate at least one presentation component based on the extracted at least one base component based on the object code unit. The basic component is a component initialized in advance, generally, the object code unit may include information such as a component identifier and an attribute configured by a user, and the electronic device may generate the presentation component based on the information on the basis of the basic component. For the same object code unit, since at least one presentation component generated based on the object code unit all corresponds to the object code unit, the at least one presentation component corresponding to the same object code unit has the same function. For example, based on a certain object code unit, two text boxes with the same function are generated, and the two text boxes are respectively applied to the H5 side and the PC side.
In step 205, for a display component included in at least one display component, the display component is displayed on a component display page corresponding to the display component.
In this embodiment, for a display component included in at least one display component, the electronic device may display the display component on a component display page corresponding to the display component. As an example, step 204 generates two textbox components with the same function, wherein one is applied to the page at the H5 end, and the other is applied to the page at the PC end, and then the corresponding presentation components can be rendered in the page at the H5 end and the page at the PC end, respectively.
It should be appreciated that by extracting object code units from object code snippets multiple times and performing the steps described above, multiple presentation components may be displayed in one type of component presentation page, resulting in a complete component presentation page.
In the method provided by the above embodiment of the present disclosure, an object code unit for generating a preset type of component is determined from an object code fragment, the basic components corresponding to the object code unit are respectively extracted from at least one pre-established component library, then, based on the object code unit, at least one display component is generated on the basis of the extracted at least one basic component, and finally, each display component is respectively displayed on a corresponding component display page. The display component with the same function under different types of component display pages can be generated according to one section of code segment, so that components of preset types do not need to be developed independently for different types of component display pages, the page design speed is improved, and the manpower consumed by designing different types of component display pages is saved.
In some alternative implementations, the step 202 may be performed as follows:
first, a target component identification is determined from the target code fragment.
Wherein the target code segment may include a plurality of component identifications, the electronic device may select (e.g., sequentially select in order) one or more component identifications from the plurality of component identifications as the target component identification.
The code unit containing the target component identification is then determined to be the target code unit.
The implementation mode can accurately extract the code unit for generating a certain application component from the target code segment by determining the target code unit according to the target component identification.
In some alternative implementations, step 303 may be performed as follows:
and respectively extracting the basic components corresponding to the component identifications from at least one pre-established component library as the basic components corresponding to the target code unit based on the corresponding relation between the pre-established component identifications and the basic components.
The corresponding relationship between the component identifier and the basic component can be pre-established based on a table and the like.
As an example, if the component is identified as "text", and the two component libraries are a component library applied to the H5 side and a component library applied to the PC side, respectively, a text box component applied to the H5 side and a text box component applied to the PC side may be extracted from the two component libraries, respectively.
According to the implementation mode, the corresponding basic components are respectively extracted from each component library based on the component identification, so that at least one component with the same function can be quickly and accurately extracted, and the efficiency of generating the display components applied to various scenes is improved.
In some alternative implementations, step 204 may be performed as follows:
first, component attribute information is determined from the object code unit.
The component attribute information is used for characterizing the characteristics of the presentation component to be generated, such as the name, description, candidate item and the like of the presentation component.
Then, based on the component attribute information, at least one presentation component is generated based on the at least one base component.
As an example, if the component of the underlying component is identified as "text" and its type is a text box, the component attribute information may include a name of the text box, such as "house number", which may be displayed at a corresponding position of the text box on the presentation interface.
The realization mode realizes that the attribute information of the components is configured by the user according to the service requirements in advance, and then the display components suitable for various types of pages are automatically generated according to the attribute information of the components, thereby further improving the flexibility and the efficiency of generating the display components.
In some optional implementations, the at least one component library is generated in advance based on the following steps:
firstly, basic components with the same functions are determined from at least one preset original component library.
The original component library may be a component library set in advance for different types of pages, and the original component library includes source codes of various types of basic components.
And then marking the basic components with the same functions as the same component identification to obtain at least one component library.
Specifically, the electronic device can set component identifications for the functionally identical base components based on operations that the user sets the component representations. The original component library after the component identifier is set may be at least one component library used by the component generation method of the present disclosure, or the basic component having the same component identifier is stored again to obtain at least one component library used by the component generation method of the present disclosure.
According to the implementation mode, the component identification is set for the basic component in the original component library, so that the component library which supports the generation of the display components with the same function but different types can be obtained, and the speed of page design is improved.
Referring to fig. 3, as an application scenario of the component generation method of the present disclosure, fig. 3 provides schematic diagrams of two types of component presentation page generation processes. Wherein 301 is a target code segment in the form of JSON, and is used for generating a form generation page. 302 and 303 respectively generate a form generation page at the H5 side and a form generation page at the PC side, which are generated from the target code fragment 301. In the object code fragment 301, three component identifications of "text", "select", and "button" are included, which respectively represent a text box component, a selection component, and a button component. The component identifies the code unit in which it is located, i.e. the object code unit, e.g. 301a, 301b, 301 c. And the electronic equipment respectively extracts the basic components corresponding to the target code units from a preset component library applied to the H5 end and a preset component library applied to the PC end according to the component identifications. Then, the electronic device extracts component attribute information from the three object code units, respectively.
For example, for a target code unit corresponding to "text", the included component attribute information includes "label: house number ", from the component attribute information, a text box for inputting the house number is obtained as shown in 301 and 302. Similarly, for the object code unit corresponding to "select", the pull-down menu component for selecting the house source type is obtained as shown in 301 and 302 according to the component attribute information included in the object code unit. For the object code unit corresponding to the button, the submit button shown in 301 and 302 is obtained according to the component attribute information included therein.
Exemplary devices
Fig. 4 is a schematic structural diagram of a component generation apparatus according to an exemplary embodiment of the present disclosure. The present embodiment can be applied to an electronic device, and as shown in fig. 4, the component generating apparatus includes: an obtaining module 401, configured to obtain a target code segment of a page for generating a preset function; a determining module 402 for determining an object code unit from the object code snippet for generating the application component; an extracting module 403, configured to extract basic components corresponding to the target code unit from at least one component library respectively, where the at least one component library corresponds to a component display page respectively; a generating module 404 for generating at least one presentation component based on the extracted at least one base component based on the object code unit; a display module 405, configured to display, for a display component included in at least one display component, the display component on a component display page corresponding to the display component.
In this embodiment, the obtaining module 401 may obtain, locally or remotely, a target code segment of a page configured in advance for generating preset functions. The page with the preset function may be various types of pages, for example, a web form type page. The target code segment may include relevant content of the page, and a corresponding page may be generated according to the content. The target code fragments may be various types of code fragments, such as JSON code fragments.
In this embodiment, the determination module 402 may determine the target code unit for generating the application component from the target code segment. Wherein the object code unit corresponds to an application component. The object code snippet may include a plurality of code units for generating application components (e.g., buttons, menus, text boxes, etc.), i.e., each code unit corresponds to an application component. The determination module 402 may select a target code unit from the code units, e.g., sequentially selecting the code units in order as the target code unit.
In this embodiment, the extracting module 403 may respectively extract the basic components corresponding to the target code unit from at least one pre-established component library, where the at least one component library corresponds to a component display page. As an example, two fact component libraries may be pre-established, one for providing a component applied to a presentation page on an H5 side (e.g., a terminal such as a mobile phone, a tablet computer, etc.), and one for applying to a presentation page on a PC side (e.g., a terminal such as a desktop computer, a notebook computer, etc.). The extraction module 403 may extract the base component from the two component libraries, respectively.
In this embodiment, the generating module 404 may generate at least one presentation component based on the extracted at least one base component based on the object code unit. The basic component is a component that is initialized in advance, generally, the object code unit may include information such as a component identifier and an attribute configured by a user, and the generating module 404 may generate the presentation component based on the information on the basic component. Each of the generated presentation components corresponds to an object code unit, and thus, the functions of each presentation component are the same.
In this embodiment, for a display component included in at least one display component, the display module 405 may display the display component on a component display page corresponding to the display component. As an example, step 204 generates two textbox components with the same function, wherein one is applied to the page at the H5 end, and the other is applied to the page at the PC end, and then the corresponding presentation components can be rendered in the page at the H5 end and the page at the PC end, respectively.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a component generation apparatus according to another exemplary embodiment of the present disclosure.
In some optional implementations, the determining module 402 includes: a first determining unit 4021, configured to determine a target component identifier from the target code segment; a second determining unit 4022, configured to determine the code unit containing the target component identifier as a target code unit.
In some optional implementations, the extraction module 403 is further configured to: and respectively extracting the basic components corresponding to the component identifications from at least one pre-established component library as the basic components corresponding to the target code unit based on the corresponding relation between the pre-established component identifications and the basic components.
In some optional implementations, the generating module 404 includes: a third determining unit 4041 configured to determine component attribute information from the target code unit; the generating unit 4042 is configured to generate at least one display component based on the at least one basic component based on the component attribute information.
In some optional implementations, the at least one component library is generated in advance based on the following steps: determining basic components with the same functions from at least one preset original component library; and marking the basic components with the same functions as the same component identification to obtain at least one component library.
The component generation apparatus provided in the foregoing embodiment of the present disclosure determines, from the target code segment, a target code unit for generating a component of a preset type, extracts, from at least one component library established in advance, the base components corresponding to the target code unit, respectively, then generates, based on the target code unit, at least one display component on the basis of the extracted at least one base component, and finally displays each display component on a corresponding component display page, respectively. The display component with the same function under different types of component display pages can be generated according to one section of code segment, so that components of preset types do not need to be developed independently for different types of component display pages, the page design speed is improved, and the manpower consumed by designing different types of component display pages is saved.
Exemplary electronic device
Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 6. The electronic device may be either or both of the terminal device 101 and the server 103 as shown in fig. 1, or a stand-alone device separate from them, which may communicate with the terminal device 101 and the server 103 to receive the collected input signals therefrom.
FIG. 6 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure.
As shown in fig. 6, the electronic device 600 includes one or more processors 601 and memory 602.
The processor 601 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 600 to perform desired functions.
The memory 602 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, Random Access Memory (RAM), cache memory (or the like). The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer-readable storage medium and executed by the processor 601 to implement the component generation methods of the various embodiments of the disclosure above and/or other desired functions. Various content such as object code segments, code for application components, and the like may also be stored in the computer-readable storage medium.
In one example, the electronic device 600 may further include: an input device 603 and an output device 604, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, when the electronic device is the terminal device 101 or the server 103, the input device 603 may be a mouse, a keyboard, or the like, for inputting the target code segment. When the electronic device is a stand-alone device, the input means 603 may be a communication network connector for receiving the input object code segments from the terminal device 101 and the server 103.
The output device 604 may output various information to the outside, including presentation components. The output devices 604 may include, for example, a display, a printer, and a communication network and its connected remote output devices, among others.
Of course, for simplicity, only some of the components of the electronic device 600 relevant to the present disclosure are shown in fig. 6, omitting components such as buses, input/output interfaces, and the like. In addition, electronic device 600 may include any other suitable components depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the component generation method according to various embodiments of the present disclosure described in the "exemplary methods" section of this specification above.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a component generation method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Exemplary computer program
The embodiments of the present disclosure also provide a computer program product, which includes a computer program/instruction, and when the computer program/instruction is executed by a processor, the method for generating a component in any of the foregoing possible implementation manners may be implemented.
The computer program product may be embodied in hardware, software or a combination thereof. In one alternative, the computer program product is embodied in a computer storage medium, and in another alternative, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.