CN113703734A - Applet generation method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113703734A
CN113703734A CN202110915576.0A CN202110915576A CN113703734A CN 113703734 A CN113703734 A CN 113703734A CN 202110915576 A CN202110915576 A CN 202110915576A CN 113703734 A CN113703734 A CN 113703734A
Authority
CN
China
Prior art keywords
target
applet
component
platform
component set
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
CN202110915576.0A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110915576.0A priority Critical patent/CN113703734A/en
Publication of CN113703734A publication Critical patent/CN113703734A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/425Lexical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The invention provides an applet generating method, an applet generating device, an electronic device and a storage medium, wherein the applet generating method comprises the following steps: acquiring a first component set from a low-code platform based on the target component information; compiling the first component set into N second component sets, wherein each second component set is matched with an applet platform; determining M first data interfaces based on a general data interface and a target service database corresponding to the first component set, wherein each first data interface is adapted to one applet platform; and sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform, so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface. The method of the invention can realize that one platform simultaneously develops the small programs adapting to multiple platforms, greatly shortens the development period and improves the development efficiency.

Description

Applet generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for generating an applet, an electronic device, and a storage medium.
Background
Since the applets have the advantages of self popularization, low development cost, smoother operation and the like, since the applets are released, the applets are widely concerned, and more internet companies release the applets of respective platforms.
At present, regarding development of small programs, most of developers still rely on multiple platforms for respective development and adaptation, the development period is long, and the development efficiency is low. At present, no technical scheme for developing small programs through a low-code platform exists, and the existing low-code platform is mainly based on a form driving mode and is connected with a simple and lightweight webpage application in series through a plurality of forms with hierarchical relations.
Therefore, how to better realize the generation of applets has become a major concern in the industry.
Disclosure of Invention
The invention provides an applet generating method, an applet generating device, an electronic device and a storage medium, which are used for better realizing the generation of an applet.
The invention provides an applet generating method, which comprises the following steps:
acquiring a first component set from a low-code platform based on the target component information;
compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform;
determining M first data interfaces based on a general data interface and a target service database corresponding to the first component set, wherein each first data interface is adapted to one applet platform;
and sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform, so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
According to an applet generating method provided by the present invention, the acquiring a first component set from a low-code platform based on target component information includes:
selecting a plurality of target components from the low-code platform based on the component list information in the target component information;
and acquiring a first component set based on the plurality of target components and component layout information in the target component information.
According to an applet generating method provided by the present invention, compiling the first component set into N second component sets includes:
analyzing codes of the first component set to generate a first abstract syntax tree corresponding to the first component set;
compiling the first abstract syntax tree into N second abstract syntax trees, wherein each second abstract syntax tree is adapted to an applet platform;
and generating N second component sets according to the N second abstract syntax trees.
According to an applet generating method provided by the present invention, the determining M first data interfaces based on a general data interface and a target service database corresponding to the first component set includes:
acquiring target service data from the service database based on the universal data interface corresponding to the first component set;
and determining M first data interfaces based on the universal data interface and the target service data.
The present invention also provides an applet generating apparatus, comprising:
the acquisition module is used for acquiring a first component set from the low-code platform based on the target component information;
a compiling module for compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform;
a determining module, configured to determine M first data interfaces based on a general data interface and a target service database corresponding to the first component set, where each first data interface is adapted to one applet platform;
and the generating module is used for sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
According to an applet generating apparatus provided by the present invention, the obtaining module is further configured to:
selecting a plurality of target components from the low-code platform based on the component list information in the target component information;
and acquiring a first component set based on the plurality of target components and component layout information in the target component information.
According to an applet generating apparatus provided by the present invention, the compiling module is further configured to:
analyzing codes of the first component set to generate a first abstract syntax tree corresponding to the first component set;
compiling the first abstract syntax tree into N second abstract syntax trees, wherein each second abstract syntax tree is adapted to an applet platform;
and generating N second component sets according to the N second abstract syntax trees.
According to an applet generating apparatus provided by the present invention, the determining module is further configured to:
acquiring target service data from the service database based on the universal data interface corresponding to the first component set;
and determining M first data interfaces based on the universal data interface and the target service data.
The present invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the applet generating method as described in any one of the above when executing the program.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the applet generating method as any one of the above.
The invention provides an applet generating method, an applet generating device, electronic equipment and a storage medium, wherein a plurality of target assemblies used for generating a target applet are selected from a general assembly library of a low-code platform based on target assembly information, and the target assemblies are distributed to obtain a first assembly set; because different target small program platform components have different configuration rules, the first component set cannot be adapted to each target small program platform, and therefore, in order to be adapted to each target small program platform, the first component set is compiled into a second component set suitable for each target small program platform through a compiler; based on the general data interface adapted to the first component set, service data of the target applet can be obtained from the target service database, and for adapting to each target applet platform, data adaptation is performed on the general data interface and the target service data through the data adapter to generate a first data interface adapted to each target applet platform, and each target applet platform can generate each target applet according to the adapted second component set and the adapted first data interface, so that the simultaneous development of applets adapted to multiple platforms by one platform is realized, the development period is greatly shortened, and the development efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of an applet generation method provided by the present invention;
FIG. 2 is a schematic flow chart of generating a second set of components provided by the present invention;
FIG. 3 is a schematic flow chart of generating a first data interface provided by the present invention;
FIG. 4 is a schematic overall flow chart for developing a multi-platform applet based on a low-code platform provided by the present invention;
FIG. 5 is a schematic structural diagram of an applet generating apparatus provided in the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that an applet is an application that can be used without downloading or installing, and a user can open the application by "scanning" or searching through a terminal application. Generally, an applet is implemented based on a running environment provided by an applet platform, which generally refers to an application, for example, the applet platform may be a chat type application, a video type application, or a financial type application, and is not limited in particular in the embodiment of the present invention. The terminal for installing the application program can be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), and the like, and the embodiments of the present application are not limited in particular.
An applet generating method, apparatus, electronic device and storage medium provided by the present invention are described below with reference to fig. 1 to 6.
Fig. 1 is a schematic flow chart of an applet generating method provided in the present invention, and as shown in fig. 1, the method includes:
step S1, acquiring a first component set from the low-code platform based on the target component information;
specifically, the Low-Code Platform described in the present invention refers to a Low-Code Development Platform (LCDP), which is a Development Platform that can generate an application program quickly without coding or with a small amount of Code, and can develop the application program through visualization, so that developers with different experience levels can create web pages and application programs through a graphical user interface using a drag component and model-driven logic.
It should be noted that the component library of the low-code platform may include various general components for applet development, such as a form management component, a text management component, a media management component, and the like, which are not specifically limited in the embodiment of the present invention.
The target component information described in the present invention refers to information of general components required for generating a target applet, and may specifically include component list information and component layout information. Wherein, the target component refers to a general component required for generating the target applet; a target applet refers to an applet that a user needs to develop.
In an embodiment of the invention, the applet component may be a component of an applet, and each applet may include a plurality of applet components, for example, a video type applet may include: the component for displaying the video image, the component for displaying the text information, the component for user evaluation, and the like are not particularly limited in the embodiment of the present invention.
In the embodiment of the present invention, each applet component can implement a specific function, and source code for executing a set function is encapsulated in each applet component, for example, the form management component encapsulates source code for implementing the form management function, and the media management component encapsulates source code for implementing the media management function.
The first set of components described herein refers to a set of general-purpose components that are used to generate a target applet and that have been laid out in a low-code platform.
Thus, based on the target component information, a first set of components can be obtained from the low-code platform.
Step S2, compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform;
in particular, in order to adapt the target component to different target applet platforms, a first set of components needs to be compiled.
The second set of components described herein refers to a set of components that are suitable for the target applet platform, which may be obtained by compiling the first set of components. Wherein, the target applet platform refers to an application program providing a running environment for the target applet.
In the embodiment of the present invention, the compiler is used to compile the first component set into N second component sets, for example, when the target applet platform is a chat application, the first component set may be compiled into a second component set suitable for the chat application, and if the target applet platform is a financial application, the first component set may be compiled into a second component set suitable for the financial application.
Wherein N is the number of target applet platforms, which may be specifically 1, 2, 6, 10, and the like, and the specific value is determined according to the user design requirement, which is not specifically limited herein.
In an embodiment of the present invention, each second component set may be adapted to an applet platform, and different target applet platforms correspond to different second component sets, for example, a target applet platform is a chat-type application corresponding to a second component set applicable to the chat-type application; the target applet platform is a financial application that corresponds to a second set of components applicable to the financial application, and so on.
Step S3, determining M first data interfaces based on the general data interface and the target service database corresponding to the first component set, wherein each first data interface is adapted to one applet platform;
specifically, the universal data Interface described in the present invention refers to an adaptive universal component set, that is, an Application Programming Interface (API) adapted to the first component set, which may be used to call service data from a target service database and obtain data information for page display.
The target service database described in the present invention refers to a service database designed according to the data requirements of the target applet, and may be specifically a preset service data model for storing the service data of the target applet.
The first data interface described in the present application refers to a data interface API adapted to each target applet platform, which may convert a general data interface API into a data interface API suitable for each target applet platform through a data adapter.
In the embodiment of the invention, the universal data interface API supports the mode of adopting a data adapter to output different parameters and generate data with different formats so as to adapt to the data interface API of each target small program platform.
Further, the general data interface API can be converted into M first data interface APIs by the data adapter. For example, if the target applet platform is a chat application, the generic data interface API may be converted into a first data interface API suitable for the chat application, and if the target applet platform is a financial application, the generic data interface API may be converted into a first data interface API suitable for the financial application.
Wherein M is a positive integer, M may be equal to N, M may also be unequal to N, which also represents the number of target applet platforms, M may specifically be 1, 2, 6, etc., and a specific value is determined according to a user design requirement, which is not specifically limited herein.
In an embodiment of the present invention, each first data interface API may be adapted to an applet platform, and different applet platforms correspond to different first data interface APIs, for example, a target applet platform is a chat-type application corresponding to a first data interface API applicable to the chat-type application, if the target applet platform is a financial-type application, it corresponds to a first data interface API applicable to the financial-type application, and so on.
Step S4, sending the second component set and the first data interface adapted to the same target applet platform to each target applet platform, so that each target applet platform generates a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
Specifically, in an embodiment of the present invention, an application data package of the target applet may be generated based on the first data interface API and the second component set adapted to the same target applet platform.
Therefore, after the second component set and the first data interface API which are adapted to the same target applet platform are sent to each target applet platform, each target applet platform can generate an application data packet of each target applet according to the adapted second component set and the adapted first data interface API, so that the application data packet of each target applet is compiled, and the target applet corresponding to each target applet platform is generated.
The method comprises the steps of selecting a plurality of target components for generating a target applet from a general component library of a low-code platform based on target component information, and distributing the target components to obtain a first component set; because different target small program platform components have different configuration rules, the first component set cannot be adapted to each target small program platform, and therefore, in order to be adapted to each target small program platform, the first component set is compiled into a second component set suitable for each target small program platform through a compiler; based on the general data interface adapted to the first component set, service data of the target applet can be obtained from the target service database, and for adapting to each target applet platform, data adaptation is performed on the general data interface and the target service data through the data adapter to generate a first data interface adapted to each target applet platform, and each target applet platform can generate each target applet according to the adapted second component set and the adapted first data interface, so that the simultaneous development of applets adapted to multiple platforms by one platform is realized, the development period is greatly shortened, and the development efficiency is improved.
Optionally, the obtaining a first component set from the low-code platform based on the target component information includes:
selecting a plurality of target components from the low-code platform based on the component list information in the target component information;
and acquiring a first component set based on the plurality of target components and component layout information in the target component information.
Specifically, in the embodiment of the present invention, different component identifiers are displayed in a front-end page of the low-code platform, and the different component identifiers correspondingly implement different component functions, so that a user can select and layout a target component in the front-end page of the low-code platform by dragging a component identifier in the page, and thus a low-code platform background server reads a dragging operation instruction of the user, and can generate component list information and component layout information in target component information.
The component list information described in the present invention refers to list information constituted by a plurality of target components, and may specifically include attribute information, identification information, parameter information, and the like of the target components. For example, according to the attribute information of the target component, whether the target component is a media component, a text component, a form component or the like can be determined; according to the identification information of the target component, a component corresponding to the identification can be selected from a component library of the low-code platform; according to the parameter information of the target component, the size of the target component and the like can be determined.
Accordingly, based on the component list information in the target component information, a plurality of target components may be selected from the low-code platform.
The component layout information described in the present invention refers to information for page layout of a target component, and may specifically include orientation information of the target component, and spacing information between the target components.
And according to the component layout information in the target component information, laying out the target components to enable the target components to be arranged at the required positions in the component layout information.
After the layout of each target component is completed, a first set of components is obtained.
According to the method provided by the embodiment of the invention, the plurality of target components are selected from the low-code platform according to the component list information and the component layout information in the target component information, and the target components are laid out, so that the first component set can be accurately and efficiently obtained, and the acquisition of the component data required by the generation of the target small program is facilitated.
Optionally, the compiling the first component set into N second component sets includes:
analyzing codes of the first component set to generate a first abstract syntax tree corresponding to the first component set;
compiling the first abstract syntax tree into N second abstract syntax trees, wherein each second abstract syntax tree is adapted to an applet platform;
and generating N second component sets according to the N second abstract syntax trees.
In particular, the Abstract Syntax Tree (AST) described in the present invention refers to an Abstract representation of the Syntax structure of the source code, which represents the Syntax structure of the programming language in the form of a Tree, and each node on the Tree represents a structure in the source code.
The first abstract syntax tree described herein refers to an AST generated by parsing each common component code in the first component set.
The second abstract syntax tree described in the present invention refers to compiling the first AST based on the rules of each target applet platform, such as the configuration requirements of the components, to generate an AST adapted to each target applet platform.
In an embodiment of the present invention, each second AST may be adapted to an applet platform, for example, the target applet platform may be a chat-type application, and the first AST may be compiled into a second AST suitable for the chat-type application; when the target applet platform is a financial application, the first AST may be compiled into a second AST suitable for the financial application.
Further, the first AST is compiled into N second AST, where N is a positive integer, which is the number of target applet platforms, and may be specifically 1, 2, 6, 10, and the like, and a specific value is determined according to a user design requirement, which is not specifically limited herein.
And generating component codes applicable to the N target applet platforms according to the N second ASTs, thereby determining a second component set adapted to the N target applet platforms.
Fig. 2 is a schematic flow diagram of generating a second component set according to the present invention, and as shown in fig. 2, after compiling and converting a first component set component based on each target applet platform rule, a second component set adapted to each target applet platform may be generated.
In the embodiment of the invention, the plug-ins adaptive to each target applet platform can be developed in advance according to the compiling and converting process, so that the first component set can be compiled and converted based on the plug-ins adaptive to each target applet platform, and a user can conveniently obtain the second component set adaptive to each target applet platform.
According to the method provided by the embodiment of the invention, the AST of the first component set is generated by analyzing the codes of the first component set, the AST of the first component set is compiled based on the rules of all target applet platforms, the component codes adapted to all the target applet platforms are generated, the second component set is determined, and the component data for generating all the target applets can be effectively acquired.
Optionally, the determining M first data interfaces based on the common data interface and the target service database corresponding to the first component set includes:
acquiring target service data from the service database based on the universal data interface corresponding to the first component set;
and determining M first data interfaces based on the universal data interface and the target service data.
Specifically, based on a universal data interface API corresponding to the first component set, the data adapter is called to initiate a data request to the service platform, and the service platform sends target service data in the service database to the universal data interface API. The service platform is a platform for providing service data required by the target applet, and the service data is stored in a service database of the service platform, wherein the service data can be stored in a form of a service data model.
Further, the data adapter performs adaptation processing on the universal data interface API and the service data output by the universal data interface API to generate a first data interface API adapted to each target applet platform, that is, M first data interface APIs are determined, where the first data interface API encapsulates the service data of the target applet.
Fig. 3 is a schematic flow chart of generating a first data interface according to the present invention, and as shown in fig. 3, a data adapter may convert a generic data interface API into a first data interface API adapted to each target applet platform.
According to the method, data adaptation is carried out on the general data interface API adapted to the first component set through the data model of the low-code platform based on the target service database, the first data interface API adapted to each target small program platform is determined, and interface data are provided for the subsequent generation of each target small program.
Fig. 4 is a schematic overall flow chart of the development of a multi-platform applet based on a low-code platform, as shown in fig. 4, including:
s410, dragging the components in a low-code platform component library, configuring the attributes, parameters and the like of all the general components, and acquiring a first component set;
step S420, compiling the first component set into a second component set adapted to each target applet platform in a compiler through a preset plug-in of the low code platform;
step S430, configuring a general data interface API corresponding to the first component set in the low-code platform;
step S440, based on the general data interface API, initiating a data request to a service platform to obtain service data of the target small program;
step S450, the data adapter converts the universal data interface model into a first data interface API which is adapted to each target small program;
step S460, the applet platform calls a first data interface API;
step S470, calling the applet publishing interface of each target applet platform and generating the applet application data packet of each target applet platform;
and step S480, based on each applet publishing interface, publishing the generated each applet application data packet to each target applet platform by one key.
The method provided by the embodiment of the invention is based on a model-driven low-code development platform, and develops and adapts to the multi-platform applet application by assembling a universal component model and a data model, so that one-site visual development is realized, multiple platforms are released by one key, and meanwhile, the development cost can be reduced; besides developers, operators can participate in the method, constructed applet application packages are published to each target applet platform through a low code platform, operation and publishing costs of applets are reduced, and synchronous updating of multiple application platforms can be achieved.
The applet generating apparatus provided in the present invention will be described below, and the applet generating apparatus described below and the applet generating method described above may be referred to in correspondence with each other.
Fig. 5 is a schematic structural diagram of an applet generating apparatus provided in the present invention, as shown in fig. 5, including:
an obtaining module 510, configured to obtain a first component set from a low-code platform based on the target component information;
a compiling module 520, configured to compile the first component set into N second component sets, where each of the second component sets is adapted to an applet platform;
a determining module 530, configured to determine M first data interfaces based on the common data interface and the target service database corresponding to the first component set, where each first data interface is adapted to one applet platform;
a generating module 540, configured to send the second component set and the first data interface adapted to the same target applet platform to each target applet platform, so that each target applet platform generates a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
Optionally, the obtaining module 510 is further configured to:
selecting a plurality of target components from the low-code platform based on the component list information in the target component information;
and acquiring a first component set based on the plurality of target components and component layout information in the target component information.
Optionally, the compiling module 520 is further configured to:
analyzing codes of the first component set to generate a first abstract syntax tree corresponding to the first component set;
compiling the first abstract syntax tree into N second abstract syntax trees, wherein each second abstract syntax tree is adapted to an applet platform;
and generating N second component sets according to the N second abstract syntax trees.
Optionally, the determining module 530 is further configured to:
acquiring target service data from the service database based on the universal data interface corresponding to the first component set;
and determining M first data interfaces based on the universal data interface and the target service data.
The apparatus described in this embodiment may be used to implement the above method embodiments, and the principle and technical effect are similar, which are not described herein again.
The device of the embodiment of the invention selects a plurality of target components for generating the target small program from a general component library of a low-code platform based on the target component information, and lays out the target components to obtain a first component set; because different target small program platform components have different configuration rules, the first component set cannot be adapted to each target small program platform, and therefore, in order to be adapted to each target small program platform, the first component set is compiled into a second component set suitable for each target small program platform through a compiler; based on the general data interface adapted to the first component set, service data of the target applet can be obtained from the target service database, and for adapting to each target applet platform, data adaptation is performed on the general data interface and the target service data through the data adapter to generate a first data interface adapted to each target applet platform, and each target applet platform can generate each target applet according to the adapted second component set and the adapted first data interface, so that the simultaneous development of applets adapted to multiple platforms by one platform is realized, the development period is greatly shortened, and the development efficiency is improved.
Fig. 6 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 6, the electronic device may include: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call logic instructions in the memory 630 to perform an applet generation method comprising: acquiring a first component set from a low-code platform based on the target component information; compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform; determining M first data interfaces based on a general data interface and a target service database corresponding to the first component set, wherein each first data interface is adapted to one applet platform; and sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform, so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the applet generating method provided by the above methods, the method comprising: acquiring a first component set from a low-code platform based on the target component information; compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform; determining M first data interfaces based on a general data interface and a target service database corresponding to the first component set, wherein each first data interface is adapted to one applet platform; and sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform, so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the applet generating method provided above, the method comprising: acquiring a first component set from a low-code platform based on the target component information; compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform; determining M first data interfaces based on a general data interface and a target service database corresponding to the first component set, wherein each first data interface is adapted to one applet platform; and sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform, so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An applet generating method comprising:
acquiring a first component set from a low-code platform based on the target component information;
compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform;
determining M first data interfaces based on a general data interface and a target service database corresponding to the first component set, wherein each first data interface is adapted to one applet platform;
and sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform, so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
2. The applet generation method according to claim 1, wherein the obtaining a first set of components from a low code platform based on the target component information comprises:
selecting a plurality of target components from the low-code platform based on the component list information in the target component information;
and acquiring a first component set based on the plurality of target components and component layout information in the target component information.
3. The applet generation method according to claim 1, wherein the compiling the first set of components into N second sets of components comprises:
analyzing codes of the first component set to generate a first abstract syntax tree corresponding to the first component set;
compiling the first abstract syntax tree into N second abstract syntax trees, wherein each second abstract syntax tree is adapted to an applet platform;
and generating N second component sets according to the N second abstract syntax trees.
4. The applet generation method according to claim 1, wherein the determining M first data interfaces based on the generic data interface and the target service database corresponding to the first component set comprises:
acquiring target service data from the service database based on the universal data interface corresponding to the first component set;
and determining M first data interfaces based on the universal data interface and the target service data.
5. An applet generating apparatus, comprising:
the acquisition module is used for acquiring a first component set from the low-code platform based on the target component information;
a compiling module for compiling the first component set into N second component sets, wherein each second component set is adapted to an applet platform;
a determining module, configured to determine M first data interfaces based on a general data interface and a target service database corresponding to the first component set, where each first data interface is adapted to one applet platform;
and the generating module is used for sending the second component set and the first data interface which are adapted to the same target applet platform to each target applet platform so that each target applet platform can generate a target applet corresponding to each target applet platform according to the adapted second component set and the first data interface.
6. The applet generating apparatus according to claim 5, wherein the acquiring module is further configured to:
selecting a plurality of target components from the low-code platform based on the component list information in the target component information;
and acquiring a first component set based on the plurality of target components and component layout information in the target component information.
7. The applet generating apparatus according to claim 5, wherein the compiling module is further configured to:
analyzing codes of the first component set to generate a first abstract syntax tree corresponding to the first component set;
compiling the first abstract syntax tree into N second abstract syntax trees, wherein each second abstract syntax tree is adapted to an applet platform;
and generating N second component sets according to the N second abstract syntax trees.
8. The applet generating apparatus according to claim 5, wherein the determining module is further configured to:
acquiring target service data from the service database based on the universal data interface corresponding to the first component set;
and determining M first data interfaces based on the universal data interface and the target service data.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the applet generating method as claimed in any one of claims 1 to 4 are implemented when the program is executed by the processor.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the applet generation method as claimed in any one of claims 1 to 4.
CN202110915576.0A 2021-08-10 2021-08-10 Applet generation method and device, electronic equipment and storage medium Pending CN113703734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110915576.0A CN113703734A (en) 2021-08-10 2021-08-10 Applet generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110915576.0A CN113703734A (en) 2021-08-10 2021-08-10 Applet generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113703734A true CN113703734A (en) 2021-11-26

