CN116009852A - Code construction method, device, computer equipment and storage medium - Google Patents

Code construction method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116009852A
CN116009852A CN202310089206.5A CN202310089206A CN116009852A CN 116009852 A CN116009852 A CN 116009852A CN 202310089206 A CN202310089206 A CN 202310089206A CN 116009852 A CN116009852 A CN 116009852A
Authority
CN
China
Prior art keywords
template
target
code
sub
identifier
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
CN202310089206.5A
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.)
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanrong Lianyi Information Technology Service 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 Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd filed Critical Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority to CN202310089206.5A priority Critical patent/CN116009852A/en
Publication of CN116009852A publication Critical patent/CN116009852A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a code construction method, a code construction device, computer equipment and a storage medium. The method comprises the following steps: determining a target template identification according to a template selection instruction of a user; displaying a target parameter configuration page corresponding to the target template identifier; receiving target configuration parameters input by a user based on the target parameter configuration page; determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code; and constructing an object code according to the object template code and the object configuration parameters. The template code library is preset in the scheme, and the user can construct the target code by only selecting the target template identifier corresponding to the target template code and inputting the target configuration parameters in the corresponding target parameter configuration page.

Description

Code construction method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a code construction method, a code construction device, a computer device, and a storage medium.
Background
With the continuous development of internet technology, various software development demands are greatly emerging. However, in some data analysis systems today, developers often need to write duplicate data analysis logic.
For example, a developer writes the data analysis logic code a in small pieces, then the developer uses the data analysis logic code B Li Bianxie, and the last comparison finds that the implementation logic of the developer is almost the same or almost the same, but only a few input parameters are different, or uses the data analysis logic code B Li Bianxie to add some calculation logic based on the data analysis logic code a, which wastes a great deal of repeated development work and results in low development efficiency.
Disclosure of Invention
The embodiment of the application provides a code construction method, a code construction device, computer equipment and a storage medium, which can improve the development efficiency of codes.
In a first aspect, an embodiment of the present application provides a code construction method, including:
determining a target template identification according to a template selection instruction of a user;
displaying a target parameter configuration page corresponding to the target template identifier;
receiving target configuration parameters input by a user based on the target parameter configuration page;
determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code;
and constructing an object code according to the object template code and the object configuration parameters.
In a second aspect, an embodiment of the present application further provides a code construction apparatus, including a transceiver unit and a processing unit, where:
the processing unit is used for determining a target template identification according to a template selection instruction of a user; displaying a target parameter configuration page corresponding to the target template identifier;
the receiving and transmitting unit is used for receiving target configuration parameters input by a user based on the target parameter configuration page;
the processing unit is further used for determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code; and constructing an object code according to the object template code and the object configuration parameters.
In a third aspect, embodiments of the present application further provide a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the above-described method.
The embodiment of the application provides a code construction method, a code construction device, computer equipment and a storage medium. Wherein the method comprises the following steps: determining a target template identification according to a template selection instruction of a user; displaying a target parameter configuration page corresponding to the target template identifier; receiving target configuration parameters input by a user based on the target parameter configuration page; determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code; and constructing an object code according to the object template code and the object configuration parameters. In the scheme, a template code library is preset, a user only needs to select a target template identifier corresponding to a target template code and input target configuration parameters in a corresponding target parameter configuration page to construct the target code, the developed template code is stored in the template code library, and the required target template code is flexibly called from the template code library when in use, so that repeated development of the code is avoided, and meanwhile, the template code in the template code library is used for constructing the code, so that the workload of developers can be reduced, and the development efficiency of the code is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a code construction method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a template layer in a code construction method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a code construction system according to an embodiment of the present application;
FIG. 4 is a schematic block diagram of a code construction apparatus provided in an embodiment of the present application;
fig. 5 is a schematic block diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The embodiment of the application provides a code construction method, a code construction device, computer equipment and a storage medium.
The execution body of the code construction method may be a code construction device provided in the embodiment of the present application, or a computer device integrated with the code construction device, where the code construction device may be implemented in a hardware or software manner, and the computer device may be a terminal or a server, and the terminal may be a user terminal such as a smart phone, a tablet computer, a palm computer, or a notebook computer, and the code construction method provided in the present application is described in detail below using the user terminal as an execution body.
Fig. 1 is a schematic flow chart of a code construction method according to an embodiment of the present application. As shown in fig. 1, the method includes the following steps S110 to S150.
S110, determining a target template identification according to a template selection instruction of a user.
Specifically, in some embodiments, in order to improve the convenience of selecting the target template identifier by the user, step S110 includes: the user terminal displays a template selection interface, wherein the template selection interface displays candidate template icons corresponding to a plurality of candidate template identifiers respectively, then receives a template selection instruction of a user for target template icons in the candidate template icons, and finally responds to the template selection instruction, and determines a target template identifier corresponding to the target template icon from the candidate template identifiers according to a preset corresponding relation between the template icon and the template identifier.
The user can identify which template code corresponds to the candidate template icon according to the content displayed by the candidate template icon, and the content displayed by the candidate template icon in this embodiment may be the content of the corresponding template identifier, for example, "beijing weather", where the template identifier corresponding to the "beijing weather" icon is also "beijing weather".
In other embodiments, in order to facilitate the user to accurately find the corresponding template code, the terminal interface may provide an input box of the template identifier, where the user may input the template identifier in the input box, for example, directly input "beijing weather"; or inputting a search keyword corresponding to the template identifier (for example, the user inputs remark information of the code when developing the template code), for example, "Beijing", at this time, the user terminal displays the template identifier related to "Beijing" in a preset template identifier library, for example, "Beijing weather" and "Beijing client growth rate" and the like, and then the user further selects the target template identifier "Beijing weather" from the displayed data.
S120, displaying a target parameter configuration page corresponding to the target template identifier.
In this embodiment, different parameter configuration interfaces are provided for each template code stored in the template code library, and corresponding parameter input boxes are displayed in the parameter configuration interfaces.
For example, an input box of "date" is displayed in the target parameter configuration page corresponding to "beijing weather".
S130, receiving target configuration parameters input by a user based on the target parameter configuration page.
For example, the user inputs the corresponding "date" as the target configuration parameter in the "date" input box in the target parameter configuration page corresponding to "Beijing weather", and then the required Beijing weather acquisition code can be constructed according to the target configuration parameter.
S140, determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code.
In this embodiment, a plurality of template codes are preset in a template code library, and a corresponding template identifier is set for each template code, and in this embodiment, a target template code corresponding to the target template identifier needs to be determined from the preset template code library according to the corresponding relationship between the preset template identifier and the template code.
It should be noted that, before executing step S140, a template code library needs to be first constructed to develop a plurality of template codes, and in this application, the developed template codes are used as a set of template fields.
For example, a tag string of "Beijing weather" is determined, and then a developer uses the tag string to develop business logic (i.e. develop a corresponding template code), the developer does not need what the Beijing weather is at that time, and does not pay attention to, and as long as the developer uses the tag string, the specific value of the tag string (i.e. the template code corresponding to the template identifier) should be obtained by parsing by a different tag parameter parser by the system underframe when actually executed.
Based on the idea, marking annotation character strings of various languages can be defined, for example, different marking annotation character strings are defined by what we need to mark, and the lower part is definable marking character string notes:
for example, manually designating parameter tag character string annotation "@ IndexParam (" parameter name ")", wherein the input of the annotation (keyword) is a parameter name, and the specific value of the parameter name is manually designated;
for example, the weather tag character string notes "@ Wether (" Beijing weather ")", the notes input is a city, and a developer can write the arithmetic logic (i.e. develop a corresponding code template) by using the weather of "Beijing weather";
such as the business information tag string notes "@ Company (" business ")", the notes input is for a business, and the developer can use the business' information to develop data analysis logic (i.e., develop the corresponding code templates).
In some embodiments, the target template icon includes a plurality of sub-target template icons, the template selection instruction includes a template drag instruction for each of the sub-target template icons, the target template identifier includes a sub-target template identifier corresponding to each of the sub-target template icons, and the target configuration parameter includes a sub-target configuration parameter corresponding to each of the sub-target template identifiers; at this time, the determining, according to the correspondence between the preset template identifier and the template code, the target template code corresponding to the target template identifier from the preset template code library includes: and determining sub-target template codes respectively corresponding to the sub-target template identifiers from the template code library according to the corresponding relation between the template identifiers and the template codes.
For example, the user may drag the plurality of candidate template icons displayed on the template selection interface, for example, drag the sub-target template icon a and the sub-target template icon B in sequence, and after the drag is completed, the display interface may display the target parameter configuration pages corresponding to the sub-target template identifiers in sequence or simultaneously, and obtain the sub-target configuration parameters corresponding to the sub-target template identifiers based on the corresponding target parameter configuration pages.
S150, constructing an object code according to the object template code and the object configuration parameters.
Specifically, in some embodiments, when the target template icon includes a plurality of sub-target template icons, the template selection instruction includes a template drag instruction for each sub-target template icon, the target template identifier includes a sub-target template identifier corresponding to each sub-target template icon, and the target configuration parameter includes a sub-target configuration parameter corresponding to each sub-target template identifier, the constructing a target code according to the target template code and the target configuration parameter includes: determining the scheduling sequence of the sub-target template codes according to the template dragging instruction; and constructing the target codes according to the scheduling sequence, each sub-target template code and each sub-target configuration parameter.
In this embodiment, the scheduling sequence of each sub-target template code may be determined according to the triggering sequence of the template drag instruction corresponding to each sub-target template code, or the scheduling sequence of each sub-target template code may be determined according to the drag position of each sub-target template icon, for example, the target template icon a and the sub-target template icon B are respectively dragged, and the target template icon B is dragged to the rear of the sub-target template icon a, where the calling sequence is to call the target template icon a first and then call the target template icon B.
At this time, when the object code is constructed, a code channel between the sub-object template codes needs to be established according to the calling sequence, for example, the output of the sub-object template code corresponding to the object template icon a is used as the input of the sub-object template code corresponding to the object template icon B, and the corresponding sub-object configuration parameters are filled into the corresponding positions of the corresponding sub-object template codes through each analysis sub-object configuration parameter and each sub-object template code.
Specifically, the application is configured with a corresponding marking parameter analyzer, which is used for analyzing the configuration parameters input by the user through the target parameter configuration page and the template codes corresponding to the target template identifications, further analyzing to obtain the corresponding target configuration parameters (or sub-target configuration parameters) and the target template codes (or sub-target template codes), and then filling the corresponding target configuration parameters (or sub-target configuration parameters) into the corresponding positions of the corresponding target template codes (or sub-target template codes).
Further, the constructing the object code according to the scheduling order, each sub-object template code, and each sub-object configuration parameter includes: determining a target compiler from a compiler database according to the language type of the sub-target template code; and constructing the target codes according to the scheduling sequence, the sub-target template codes and the sub-target configuration parameters based on the target compiler.
Specifically, the embodiment can develop template codes with multiple language types, compilers corresponding to the language types are built in a compiler database, the language types of target template codes (or sub-target template codes) can be automatically identified when target code construction is carried out later, then the target compilers are determined according to the corresponding language types, and finally the target codes are constructed according to the scheduling sequence, the sub-target template codes and the sub-target configuration parameters based on the target compilers.
In some embodiments, to avoid repeated compilations of template code, the method further includes, prior to said building of target code from the target template code and the target configuration parameters: and determining whether the target template code is a historical construction code according to a preset constructed template identification set and the target template identification.
Specifically, in this embodiment, a set of constructed template identifiers is preset, in which template identifiers corresponding to each constructed template code are stored, and if a target template identifier is stored in the set of constructed template identifiers, it is indicated that the target template code corresponding to the target template identifier has been constructed (i.e., compiled).
At this time, the constructing the object code according to the object template code and the object configuration parameter includes: if the target template code is not the history construction code, constructing the target code according to the target template code and the target configuration parameters.
That is, to avoid repetition of compilation, the present embodiment performs compilation construction only on code that has not been constructed.
In addition, if the target template code is the history construction code, determining a target execution code from a preset history construction code library; and generating the target code according to the target execution code and the target configuration parameters.
Specifically, the history construction code library stores the execution codes of each constructed template code, at this time, if the target template code is found to be constructed, the target execution code corresponding to the target template identifier is directly obtained from the history construction code library, and then the target configuration parameter is directly added (or replaced) to the parameter position corresponding to the target execution code, so that the construction of the target code can be realized.
In some embodiments, the present embodiment may further develop a code based on an existing template code, where before the constructing the object code according to the object template code and the object configuration parameter, the method further includes: receiving a new template code input by a user; at this time, the constructing the object code according to the object template code and the object configuration parameter includes: and constructing the target code according to the new template code, the target template code and the target configuration parameters.
At this time, a developer can further develop codes on the basis of the existing template codes, repeated writing of the codes is avoided, and development efficiency is improved. For example, as shown in FIG. 2, a template field (new template code) is added above the template layer 1, and a developer can develop the template field to continue development conceptually on the template layer 1, without having to start from the template layer 0. This build logic may preferably be configured to generate different stencil layers by way of a page drag. The template layer in this embodiment may include a plurality of template fields, where each template field is a packaged template code.
In some embodiments, when the executable unit is constructed (i.e. the object code is compiled), the executable unit can be issued to the public network or the intranet, and then a developer directly calls the executable unit objects, so that repeated development of the code is avoided.
In summary, in this embodiment, the target template identifier is determined according to the template selection instruction of the user; displaying a target parameter configuration page corresponding to the target template identifier; receiving target configuration parameters input by a user based on the target parameter configuration page; determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code; and constructing an object code according to the object template code and the object configuration parameters. In the scheme, a template code library is preset, a user only needs to select a target template identifier corresponding to a target template code and input target configuration parameters in a corresponding target parameter configuration page to construct the target code, the developed template code is stored in the template code library, and the required target template code is flexibly called from the template code library when in use, so that repeated development of the code is avoided, and meanwhile, the template code in the template code library is used for constructing the code, so that the workload of developers can be reduced, and the development efficiency of the code is further improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a code construction system provided in this embodiment, and the code construction method provided in this embodiment of the present application may be implemented based on the code construction system, where the system may be configured in a terminal or a server, and specifically, as shown in fig. 3, the code construction system includes a configuration layer, a scheduling layer, a configuration parsing layer, and a construction layer, where:
configuration layer: the template domain configurator is used for configuring corresponding template identifiers for each template domain (namely code templates), the template domain configurator is used for configuring corresponding template identifiers for each template layer (the template layer comprises a plurality of template domains), the input parameter configurator is used for configuring parameter input interfaces (parameter configuration pages) for each code template, specifically, the configuration layer mainly performs some parameter configuration for defined entity domains, then an analysis engine can generate an executable unit (object code) for the parameter configuration, and then a developer executes and calls the executable units.
Scheduling layer: the system comprises a task scheduling scheduler and a log scheduler, wherein the task scheduling scheduler is responsible for scheduling each execution unit, for example, the task dependency relationship of C can be executed after A and B are executed, namely, the scheduling sequence in compiling is determined, and the log scheduler is used for recording the process data of code construction.
Configuration analysis layer: the method comprises a plurality of parameter resolvers, for example, a Weather parameter resolver, a Company parameter resolver and an IndexParam parameter resolver, and is mainly used for determining template codes corresponding to all template identifiers, for example, the Weather parameter is "Beijing Weather", and the template codes corresponding to the "Beijing Weather" can be acquired through the Weather parameter resolver.
The construction layer comprises the following steps: based on the factory method design mode, the layer comprises a plurality of language type compilers, such as a Python, java and Groovy type compiler, and after the target template code and the corresponding target configuration parameters are acquired, the target template code and the target configuration parameters can be constructed into an actual executable unit object (namely, target code) through the corresponding language type compiler.
Fig. 4 is a schematic block diagram of a code construction apparatus provided in an embodiment of the present application. As shown in fig. 4, the present application also provides a code construction apparatus corresponding to the above code construction method. The code construction device comprises a unit for executing the code construction method, and the device can be configured in a desktop computer, a tablet computer, a portable computer, and the like. Specifically, referring to fig. 4, the code construction apparatus 400 includes a transceiver unit 401 and a processing unit 402, wherein:
the processing unit 402 is configured to determine a target template identifier according to a template selection instruction of a user; displaying a target parameter configuration page corresponding to the target template identifier;
the transceiver unit 401 is configured to receive a target configuration parameter input by a user based on the target parameter configuration page;
the processing unit 402 is further configured to determine, from a preset template code library, a target template code corresponding to the target template identifier according to a corresponding relationship between the preset template identifier and the template code; and constructing an object code according to the object template code and the object configuration parameters.
In some embodiments, the processing unit 402 is specifically configured to, when executing the step of determining the target template identifier according to the template selection instruction of the user:
displaying a template selection interface, wherein the template selection interface displays candidate template icons corresponding to a plurality of candidate template identifiers respectively;
receiving a template selection instruction of a user aiming at a target template icon in a plurality of candidate template icons;
and responding to the template selection instruction, and determining a target template identifier corresponding to the target template icon from a plurality of candidate template identifiers according to the corresponding relation between the preset template icon and the template identifier.
In some embodiments, the target template icon includes a plurality of sub-target template icons, the template selection instruction includes a template drag instruction for each of the sub-target template icons, the target template identifier includes a sub-target template identifier corresponding to each of the sub-target template icons, and the target configuration parameter includes a sub-target configuration parameter corresponding to each of the sub-target template identifiers; the processing unit 402 is specifically configured to, when executing the step of determining, from a preset template code library, a target template code corresponding to the target template identifier according to the corresponding relationship between the preset template identifier and the template code:
determining sub-target template codes respectively corresponding to the sub-target template identifiers from the template code library according to the corresponding relation between the template identifiers and the template codes;
at this time, the processing unit 402 is specifically configured to, when executing the step of building the object code according to the object template code and the object configuration parameter:
determining the scheduling sequence of the sub-target template codes according to the template dragging instruction;
and constructing the target codes according to the scheduling sequence, each sub-target template code and each sub-target configuration parameter.
In some embodiments, the processing unit 402 is specifically configured to, when executing the step of constructing the object code according to the scheduling order, each of the sub-object template codes, and each of the sub-object configuration parameters:
determining a target compiler from a compiler database according to the language type of the sub-target template code;
and constructing the target codes according to the scheduling sequence, the sub-target template codes and the sub-target configuration parameters based on the target compiler.
In some embodiments, the processing unit 402, before executing the step of building object code from the object template code and the object configuration parameters, is further configured to:
determining whether the target template code is a history construction code according to a preset constructed template identification set and the target template identification;
at this time, the processing unit 402 is specifically configured to, when executing the step of building the object code according to the object template code and the object configuration parameter:
if the target template code is not the history construction code, constructing the target code according to the target template code and the target configuration parameters.
In some embodiments, after performing the step of determining whether the target template code is a historical build code according to the preset set of built template identifiers and the target template identifier, the processing unit 402 is further configured to:
if the target template code is the history construction code, determining a target execution code from a preset history construction code library;
and generating the target code according to the target execution code and the target configuration parameters.
In some embodiments, the processing unit 402, before executing the step of building object code from the object template code and the object configuration parameters, is further configured to:
receiving a new template code input by a user through the transceiving unit 401;
the processing unit 402 is specifically configured to, when executing the step of building the object code according to the object template code and the object configuration parameter:
and constructing the target code according to the new template code, the target template code and the target configuration parameters.
Therefore, in the scheme, a template code library is preset, a user only needs to select a target template identifier corresponding to a target template code and input a target configuration parameter in a corresponding target parameter configuration page to construct the target code, the developed template code is stored in the template code library, the required target template code is flexibly called from the template code library when the template code library is used, repeated development of the code is avoided, and meanwhile, the template code in the template code library is used for constructing the code.
It should be noted that, as those skilled in the art can clearly understand the specific implementation process of the above code construction device and each unit, reference may be made to the corresponding description in the foregoing method embodiments, and for convenience and brevity of description, details are not repeated herein.
The code construction means described above may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 5.
Referring to fig. 5, fig. 5 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster formed by a plurality of servers.
With reference to FIG. 5, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a code construction method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a code construction method.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device 500 to which the present application is applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to execute a computer program 5032 stored in a memory to implement the steps of:
determining a target template identification according to a template selection instruction of a user;
displaying a target parameter configuration page corresponding to the target template identifier;
receiving target configuration parameters input by a user based on the target parameter configuration page;
determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code;
and constructing an object code according to the object template code and the object configuration parameters. It should be appreciated that in embodiments of the present application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions, when executed by the processor, cause the processor to perform the steps of:
determining a target template identification according to a template selection instruction of a user;
displaying a target parameter configuration page corresponding to the target template identifier;
receiving target configuration parameters input by a user based on the target parameter configuration page;
determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code;
and constructing an object code according to the object template code and the object configuration parameters.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A code construction method, comprising:
determining a target template identification according to a template selection instruction of a user;
displaying a target parameter configuration page corresponding to the target template identifier;
receiving target configuration parameters input by a user based on the target parameter configuration page;
determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code;
and constructing an object code according to the object template code and the object configuration parameters.
2. The method of claim 1, wherein the determining the target template identification according to the template selection instruction of the user comprises:
displaying a template selection interface, wherein the template selection interface displays candidate template icons corresponding to a plurality of candidate template identifiers respectively;
receiving a template selection instruction of a user aiming at a target template icon in a plurality of candidate template icons;
and responding to the template selection instruction, and determining a target template identifier corresponding to the target template icon from a plurality of candidate template identifiers according to the corresponding relation between the preset template icon and the template identifier.
3. The method of claim 2, wherein the target template icon comprises a plurality of sub-target template icons, the template selection instruction comprises a template drag instruction for each of the sub-target template icons, the target template identifier comprises a sub-target template identifier corresponding to each of the sub-target template icons, and the target configuration parameter comprises a sub-target configuration parameter corresponding to each of the sub-target template identifiers; the determining the target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code comprises the following steps:
determining sub-target template codes respectively corresponding to the sub-target template identifiers from the template code library according to the corresponding relation between the template identifiers and the template codes;
the constructing the object code according to the object template code and the object configuration parameters comprises the following steps:
determining the scheduling sequence of the sub-target template codes according to the template dragging instruction;
and constructing the target codes according to the scheduling sequence, each sub-target template code and each sub-target configuration parameter.
4. A method according to claim 3, wherein said constructing said object code according to said scheduling order, each said sub-object template code and each said sub-object configuration parameter comprises:
determining a target compiler from a compiler database according to the language type of the sub-target template code;
and constructing the target codes according to the scheduling sequence, the sub-target template codes and the sub-target configuration parameters based on the target compiler.
5. The method of claim 1, wherein prior to constructing object code from the object template code and the object configuration parameters, the method further comprises:
determining whether the target template code is a history construction code according to a preset constructed template identification set and the target template identification;
the constructing the object code according to the object template code and the object configuration parameters comprises the following steps:
if the target template code is not the history construction code, constructing the target code according to the target template code and the target configuration parameters.
6. The method of claim 5, wherein after determining whether the target template code is a history build code based on the set of preset built template identifications and the target template identification, the method further comprises:
if the target template code is the history construction code, determining a target execution code from a preset history construction code library;
and generating the target code according to the target execution code and the target configuration parameters.
7. The method according to any one of claims 1 to 6, wherein before said building object code from said object template code and said object configuration parameters, the method further comprises:
receiving a new template code input by a user;
the constructing the object code according to the object template code and the object configuration parameters comprises the following steps:
and constructing the target code according to the new template code, the target template code and the target configuration parameters.
8. A code construction device, comprising a transceiver unit and a processing unit, wherein:
the processing unit is used for determining a target template identification according to a template selection instruction of a user; displaying a target parameter configuration page corresponding to the target template identifier;
the receiving and transmitting unit is used for receiving target configuration parameters input by a user based on the target parameter configuration page;
the processing unit is further used for determining a target template code corresponding to the target template identifier from a preset template code library according to the corresponding relation between the preset template identifier and the template code; and constructing an object code according to the object template code and the object configuration parameters.
9. A computer device, characterized in that it comprises a memory on which a computer program is stored and a processor which, when executing the computer program, implements the method according to any of claims 1-7.
10. A computer readable storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, can implement the method of any of claims 1-7.
CN202310089206.5A 2023-01-18 2023-01-18 Code construction method, device, computer equipment and storage medium Pending CN116009852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310089206.5A CN116009852A (en) 2023-01-18 2023-01-18 Code construction method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310089206.5A CN116009852A (en) 2023-01-18 2023-01-18 Code construction method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116009852A true CN116009852A (en) 2023-04-25