Family

ID=78652206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110915576.0A Pending CN113703734A (en) 2021-08-10 2021-08-10 Applet generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113703734A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114416218A (en) * 2021-12-31 2022-04-29 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114416218A (en) * 2021-12-31 2022-04-29 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN114416218B (en) * 2021-12-31 2022-11-01 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113065656B (en) Rule engine configuration method and device, server and readable storage medium
CN111045655A (en) Page rendering method and device, rendering server and storage medium
CN106547527B (en) JavaScript file construction method and device
CN111209004A (en) Code conversion method and device
CN111736954B (en) Multi-intelligent contract virtual machine implementation method, multi-intelligent contract virtual machine and system
US11699073B2 (en) Network off-line model processing method, artificial intelligence processing device and related products
CN113076163A (en) Card rendering method and device
CN112631649A (en) Intelligent contract management method, device, terminal equipment and medium
CN113703734A (en) Applet generation method and device, electronic equipment and storage medium
JP2018169693A (en) Information processing device, information processing method, and information processing program
CN108959294B (en) Method and device for accessing search engine
CN114115884A (en) Management method and related device for programming service
CN112559344A (en) Remote mock testing method and system
CN106528066B (en) Business process operation method and device
CN112947900A (en) Web application development method and device, server and development terminal
CN113495723B (en) Method, device and storage medium for calling functional component
CN112579093B (en) Information pushing method and device and related equipment
CN114780800A (en) Multilink routing management method and device
CN109901934A (en) The method and apparatus for generating interface help document
CN114064176A (en) View interaction method and device, electronic equipment and computer readable medium
CN111078230A (en) Code generation method and device
CN111078215A (en) Software product application method and device, storage medium and electronic equipment
CN113239328B (en) Service function acquisition method and device, electronic equipment and storage medium
CN113535186B (en) Service application deployment method and device
CN112463253B (en) Platform configuration method, system, equipment and storage medium

Legal Events

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