Family

ID=86033613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310089206.5A Pending CN116009852A (en) 2023-01-18 2023-01-18 Code construction method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116009852A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234525A (en) * 2023-11-15 2023-12-15 北京轻松怡康信息技术有限公司 Robot building method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108345456A (en) * 2018-03-07 2018-07-31 平安普惠企业管理有限公司 Page code generation method, device, computer equipment and storage medium
CN110580189A (en) * 2019-09-06 2019-12-17 深圳前海环融联易信息科技服务有限公司 method and device for generating front-end page, computer equipment and storage medium
CN110955418A (en) * 2019-12-13 2020-04-03 中国南方电网有限责任公司 Code generation method and device, computer equipment and storage medium
CN115543282A (en) * 2022-10-18 2022-12-30 康键信息技术(深圳)有限公司 Page code generation method and device, storage medium and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108345456A (en) * 2018-03-07 2018-07-31 平安普惠企业管理有限公司 Page code generation method, device, computer equipment and storage medium
CN110580189A (en) * 2019-09-06 2019-12-17 深圳前海环融联易信息科技服务有限公司 method and device for generating front-end page, computer equipment and storage medium
CN110955418A (en) * 2019-12-13 2020-04-03 中国南方电网有限责任公司 Code generation method and device, computer equipment and storage medium
CN115543282A (en) * 2022-10-18 2022-12-30 康键信息技术(深圳)有限公司 Page code generation method and device, storage medium and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234525A (en) * 2023-11-15 2023-12-15 北京轻松怡康信息技术有限公司 Robot building method and device, electronic equipment and storage medium
CN117234525B (en) * 2023-11-15 2024-01-30 北京轻松怡康信息技术有限公司 Robot building method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US7913225B2 (en) Error handling using declarative constraints in a graphical modeling tool
US8621421B2 (en) Workflow visualization
CN108304307B (en) Performance detection method of intelligent contract on block chain
US10592211B2 (en) Generation of application behaviors
US20130268912A1 (en) Code validation using content assist
US8005812B1 (en) Collaborative modeling environment
AU2016265680B2 (en) Techniques for configuring a generic program using controls
CA2707509A1 (en) Templating system and method for updating content in real time
CN110580189A (en) method and device for generating front-end page, computer equipment and storage medium
CN109408354B (en) Data processing method and device for application component
CN112148356B (en) Document generation method, interface development method, device, server and storage medium
US5386558A (en) Method and apparatus for executing control system functions in a computer system
CN114089986A (en) Method, system, device and medium for configuring low code development platform function expression
US8666997B2 (en) Placeholders returned for data representation items
CN116009852A (en) Code construction method, device, computer equipment and storage medium
JPH10254689A (en) Application constitution design supporting system for client/server system
KR20220027870A (en) Visual programming for deep learning
US20130152049A1 (en) Warning of register and storage area assignment errors
US11262986B2 (en) Automatic software generation for computer systems
WO2016176159A1 (en) Cross-platform command extensibility
CN112905931B (en) Page information display method and device, electronic equipment and storage medium
US11726818B1 (en) System for executing tasks in different programming languages
US11194885B1 (en) Incremental document object model updating
CN110991147B (en) Font detection method and device, electronic equipment and storage medium
CN111126012B (en) Custom generation expression method and device

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