WO2020140940A1 - Code generation method and apparatus, and device and storage medium - Google Patents

Code generation method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2020140940A1
WO2020140940A1 PCT/CN2020/070096 CN2020070096W WO2020140940A1 WO 2020140940 A1 WO2020140940 A1 WO 2020140940A1 CN 2020070096 W CN2020070096 W CN 2020070096W WO 2020140940 A1 WO2020140940 A1 WO 2020140940A1
Authority
WO
WIPO (PCT)
Prior art keywords
binding data
node
attribute
target node
response
Prior art date
Application number
PCT/CN2020/070096
Other languages
French (fr)
Chinese (zh)
Inventor
郭启织
周婷婷
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020140940A1 publication Critical patent/WO2020140940A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Definitions

  • This application relates to the field of computer technology, and in particular, to a code generation method, device, device, and storage medium.
  • Various aspects of the present application provide a code generation method, device, device, and storage medium to flexibly, quickly, and conveniently generate codes corresponding to view images, and reduce development labor costs.
  • An embodiment of the present application provides a code generation method, which includes: in response to a selection operation, selecting an editable target node displayed in an editable image; and in response to a configuration operation, configuring binding data of attributes of the target node; According to the editable image, the binding data, and the analysis method of the binding data, a code corresponding to the target programming language is generated.
  • An embodiment of the present application also provides a code generation device, including: a selection module for selecting an editable target node displayed in an editable image in response to a selection operation; a configuration module for configuring in response to the configuration operation Binding data of the attributes of the target node; a generating module, configured to generate a code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
  • a code generation device including: a selection module for selecting an editable target node displayed in an editable image in response to a selection operation; a configuration module for configuring in response to the configuration operation Binding data of the attributes of the target node; a generating module, configured to generate a code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
  • An embodiment of the present application further provides a device, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to: in response to a selection operation, select The editable target node displayed in the editable image; in response to the configuration operation, configure the binding data of the attribute of the target node; according to the editable image, the binding data, and the method of parsing the binding data To generate the code corresponding to the target programming language.
  • Embodiments of the present application also provide a computer-readable storage medium that stores a computer program.
  • the computer program is executed by one or more processors, the one or more processors cause the one or more processors to implement the steps in the above code generation method.
  • An embodiment of the present application also provides a code generation method, including: acquiring and displaying an editable image in response to an acquisition operation; selecting an editable target node displayed in the editable image in response to a selection operation; and responding to a selection operation , Select the attribute of the target node; in response to the configuration operation, configure the binding data of the attribute of the target node; in response to the generating operation, according to the editable image, the binding data, and the binding data Analysis method to generate the code corresponding to the target programming language.
  • An embodiment of the present application also provides a code generation device, including: a display module for acquiring and displaying an editable image in response to an acquisition operation; a selection module for selecting an image displayed in an editable image in response to the selection operation Editable target node; selection module for selecting the attribute of the target node in response to the selection operation; configuration module for configuring binding data of the attribute of the target node in response to the configuration operation; generation module for In response to the generating operation, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
  • An embodiment of the present application further provides an apparatus, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to: in response to an acquisition operation, acquire and Display an editable image; select an editable target node displayed in an editable image in response to a selection operation; select an attribute of the target node in response to a selection operation; configure an attribute of the target node in response to a configuration operation Binding data; in response to the generating operation, according to the editable image, the binding data, and the binding data parsing method, generate a code corresponding to the target programming language.
  • Embodiments of the present application also provide a computer-readable storage medium that stores a computer program.
  • the computer program is executed by one or more processors, the one or more processors cause the one or more processors to implement the steps in the above code generation method.
  • An embodiment of the present application also provides a code generation method, including: determining an editable image to be processed; determining a target node of the editable image to be edited; determining binding data of attributes of the target node; according to The editable image, the binding data, and the analysis method of the binding data generate a code corresponding to the target programming language.
  • An embodiment of the present application also provides a code generation device, including: a first determination module for determining an editable image to be processed; a second determination module for determining a target node of the editable image to be edited; The third determining module is used to determine the binding data of the attribute of the target node; the generating module is used to generate the target programming language according to the editable image, the binding data and the analysis method of the binding data The corresponding code.
  • An embodiment of the present application further provides a device, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to: determine an editable to be processed Image; determine the target node of the editable image to be edited; determine the binding data of the attribute of the target node; generate the target according to the editable image, the binding data, and the analysis method of the binding data
  • a device including a memory and a processor
  • the memory is used to store a computer program
  • the processor is used to execute the computer program to: determine an editable to be processed Image; determine the target node of the editable image to be edited; determine the binding data of the attribute of the target node; generate the target according to the editable image, the binding data, and the analysis method of the binding data
  • the code corresponding to the programming language.
  • Embodiments of the present application further provide a computer-readable storage medium storing a computer program, which when executed by one or more processors causes the one or more processors to implement the steps in the code generation method.
  • the code can flexibly cover the development scenarios of many view pages, and can generate the code of the view page with data binding function without manual coding, reducing the development labor cost and time, and achieving the unity of view page development.
  • FIG. 1A is a schematic flowchart of a code generation method according to an exemplary embodiment of the present application
  • FIG. 1B is a schematic flowchart of a code generation method according to another exemplary embodiment of the present application.
  • FIG. 1C is a schematic flowchart of a code generation method according to still another exemplary embodiment of the present application.
  • FIG. 2 is a schematic diagram of an editable image provided by an exemplary embodiment of the present application.
  • FIG. 3 is a schematic diagram of an interface for selecting attributes provided by an exemplary embodiment of the present application.
  • FIG. 4 is a schematic diagram of an interface for binding dynamic data provided by an exemplary embodiment of the present application.
  • FIG. 5 is a schematic diagram of an interface for generating code provided by an exemplary embodiment of the present application.
  • FIG. 6 is a schematic diagram of an editable image and view page after data binding is provided by an exemplary embodiment of the present application.
  • FIG. 7 is a schematic diagram of a code generation apparatus provided by another exemplary embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal device according to another exemplary embodiment of the present application.
  • having a good page layout allows users to have good visual effects when using the application, and can help users quickly and easily find the desired information or desired application functions, but the page The layout needs to be realized through the development of the view page code. As the style of the view page becomes more and more, the developer needs to develop the code of the view page of different styles, thereby creating more repetitive work for the developer.
  • select the editable target node in the editable image configure the binding data of the attribute of the target node; generate the target programming language according to the editable image, the binding data, and the analysis method of the binding data
  • the corresponding code can flexibly cover the development scenarios of many view pages, and can generate the code of the view page with data binding function without manual coding, reducing the development labor cost and time, and achieving the unity of view page development.
  • FIG. 1A is a schematic flowchart of a code generation method according to an exemplary embodiment of the present application.
  • the method 100A provided by the embodiment of the present application is executed by the terminal device in response to user operations (for example, selection operation and configuration operation, etc.), and the method 100A includes the following steps:
  • the terminal device may be any device with a certain computing capability, for example, it may be a smart phone, a notebook, a PC (personal computer), or the like.
  • the basic structure of the terminal device includes: at least one processor. The number of processors depends on the configuration and type of terminal equipment.
  • the terminal device may also include a memory, which may be volatile, such as RAM, or non-volatile, such as read-only memory (Read-Only Memory, ROM), flash memory, etc., or may include both Kinds of types.
  • An operating system Operating System, OS
  • one or more application programs, and program data may also be stored in the memory.
  • the terminal device also includes some basic configurations, such as a network card chip, IO bus, camera, and audio and video components.
  • the terminal device may also include some peripheral devices, such as a keyboard, a mouse, a stylus, a printer, and so on. Other peripheral devices are well known in the art, and will not be repeated here.
  • step 101 is that the terminal device selects the editable target node displayed in the editable image in response to the user's selection operation.
  • the editable image (also referred to as a static UI) refers to an image that is visible to the user without data bound to the nodes displayed in the programming language.
  • a node refers to an element in an editable image, for example, a title element, a picture element, and a price element in an editable image.
  • the target node is a node selected from at least one node.
  • the method 100A before responding to the selection operation, further includes: identifying a static structure of the acquired editable image, converting the static structure into a tree structure of a specified programming language, and displaying the editable image according to the tree structure ; Among them, the method 100B, 1001 as shown in FIG. 1B: by identifying at least one basic node and at least one advanced node from the tree structure, displayed in an editable image as an editable node, and the selected Any basic node or any advanced node is used as the target node; among them, the advanced node is obtained by transforming the basic node.
  • the static structure refers to the code structure of the designated programming language that contains the elements or nodes of the editable image obtained from the design application, for example, the code of the JSON programming language that contains multiple nodes.
  • the tree structure refers to a level of nested structure.
  • the outer and inner layers of a tree structure have similar structures, so this structure can be expressed recursively.
  • the various tree diagrams in the classic data structure are a typical tree structure: a tree can be simply represented as root, left subtree, and right subtree. The left and right subtrees have their own subtrees.
  • the tree structure of the JSON programming language contains the elements or nodes of the editable image, but the tree structure is more complicated than the static structure, and the static structure contains the elements of the editable image
  • the code structure of the node JSON programming language is not a tree structure.
  • the static structure can be converted into a JSON tree structure according to the algorithm of the tree structure of the JSON programming language.
  • the basic node refers to a node that can be directly identified, and may include a picture node, a text node (also called a text node), and a container node.
  • the container node refers to a node that wraps other nodes, for example, it may include a text node and/or a picture node.
  • Advanced nodes refer to nodes that can be converted from basic nodes.
  • the performance of the advanced node on the editable image is similar to the basic node, but contains other unique attributes.
  • the view module will become powerful due to these unique attributes.
  • the video node the video node appears as a picture node on the editable image, but the node can be determined as the video node according to its node name, because the attributes of the video node can include video stream and playback information, etc., different from the picture node Attributes, such as picture links, etc. Therefore, the video node belongs to the advanced node, and the picture node embodied on the editable image should be converted into a video node.
  • the attribute refers to the characteristics of the node, and the parameters can be configured. For example, text content, picture style, etc.
  • the user exports the data of the shopping editable image of the node unbound data from the image design application XX installed locally on the terminal device, for example, the programming language of the XX application that contains the node of the shopping editable image, the node may include Commodity picture node, commodity title node, commodity price node, shopping cart node, purchase node, etc.
  • the image design application XX automatically converts the programming language of the shopping editable image data of the XX application into a JSON programming language that contains the node of the shopping editable image, and stores it in the local storage space of the terminal device, the terminal device will The JSON programming language is imported into the code generation application YY that is installed locally on the terminal device.
  • the application YY After receiving the JSON programming language, the application YY recognizes the data in the JSON programming language, according to the algorithm of the tree structure of the JSON programming language, The JSON programming language is converted into a JSON tree structure, and the JSON tree structure includes nodes arranged in the form of a tree. After the JSON tree structure is generated, the JSON tree structure can be converted into the XML programming language or other interface layout programming languages according to the conversion algorithm of the XML programming language, so as to display the shopping editable image and identify each of the JSON tree structures Node, according to the conversion algorithm of the XML programming language, an editable node is generated in the editable image.
  • FIG. 2 shows the interface 200 of the application YY, in which the shopping for unbound data of the node is displayed.
  • the editable shopping images in the interface 200 include editable commodity picture nodes and commodity title nodes.
  • the commodity picture node may be a picture node or a video node, and the commodity title node may be a commodity title node.
  • the shopping editable image may include many nodes, only for illustration, only two nodes are illustrated here.
  • identifying at least one basic node and at least one high-level node from the tree structure includes: identifying at least one node from the tree structure as the basic node; according to the node name, obtaining from at least one basic node The node to be converted is converted, and the node to be converted is converted into an advanced node.
  • the application program YY of the terminal device can identify each basic node, picture node, and/or text node in the JSON tree structure according to the node identifier, according to the node name "Video" identifies the node to be converted corresponding to the name of the node from the basic node, and converts the node into an advanced node: a video node.
  • the advanced node is more complicated than the basic node in the actual application scenario, but in order to reflect the node in the editable image, it can be displayed through the display of the basic node, and the basic node needs to be Further inspection or verification determines whether the basic node is an advanced node.
  • the method 100B further includes: 1002: Acquiring at least one attribute corresponding to the target node according to the selected target node; in response to the attribute viewing operation, displaying the acquired at least one attribute ; In response to the attribute selection operation, select the attribute of the target node.
  • the terminal device when the user selects the target node, the terminal device also shows that the product title node is selected on the shopping editable image: after the product title node, the user performs attribute review on the product title node, the terminal device’s
  • the application YY may search or obtain corresponding attributes, such as text content attributes, display attributes, and hidden attributes, for the product title node or the text node to which the product title node belongs. And these attributes can be displayed to the user in the form of a list. The user selects one of the attributes according to the attributes displayed in the list, such as the text content attribute.
  • the application YY of the terminal device selects the text content attribute as The attribute of the item title node.
  • FIG. 3 shows an interface 300 for attribute selection.
  • the user selects the commodity title node as the target node.
  • the interface 300 displays the attribute list for The user selects the attribute.
  • the user selects the text attribute from the attribute list, the text attribute is displayed in the attribute selection box.
  • the method 100A further includes: acquiring and displaying at least one attribute corresponding to the target node according to the selected target node, wherein at least one attribute is sorted according to the selection frequency from large to small; in response to the attribute selection operation , Select the attribute of the target node.
  • the attribute of the node has priority due to different use frequency or selection frequency, such as the text content attribute of the text node, and the image address attribute of the picture node, which account for more than 80% of the data binding scenarios.
  • the higher frequency attribute of the most commonly used node is placed in the recommended position and the operation is prioritized. This is purposely made for the user's ease of use and maximizes ease of use.
  • the attributes of this node provide users with a better experience and achieve the effect of intelligent matching attributes. If the user does not want to configure this attribute for the node, he can choose the attribute again in the above manner.
  • this interface 300 the user selects the product title node as the target node, and the YY application of the terminal device directly displays the frequency of use or selects the frequency from high to low according to the text node to which the target node belongs (That is, from large to small) the attribute list for the user to choose. After the user selects the attribute he wants from the list, it is displayed in the attribute selection box of the node. or
  • the YY application of the terminal device obtains the corresponding attribute with the highest frequency of use or selection according to the text node to which the target node belongs, and directly displays the corresponding attribute with the highest frequency of use or selection frequency in the attribute selection box of the node.
  • step 102 is that the terminal device configures the binding data of the attribute of the target node in response to the user's configuration operation.
  • step 102 may also be that the terminal directly performs an automatic configuration operation to realize the binding data of configuring the attributes of the target node.
  • configuring the binding data of the attribute of the target node includes: 1003: in response to the selection operation of the static binding data, determining that the binding data is a static value; in response to the input of the binding data Operation to determine the binding data of the target node's attributes.
  • the binding data refers to the associated data that associates the program variables or static data with text, pictures, etc. in the editable image, and is used as the attribute value of the target node attribute; then data binding is the process of this association.
  • the binding data may include static data and dynamic data.
  • Static values also called static data refer to: immutable constants in the programming language, that is, static attribute values that do not change with other data sources, such as text, image links, and so on.
  • the user configures binding data for the text content attribute of the product title node: the product title node, and when the user wants to configure the node
  • it is static value or static data
  • select the static binding data in the shopping editable image select the static binding data in the shopping editable image.
  • the YY application of the terminal device responds to the selection operation and determines that the binding data is a static value.
  • the user is in the shopping editable image Choose the type of data, for example, select the "text" type, and manually enter the static data "new sweater 20XX new style" in the binding data box, as the binding data, the YY application of the terminal device responds to the input operation To obtain the input binding data and display it in the binding data box.
  • the data type can be used to perform data calibration on the binding data input by the user to determine whether the binding data is the data type.
  • configuring the binding data of the target node's attributes includes: 1004: In response to the dynamic binding data selection operation, determining that the binding data is a dynamic value; acquiring and displaying the target The data source selection list corresponding to the attribute of the node; in response to the selection operation on the data source, an acquisition path of the bound data of the attribute of the target node is generated.
  • dynamic values also called dynamic data
  • dynamic data refers to variables in the programming language. It is just a placeholder when there is no actual data.
  • the data source selection list (also called dynamic data list) refers to a list composed of dynamic data from different data platforms.
  • a value path (also referred to as an acquisition path or index) of dynamic data can be generated in a selected manner.
  • the user configures binding data for the text content attribute of the product title node: the product title node, and when the user wants to configure the node In dynamic value or dynamic data, select dynamic binding data in the shopping editable image.
  • the YY application of the terminal device responds to the selection operation and determines that the binding data is a dynamic value.
  • the user is in the shopping editable image Choose the data type of the data type, for example, select the "text" type, and the YY application of the terminal device obtains a data source selection list corresponding to the attribute according to the attribute.
  • the selection list may include characters indicating the title of the commodity, indicating the commodity Characters such as numeric IDs, characters representing cities, characters representing popularity, etc.
  • the obtained data source selection list is displayed.
  • the character representing the title of the product in the data source selection list is selected as the dynamic binding data of the attribute.
  • the YY application determines that the binding data is a character representing the title of the product, and displays it in the binding data frame, and at the same time can determine the acquisition path or indexing method corresponding to the dynamic binding data to obtain the binding Data, which forms the binding of the node to dynamic data.
  • FIG. 4 shows an interface 400 for binding dynamic data.
  • the dynamic content is bound to the text content attribute “Inner” of the product title node, and the dynamic data is determined, that is, the binding data is text, and
  • the YY application of the terminal device responds to the selection operation and displays the corresponding data source selection list. After the user selects the dynamic binding data, the binding will be displayed in the binding data box. data.
  • the interface 500 shows the dynamic binding data of the attribute after binding.
  • the attribute of the high-frequency operation can also be directly placed in the attribute selection box as the default attribute of the node, which is convenient for the user to directly manipulate this attribute.
  • nodes In the vertical domain, nodes have certain characteristics, and the data they can bind is rule-based. The terminal device can guess the data that the node is most likely to bind and automatically execute the data binding process to achieve the effect of intelligent matching attributes. If the user does not want to configure this attribute for the node, he can select the attribute and bind data again according to his own choice.
  • the terminal device after the terminal device determines that the target node is a product title node, the terminal device directly determines the high-frequency operation attribute as the text content attribute, and directly determines the binding data of the text content attribute as the high frequency according to the text content attribute Operation binding data, such as "aa”, and use the high-frequency operation binding data as the binding data of the text content attribute. or,
  • the binding data list of the text content attribute is directly determined according to the text content attribute.
  • the binding data in the binding data list is sorted according to the appearance frequency or the selection frequency from large to small.
  • the user selects from the binding data list Select the binding data that you want, and the terminal device determines the binding data of the attribute in response to the selection operation.
  • the method 100B further includes: 1005: After responding to the dynamic binding data selection operation, but not displaying the data source selection list corresponding to the attribute of the target node, responding to the input operation of obtaining the path To determine the acquisition path of the binding data of the attribute of the target node.
  • the YY application of the terminal device determines that the binding data is a dynamic value in response to the selection operation, and the user is in the shopping editable image.
  • Select the data type for example, select the "text" type.
  • the YY application of the terminal device does not obtain a reliable data source corresponding to the attribute according to the attribute, the data source selection list will not be generated.
  • the user When the current interface does not display the data source selection list, the user manually enters the acquisition path or index “ZZ” of dynamic data in the bound data frame as the bound data, and displays it in the bound data frame.
  • the user can continue to select the desired target node and configure the binding data of the attributes of the subsequent target node until the user completes the data binding of all the desired target node attributes.
  • data binding can be continued for other attributes of the same target node until the user completes all desired data binding of the attribute of the target node .
  • the method 100A further includes generating a description file representing the set of binding data for the binding data of the attribute of at least one target node.
  • the view module can be given different functions or processing methods, so that the view module generated in this way can be adapted to multiple platforms and multiple scenarios.
  • a description file of the collection of binding data is generated, thereby completing a complete data structure.
  • the description file can increase the simulation function of the value path, and has a reference meaning to the value path, thereby simulating other value paths.
  • a series of functions, such as centralized detection of the data legitimacy of the bound data can be determined to determine whether the bound data is legal and whether there are problems.
  • step 103 may be that the terminal device generates a code corresponding to the target programming language according to the editable image, the binding data, and the binding data analysis method in response to the user's generating operation.
  • step 103 may also be that the terminal directly performs an automatic generation operation, and generates a code corresponding to the target programming language according to the editable image, the binding data, and the binding data analysis method.
  • the parsing method refers to the method of acquiring bound data, for example, the method of data connection with the platform where the data source is located.
  • the code corresponding to the target programming language is generated according to the editable image, the binding data, and the binding data parsing method.
  • the code corresponding to the target programming language is generated according to the editable image, the binding data, and the binding data parsing method, including: converting the editable image with the binding data and the binding data parsing method to the target The code corresponding to the programming language.
  • the editable image with the binding data and the analysis method of the binding data are converted into codes corresponding to the target programming language, including: 1006: in response to the selection operation of the programming language, determining the target programming language and programming with the target Parsing algorithm corresponding to the language; in response to the code generation operation, according to the parsing algorithm, the editable image configured with the binding data is encoded in the target programming language to generate the editable image code; 1007: according to the parsing algorithm, the binding data The parsing method encodes the target programming language and generates the binding data parsing code.
  • the method 100A further includes: publishing the editable image code and the binding data parsing code to generate the corresponding view module.
  • the programming language refers to the formal language used to define the computer program, which may include multiple different development programming languages, which is no longer limited here.
  • the parsing algorithm refers to an algorithm used to convert the editable image with bound data and the parsing method of the bound data into the corresponding code of the target programming language.
  • the terminal device configures binding data for at least one node on the shopping editable image and at least one attribute of the node
  • the user selects the target programming language on the interface of the YY application, and can also The corresponding application scenario is set on this interface.
  • the YY application program of the terminal device responds to the code generation operation to determine the analysis algorithm corresponding to the target programming language.
  • the method for generating the static view page code corresponding to the target programming language, the parsing algorithm encodes the shopping editable image with the binding data set, and generates the shopping static page code.
  • FIG. 5 shows an interface 500 for generating the code.
  • the user can view the combined code.
  • the user clicks the release control in the interface 500 Publish the combined code
  • the YY application program of the terminal device responds to the publish operation, publishes the combined code, and generates a view module.
  • FIG. 6 shows a comparison diagram 600 of a front-end shopping view page 600B and an editable image 600A in an online shopping scenario generated by the view module.
  • a view module is generated, and the developer forms a visual view page 600B by using the view module, and the binding data has been displayed in the View page 600B.
  • FIG. 1C is a schematic flowchart of a code generation method according to an exemplary embodiment of the present application.
  • the method 100C provided by the embodiment of the present application is executed by the terminal device in response to user operations (for example, acquisition operation, selection operation, selection operation, configuration operation, and generation operation, etc.).
  • the method 100C includes the following steps:
  • the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
  • a user performs an acquisition operation on the interface of a code-generating application installed locally on the computer.
  • the application acquires a JSON programming language containing nodes for shopping editable images locally from the computer and converts it into a JSON tree structure. Then convert the JSON tree structure into an XML programming language, and run the XML language to display the shopping editable image and various nodes on the shopping editable image.
  • the user performs a selection operation on the interface of the application program of the computer, selects any node on the shopping editable image as the target node, and the computer selects the target node in response to the selection operation.
  • the user performs a selection operation on the interface of the application program of the computer to select an attribute of the target node, and the computer selects the attribute of the target node in response to the selection operation.
  • the user performs a configuration operation on the interface of the application program of the computer to configure the binding data of the attribute, and the computer configures the binding data of the attribute in response to the configuration operation.
  • the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
  • the user performs the generation operation on the interface of the application program of the computer, and generates the code corresponding to the target programming language for the shopping editable image with the binding data and the analysis method of the binding data.
  • the computer generates the code corresponding to the target programming language by combining the shopping editable image with the binding data and the analysis method of the binding data.
  • Scenario 1 Export the data of an editable image in the design tool s on the PC (Personal Computer), and import it into the PC-generated code application to obtain a static UI of the editable image. Select the title node and text content attributes in the static UI, and choose to bind the dynamic data source. Since the title node is the title of the product, the attribute and the product data source-title data are bound together. After determining the binding relationship, you can do additional operations on the binding, such as making the number of text not more than 12, such as the generation of simulated data, and view the code. You can see through the code that the title is already the bound data Finally, the code is released.
  • PC Personal Computer
  • the operation of the static UI embodied by the idea of data binding can basically replace the developer code, which can help solve the current pain points in the industry and liberate this part of productivity.
  • FIG. 7 is a schematic structural diagram of a code generation apparatus according to another exemplary embodiment of the present application.
  • the apparatus 700 can be applied to a terminal device.
  • the apparatus 700 includes a selection module 701, a configuration module 702, and a generation module 703. The functions of each module are described in detail below:
  • the selection module 701 is configured to select the editable target node displayed in the editable image in response to the selection operation.
  • the configuration module 702 is configured to configure the binding data of the attribute of the target node in response to the configuration operation.
  • the generating module 703 is configured to generate the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
  • the device 700 further includes: a first recognition module for recognizing the static structure of the obtained editable image, converting the static structure into a tree structure of a specified programming language, and displaying the editable according to the tree structure Image; wherein, the second recognition module is used to identify at least one basic node and at least one high-level node from the tree structure, display it in the editable image as an editable node, and select any base
  • the node or any high-level node is regarded as the target node; among them, the high-level node is obtained by transforming the basic node.
  • the second identification module is used to identify at least one node from the tree structure as a basic node; according to the node name, obtain the node to be converted from the at least one basic node, and the node to be converted Convert to advanced node.
  • the device 700 further includes: a first acquisition module for acquiring at least one attribute corresponding to the target node according to the selected target node; a display module for responding to the attribute The viewing operation displays at least one acquired attribute; the first selection module is used to select the attribute of the target node in response to the attribute selection operation.
  • the apparatus 700 further includes: a second acquisition module for acquiring and displaying at least one attribute corresponding to the target node according to the selected target node, wherein at least one attribute is sorted according to the selection frequency; the second selection module , Used to select the attribute of the target node in response to the attribute selection operation.
  • the configuration module 702 is configured to determine the binding data as a static value in response to the selection operation of the static binding data; and determine the binding data of the attribute of the target node in response to the input operation of the binding data.
  • the configuration module 702 includes: a first determining unit for determining that the binding data is a dynamic value in response to a dynamic binding data selection operation; and an acquiring unit for acquiring and displaying the target node The data source selection list corresponding to the attribute of the; the first generating unit is configured to generate an acquisition path of the binding data of the attribute of the target node in response to the selection operation of the data source.
  • the apparatus 700 further includes: a determination module for responding to the acquisition path after not responding to the dynamic binding data selection operation and not displaying the data source selection list corresponding to the attribute of the target node The input operation determines the acquisition path of the binding data of the attribute of the target node.
  • the binding data is used as the attribute value of the attribute of the target node.
  • the generating module 703 is configured to generate a description file representing the set of binding data for the binding data of the attribute of at least one target node.
  • the generation module 703 is used to convert the editable image with the binding data and the parsing method of the binding data into the code corresponding to the target programming language.
  • the generation module 703 includes: a second determination unit for determining a target programming language and a parsing algorithm corresponding to the target programming language in response to a selection operation of the programming language; a second generation unit for responding to code The generating operation is based on the parsing algorithm, and the editable image with the binding data is encoded in the target programming language to generate the editable image code; the third generating unit is used to target the binding data parsing method according to the parsing algorithm The coding of the programming language to generate the binding data analysis code.
  • the device 700 further includes: a publishing module, configured to publish the editable image code and the binding data parsing code to generate a corresponding view module.
  • the structure of the generating device 700 shown in FIG. 7 may be implemented as a terminal device, as shown in FIG. 8, the terminal device 800 It may include: a memory 801 and a processor 802;
  • the memory 801 is used to store computer programs
  • the processor 802 is used to execute a computer program for:
  • the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
  • the processor 802 is also used to: identify the static structure of the obtained editable image, convert the static structure into a tree structure of a specified programming language, and display the editable image according to the tree structure; Identify at least one basic node and at least one advanced node in the tree structure, display it in an editable image as an editable node, and use any selected basic node or any advanced node as the target node; Nodes are obtained through the conversion of basic nodes.
  • the processor 802 is specifically configured to: identify at least one node from the tree structure as a basic node; obtain the node to be converted from the at least one basic node according to the node name, and convert the node to be converted The node is converted to an advanced node.
  • the processor 802 is further configured to: according to the selected target node, obtain at least one attribute corresponding to the target node; in response to the attribute viewing operation, display the obtained at least one attribute; In response to the attribute selection operation, the attribute of the target node is selected.
  • the processor 802 is further configured to: acquire and display at least one attribute corresponding to the target node according to the selected target node, where at least one attribute is sorted according to the selection frequency; the second selection module is used to respond to the attribute Select operation, select the attribute of the target node.
  • the processor 802 is specifically configured to: in response to the selection operation of the static binding data, determine the binding data as a static value; in response to the input operation of the binding data, determine the binding data of the attribute of the target node .
  • the processor 802 is specifically configured to: in response to the selection operation of the dynamic binding data, determine that the binding data is a dynamic value; obtain and display a data source selection list corresponding to the attribute of the target node; respond For the selection operation of the data source, an acquisition path of the binding data of the attribute of the target node is generated.
  • the processor 802 is further configured to: in response to the selection operation of the dynamic binding data, without displaying the data source selection list corresponding to the attribute of the target node, in response to the input operation of obtaining the path, Determine the acquisition path of the binding data of the attribute of the target node.
  • the binding data is used as the attribute value of the attribute of the target node.
  • the processor 802 is specifically configured to: for the binding data of the attribute of at least one target node, generate a description file representing the set of binding data.
  • the processor 802 is specifically configured to: convert the editable image with the binding data and the analysis method of the binding data into the code corresponding to the target programming language.
  • the processor 802 is specifically configured to: in response to the selection operation of the programming language, determine the target programming language and the parsing algorithm corresponding to the target programming language; in response to the code generation operation, bind the configuration according to the parsing algorithm
  • the editable image of the fixed data is encoded in the target programming language to generate the editable image code; according to the analysis algorithm, the target programming language is encoded in the binding data analysis method to generate the binding data analysis code.
  • the processor 802 is also used to publish the editable image code and the binding data analysis code to generate the corresponding view module.
  • an embodiment of the present invention provides a computer storage medium.
  • the one or more processors are caused to implement the steps of the code generation method in the method embodiment of FIG. 1A.
  • the device 900 can be applied to a terminal device.
  • the device 900 includes a display module 901, a selection module 902, a selection module 903, a configuration module 904, and a generation module 905.
  • the functions of each module are described in detail below:
  • the display module 901 is configured to obtain and display an editable image in response to the obtaining operation.
  • the selection module 902 is configured to select the editable target node displayed in the editable image in response to the selection operation.
  • the selection module 903 is configured to select attributes of the target node in response to the selection operation.
  • the configuration module 904 is configured to configure the binding data of the attribute of the target node in response to the configuration operation.
  • the generating module 905 is configured to generate a code corresponding to the target programming language according to the editable image, the binding data, and the binding data analysis method in response to the generating operation.
  • the structure of the generating device may be implemented as a terminal device, and the terminal device may include: a memory 1001 and a processor 1002;
  • the memory 1001 is used to store a computer program
  • the processor 1002 is configured to execute a computer program for: acquiring and displaying an editable image in response to the acquiring operation; selecting an editable target node displayed in the editable image in response to the selecting operation; and responding to the selecting operation, Select the attributes of the target node; in response to the configuration operation, configure the binding data of the target node's attributes; in response to the generation operation, generate the code corresponding to the target programming language according to the editable image, the binding data, and the binding data parsing method.
  • an embodiment of the present invention provides a computer storage medium.
  • the one or more processors When a computer program is executed by one or more processors, the one or more processors cause the steps of the code generation method in the method embodiment of FIG. 1C to be implemented.
  • An exemplary embodiment of the present application also provides a code generation method.
  • the method provided by the embodiment of the present application is executed by the terminal device in response to the user's operation and the terminal's automatic operation.
  • the method includes the following steps:
  • determining the target node of the editable image to be edited includes: providing an interface for the user to select the target node to be edited; based on the user selection, determining the target node to be edited.
  • determining the binding data of the attribute of the target node includes: obtaining the corresponding attribute and the binding data of the attribute according to the target node.
  • determining the binding data of the attribute of the target node includes: obtaining the corresponding attribute and the binding data list corresponding to the attribute according to the target node, wherein the binding data in the binding data list is based on the selection frequency Sorted from large to small; in response to the selection operation of the binding data, the binding data of the attribute of the target node is selected.
  • the terminal device after the terminal device determines that the target node is a product title node, the terminal device directly determines the high-frequency operation attribute as the text content attribute, and directly determines the binding data of the text content attribute as the high frequency according to the text content attribute Operation binding data, such as "aa”, and use the high-frequency operation binding data as the binding data of the text content attribute. or,
  • the binding data list of the text content attribute is directly determined according to the text content attribute.
  • the binding data in the binding data list is sorted according to the appearance frequency or the selection frequency from large to small.
  • the user selects from the binding data list Select the binding data that you want, and the terminal device determines the binding data of the attribute in response to the selection operation.
  • the device can be applied to terminal equipment.
  • the device includes a first determination module, a second determination module, a third determination module, and a generation module.
  • the functions of each module are described in detail below:
  • the first determining module is used to determine the editable image to be processed
  • the second determination module is used to determine the target node of the editable image to be edited
  • the third determining module is used to determine the binding data of the attribute of the target node
  • the generating module is used to generate the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
  • the structure of the generating device may be implemented as a terminal device, and the terminal device may include: a memory and a processor;
  • Memory used to store computer programs
  • a processor for executing the computer program for:
  • the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
  • the embodiments of the present invention provide a computer storage medium.
  • the computer program is executed by one or more processors, the one or more processors are caused to implement steps 111-114 of the code generation method in the foregoing method embodiment.
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located One place, or can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement without paying creative labor.
  • each embodiment can be implemented by adding a necessary universal hardware platform, and of course, can also be implemented by a combination of hardware and software.
  • the above technical solution can be embodied in the form of a computer product in essence or part of the contribution to the existing technology, and the present invention can adopt one or more computer-usable storages containing computer-usable program code
  • the form of the computer program product implemented on media including but not limited to disk storage, CD-ROM, optical storage, etc.).
  • each flow and/or block in the flowchart and/or block diagram and a combination of the flow and/or block in the flowchart and/or block diagram may be implemented by computer program instructions.
  • These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable multimedia data processing device to produce a machine that causes instructions to be executed by the processor of the computer or other programmable multimedia data processing device Means for generating the functions specified in a block or blocks of a flowchart or a flow and/or a block diagram.
  • These computer program instructions may also be stored in a computer readable memory that can guide a computer or other programmable multimedia data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including instruction means, which The instruction device implements the functions specified in one block or multiple blocks in the flowchart one flow or multiple flows and/or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable multimedia data processing device so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing to be executed on the computer or other programmable device
  • the instructions provided provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in a computer-readable medium, such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • Computer-readable media including permanent and non-permanent, removable and non-removable media, can store information by any method or technology.
  • the information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A code generation method and apparatus, and a device and a storage medium. The method comprises: selecting an editable target node in an editable image and configuring bound data of attributes of the target node; and generating, according to the editable image, the bound data, and a bound data parsing mode, a code corresponding to a target programming language. Thus, the development scenarios of many view pages can be flexibly covered, and a code for the view pages having a data binding function can be generated without manual encoding, thereby reducing the development labor costs and time, and achieving the unity of view page development.

Description

代码的生成方法、装置、设备及存储介质Code generation method, device, equipment and storage medium
本申请要求2019年01月06日递交的申请号为201910014443.9、发明名称为“代码的生成方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application with the application number 201910014443.9 and the invention titled "Code generation method, device, equipment and storage medium" submitted on January 06, 2019, the entire content of which is incorporated by reference in this application .
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种代码的生成方法、装置、设备及存储介质。This application relates to the field of computer technology, and in particular, to a code generation method, device, device, and storage medium.
背景技术Background technique
随着计算机的发展,编程语言的快速演进,以及网络平台的多样化,视图图像的设计软件从传统的Photoshop向sketch逐渐演进。然而设计软件的统一并没有带来静态页面代码的统一。重复的开发相似的模块是UI开发者永恒不变的痛点。With the development of computers, the rapid evolution of programming languages, and the diversification of network platforms, view image design software has gradually evolved from traditional Photoshop to sketch. However, the unification of design software does not bring about the unification of static page code. Repeated development of similar modules is a constant pain point for UI developers.
发明内容Summary of the invention
本申请的多个方面提供一种代码的生成方法、装置、设备及存储介质,用以灵活、快速且方便地生成视图图像对应的代码,且减少开发的人力成本。Various aspects of the present application provide a code generation method, device, device, and storage medium to flexibly, quickly, and conveniently generate codes corresponding to view images, and reduce development labor costs.
本申请实施例提供一种代码的生成方法,包括:响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;响应于配置操作,配置所述目标节点的属性的绑定数据;根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application provides a code generation method, which includes: in response to a selection operation, selecting an editable target node displayed in an editable image; and in response to a configuration operation, configuring binding data of attributes of the target node; According to the editable image, the binding data, and the analysis method of the binding data, a code corresponding to the target programming language is generated.
本申请实施例还提供一种代码的生成装置,包括:选择模块,用于响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;配置模块,用于响应于配置操作,配置所述目标节点的属性的绑定数据;生成模块,用于根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application also provides a code generation device, including: a selection module for selecting an editable target node displayed in an editable image in response to a selection operation; a configuration module for configuring in response to the configuration operation Binding data of the attributes of the target node; a generating module, configured to generate a code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
本申请实施例还提供一种设备,包括存储器以及处理器;所述存储器,用于存储计算机程序;所述处理器,用于执行所述计算机程序,以用于:响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;响应于配置操作,配置所述目标节点的属性的绑定数据;根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application further provides a device, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to: in response to a selection operation, select The editable target node displayed in the editable image; in response to the configuration operation, configure the binding data of the attribute of the target node; according to the editable image, the binding data, and the method of parsing the binding data To generate the code corresponding to the target programming language.
本申请实施例还提供一种存储有计算机程序的计算机可读存储介质,计算机程序被一个或多个处理器执行时,致使所述一个或多个处理器实现上述代码的生成方法中的步骤。Embodiments of the present application also provide a computer-readable storage medium that stores a computer program. When the computer program is executed by one or more processors, the one or more processors cause the one or more processors to implement the steps in the above code generation method.
本申请实施例还提供一种代码的生成方法,包括:响应于获取操作,获取并展示可编辑图像;响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;响应于选择操作,选择所述目标节点的属性;响应于配置操作,配置所述目标节点的属性的绑定数据;响应于生成操作,根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application also provides a code generation method, including: acquiring and displaying an editable image in response to an acquisition operation; selecting an editable target node displayed in the editable image in response to a selection operation; and responding to a selection operation , Select the attribute of the target node; in response to the configuration operation, configure the binding data of the attribute of the target node; in response to the generating operation, according to the editable image, the binding data, and the binding data Analysis method to generate the code corresponding to the target programming language.
本申请实施例还提供一种代码的生成装置,包括:展示模块,用于响应于获取操作,获取并展示可编辑图像;选取模块,用于响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;选择模块,用于响应于选择操作,选择所述目标节点的属性;配置模块,用于响应于配置操作,配置所述目标节点的属性的绑定数据;生成模块,用于响应于生成操作,根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application also provides a code generation device, including: a display module for acquiring and displaying an editable image in response to an acquisition operation; a selection module for selecting an image displayed in an editable image in response to the selection operation Editable target node; selection module for selecting the attribute of the target node in response to the selection operation; configuration module for configuring binding data of the attribute of the target node in response to the configuration operation; generation module for In response to the generating operation, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
本申请实施例还提供一种设备,包括存储器以及处理器;所述存储器,用于存储计算机程序;所述处理器,用于执行所述计算机程序,以用于:响应于获取操作,获取并展示可编辑图像;响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;响应于选择操作,选择所述目标节点的属性;响应于配置操作,配置所述目标节点的属性的绑定数据;响应于生成操作,根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application further provides an apparatus, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to: in response to an acquisition operation, acquire and Display an editable image; select an editable target node displayed in an editable image in response to a selection operation; select an attribute of the target node in response to a selection operation; configure an attribute of the target node in response to a configuration operation Binding data; in response to the generating operation, according to the editable image, the binding data, and the binding data parsing method, generate a code corresponding to the target programming language.
本申请实施例还提供一种存储有计算机程序的计算机可读存储介质,计算机程序被一个或多个处理器执行时,致使所述一个或多个处理器实现上述代码的生成方法中的步骤。Embodiments of the present application also provide a computer-readable storage medium that stores a computer program. When the computer program is executed by one or more processors, the one or more processors cause the one or more processors to implement the steps in the above code generation method.
本申请实施例还提供一种代码的生成方法,包括:确定待进行处理的可编辑图像;确定所述可编辑图像待编辑的目标节点;确定所述目标节点的属性的绑定数据;根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application also provides a code generation method, including: determining an editable image to be processed; determining a target node of the editable image to be edited; determining binding data of attributes of the target node; according to The editable image, the binding data, and the analysis method of the binding data generate a code corresponding to the target programming language.
本申请实施例还提供一种代码的生成装置,包括:第一确定模块,用于确定待进行处理的可编辑图像;第二确定模块,用于确定所述可编辑图像待编辑的目标节点;第三确定模块,用于确定所述目标节点的属性的绑定数据;生成模块,用于根据所述可编辑 图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application also provides a code generation device, including: a first determination module for determining an editable image to be processed; a second determination module for determining a target node of the editable image to be edited; The third determining module is used to determine the binding data of the attribute of the target node; the generating module is used to generate the target programming language according to the editable image, the binding data and the analysis method of the binding data The corresponding code.
本申请实施例还提供一种设备,包括存储器以及处理器;所述存储器,用于存储计算机程序;所述处理器,用于执行所述计算机程序,以用于:确定待进行处理的可编辑图像;确定所述可编辑图像待编辑的目标节点;确定所述目标节点的属性的绑定数据;根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。An embodiment of the present application further provides a device, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to: determine an editable to be processed Image; determine the target node of the editable image to be edited; determine the binding data of the attribute of the target node; generate the target according to the editable image, the binding data, and the analysis method of the binding data The code corresponding to the programming language.
本申请实施例还提供一种存储有计算机程序的计算机可读存储介质,计算机程序被一个或多个处理器执行时,致使所述一个或多个处理器实现代码的生成方法中的步骤。Embodiments of the present application further provide a computer-readable storage medium storing a computer program, which when executed by one or more processors causes the one or more processors to implement the steps in the code generation method.
在本申请实施例中,选取可编辑图像中的可编辑的目标节点,配置目标节点的属性的绑定数据;根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码,从而能够灵活覆盖很多视图页面的开发场景,且无需人工编码即可生成具有数据绑定功能的视图页面的代码,减少开发人工成本与时间,实现视图页面开发的统一性。In the embodiment of the present application, select the editable target node in the editable image and configure the binding data of the attribute of the target node; according to the editable image, the binding data and the analysis method of the binding data, the target programming language correspondence is generated The code can flexibly cover the development scenarios of many view pages, and can generate the code of the view page with data binding function without manual coding, reducing the development labor cost and time, and achieving the unity of view page development.
附图说明BRIEF DESCRIPTION
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an undue limitation on the present application. In the drawings:
图1A为本申请一示例性实施例的代码的生成方法的流程示意图;FIG. 1A is a schematic flowchart of a code generation method according to an exemplary embodiment of the present application;
图1B为本申请又一示例性实施例的代码的生成方法的流程示意图;FIG. 1B is a schematic flowchart of a code generation method according to another exemplary embodiment of the present application;
图1C为本申请又一示例性实施例的代码的生成方法的流程示意图;1C is a schematic flowchart of a code generation method according to still another exemplary embodiment of the present application;
图2为本申请一示例性实施例提供的可编辑图像的示意图;2 is a schematic diagram of an editable image provided by an exemplary embodiment of the present application;
图3为本申请一示例性实施例提供的选择属性的界面示意图;3 is a schematic diagram of an interface for selecting attributes provided by an exemplary embodiment of the present application;
图4为本申请一示例性实施例提供的绑定动态数据的界面示意图;4 is a schematic diagram of an interface for binding dynamic data provided by an exemplary embodiment of the present application;
图5为本申请一示例性实施例提供的生成代码的界面示意图;5 is a schematic diagram of an interface for generating code provided by an exemplary embodiment of the present application;
图6为本申请一示例性实施例提供的绑定数据后的可编辑图像与视图页面示意图;6 is a schematic diagram of an editable image and view page after data binding is provided by an exemplary embodiment of the present application;
图7为本申请又一示例性实施例提供的代码的生成装置的示意图;7 is a schematic diagram of a code generation apparatus provided by another exemplary embodiment of the present application;
图8为本申请又一示例性实施例提供的一种终端设备的结构示意图。FIG. 8 is a schematic structural diagram of a terminal device according to another exemplary embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相 应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be described clearly and completely in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
对于前端应用程序而言,具有良好的页面布局使得用户在使用该应用程序时,具有较好的视觉效果,且能够帮助用户快速且方便地找到想要的信息或想要的应用功能,然而页面布局需要通过对视图页面代码的开发来实现,随着视图页面的样式越来越多,开发人员需要对不同样式的视图页面的代码进行开发,从而给开发人员制造了较多重复工作。For front-end applications, having a good page layout allows users to have good visual effects when using the application, and can help users quickly and easily find the desired information or desired application functions, but the page The layout needs to be realized through the development of the view page code. As the style of the view page becomes more and more, the developer needs to develop the code of the view page of different styles, thereby creating more repetitive work for the developer.
由于开发人员需要频繁的开发相同或相似的视图页面的代码,导致开发成本和页面复用成本较差,基于本申请方案,可以帮助开发人员快速地复用已生成的视图页面的代码,来进行不同样式的视图页面的代码开发,减少开发人员的重复工作。Because developers need to frequently develop the code for the same or similar view pages, resulting in poor development costs and page reuse costs, based on this application, it can help developers quickly reuse the code of the generated view pages to carry out The code development of different styles of view pages reduces the duplication of work for developers.
在本申请一些实施例中,选取可编辑图像中的可编辑的目标节点,配置目标节点的属性的绑定数据;根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码,从而能够灵活覆盖很多视图页面的开发场景,且无需人工编码即可生成具有数据绑定功能的视图页面的代码,减少开发人工成本与时间,实现视图页面开发的统一性。In some embodiments of the present application, select the editable target node in the editable image, configure the binding data of the attribute of the target node; generate the target programming language according to the editable image, the binding data, and the analysis method of the binding data The corresponding code can flexibly cover the development scenarios of many view pages, and can generate the code of the view page with data binding function without manual coding, reducing the development labor cost and time, and achieving the unity of view page development.
以下结合附图,详细说明本申请各实施例提供的技术方案。The technical solutions provided by the embodiments of the present application will be described in detail below in conjunction with the drawings.
图1A为本申请一示例性实施例的代码的生成方法的流程示意图。本申请实施例提供的该方法100A由终端设备响应用户的操作(例如,选取操作以及配置操作等)来执行,该方法100A包括以下步骤:FIG. 1A is a schematic flowchart of a code generation method according to an exemplary embodiment of the present application. The method 100A provided by the embodiment of the present application is executed by the terminal device in response to user operations (for example, selection operation and configuration operation, etc.), and the method 100A includes the following steps:
101:响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点。101: In response to the selection operation, select the editable target node displayed in the editable image.
102:响应于配置操作,配置目标节点的属性的绑定数据。102: In response to the configuration operation, configure the binding data of the attribute of the target node.
103:根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。103: Generate the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
需要说明的是,终端设备可以是任何具有一定计算能力的设备,例如,可以是智能手机、笔记本、PC(personal computer)电脑等。终端设备的基本结构包括:至少一个处理器。处理器的数量取决于终端设备的配置和类型。终端设备也可以包括存储器,该存储器可以为易失性的,例如RAM,也可以为非易失性的,例如只读存储器(Read-Only Memory,ROM)、闪存等,或者也可以同时包括两种类型。存储器内通常存储有操作系统(Operating System,OS)、一个或多个应用程序,也可以存储有程序数据等。除了 处理单元和存储器之外,终端设备还包括一些基本配置,例如网卡芯片、IO总线、摄像头以及音视频组件等。可选地,终端设备还可以包括一些外围设备,例如键盘、鼠标、输入笔、打印机等。其它外围设备在本领域中是众所周知的,在此不做赘述。It should be noted that the terminal device may be any device with a certain computing capability, for example, it may be a smart phone, a notebook, a PC (personal computer), or the like. The basic structure of the terminal device includes: at least one processor. The number of processors depends on the configuration and type of terminal equipment. The terminal device may also include a memory, which may be volatile, such as RAM, or non-volatile, such as read-only memory (Read-Only Memory, ROM), flash memory, etc., or may include both Kinds of types. An operating system (Operating System, OS), one or more application programs, and program data may also be stored in the memory. In addition to the processing unit and memory, the terminal device also includes some basic configurations, such as a network card chip, IO bus, camera, and audio and video components. Optionally, the terminal device may also include some peripheral devices, such as a keyboard, a mouse, a stylus, a printer, and so on. Other peripheral devices are well known in the art, and will not be repeated here.
以下针对上述步骤进行详细地阐述:The following describes the above steps in detail:
101:响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点。101: In response to the selection operation, select the editable target node displayed in the editable image.
需要说明的是,步骤101是终端设备响应于用户的选取操作,选取在可编辑图像中展示的可编辑的目标节点。It should be noted that step 101 is that the terminal device selects the editable target node displayed in the editable image in response to the user's selection operation.
其中,可编辑图像(也可以称为静态UI)是指通过编程语言展示的节点未绑定数据的用户可视的图像。The editable image (also referred to as a static UI) refers to an image that is visible to the user without data bound to the nodes displayed in the programming language.
节点是指可编辑图像中的元素,例如,可编辑图像中的标题元素、图片元素以及价格元素等。其中,目标节点就是从至少一个节点中选中的节点。A node refers to an element in an editable image, for example, a title element, a picture element, and a price element in an editable image. Among them, the target node is a node selected from at least one node.
在一些实例中,响应于选取操作之前,该方法100A还包括:识别获取到的可编辑图像的静态结构,将静态结构转换为指定编程语言的树形结构,并根据树形结构展示可编辑图像;其中,如图1B所示的方法100B,1001:通过从树形结构中识别出至少一个基础节点以及至少一个高级节点,展示在可编辑图像中,作为可编辑的节点,并将选取到的任一基础节点或任一高级节点作为目标节点;其中,高级节点是通过基础节点转化得到。In some examples, before responding to the selection operation, the method 100A further includes: identifying a static structure of the acquired editable image, converting the static structure into a tree structure of a specified programming language, and displaying the editable image according to the tree structure ; Among them, the method 100B, 1001 as shown in FIG. 1B: by identifying at least one basic node and at least one advanced node from the tree structure, displayed in an editable image as an editable node, and the selected Any basic node or any advanced node is used as the target node; among them, the advanced node is obtained by transforming the basic node.
其中,静态结构是指从设计应用中获取到的包含该可编辑图像各个元素或节点的指定编程语言的代码结构,如,包含多个节点的JSON编程语言的代码。Among them, the static structure refers to the code structure of the designated programming language that contains the elements or nodes of the editable image obtained from the design application, for example, the code of the JSON programming language that contains multiple nodes.
树形结构是指一层次的嵌套结构。一个树形结构的外层和内层有相似的结构,所以这种结构多可以递归的表示。经典数据结构中的各种树状图是一种典型的树形结构:一颗树可以简单的表示为根,左子树,右子树。左子树和右子树又有自己的子树。例如,JSON编程语言的树形结构,该树形结构包含该可编辑图像各个元素或节点,但该树形结构相较静态结构而言更加复杂,且,静态结构是包含该可编辑图像各个元素或节点JSON编程语言的代码结构,并非是树形结构。可以根据JSON编程语言的树形结构的算法,将静态结构转换为JSON树形结构。The tree structure refers to a level of nested structure. The outer and inner layers of a tree structure have similar structures, so this structure can be expressed recursively. The various tree diagrams in the classic data structure are a typical tree structure: a tree can be simply represented as root, left subtree, and right subtree. The left and right subtrees have their own subtrees. For example, the tree structure of the JSON programming language contains the elements or nodes of the editable image, but the tree structure is more complicated than the static structure, and the static structure contains the elements of the editable image The code structure of the node JSON programming language is not a tree structure. The static structure can be converted into a JSON tree structure according to the algorithm of the tree structure of the JSON programming language.
其中,基础节点是指可直接识别出的节点,可以包括图片节点、文字节点(也可以称为文本节点)以及容器节点。其中,容器节点是指包裹其他节点的节点,如,可以包括文字节点和/或图片节点。The basic node refers to a node that can be directly identified, and may include a picture node, a text node (also called a text node), and a container node. The container node refers to a node that wraps other nodes, for example, it may include a text node and/or a picture node.
高级节点是指可以由基础节点转换得到的节点。Advanced nodes refer to nodes that can be converted from basic nodes.
需要说明的是,高级节点在可编辑图像上的表现和基础节点有近似,但含有其他特有的属性,视图模块会因这些特有属性而变得功能强大。例如,视频节点,视频节点在可编辑图像上表现为一个图片节点,但可以根据其节点名称确定该节点为视频节点,由于视频节点的属性可以包括视频流以及播放信息等,不同于图片节点的属性,如图片链接等,故,该视频节点属于高级节点,应将其在可编辑图像上体现为的图片节点转化为视频节点。It should be noted that the performance of the advanced node on the editable image is similar to the basic node, but contains other unique attributes. The view module will become powerful due to these unique attributes. For example, the video node, the video node appears as a picture node on the editable image, but the node can be determined as the video node according to its node name, because the attributes of the video node can include video stream and playback information, etc., different from the picture node Attributes, such as picture links, etc. Therefore, the video node belongs to the advanced node, and the picture node embodied on the editable image should be converted into a video node.
其中,属性是指节点的特征,并可配置参数。如,文字内容、图片样式等等。Among them, the attribute refers to the characteristics of the node, and the parameters can be configured. For example, text content, picture style, etc.
例如,用户从终端设备本地安装的图像设计应用程序XX中导出节点未绑定数据的购物可编辑图像的数据,如,包含该购物可编辑图像的节点的XX应用程序的编程语言,节点可以包括商品图片节点、商品标题节点、商品价格节点、购物车节点以及购买节点等等。图像设计应用程序XX将该XX应用程序的购物可编辑图像的数据的编程语言自动转化为包含该购物可编辑图像的节点的JSON编程语言,并存储在终端设备本地的存储空间内,终端设备将该JSON编程语言导入到终端设备本地安装的代码生成应用程序YY中,该应用程序YY接收到该JSON编程语言后,识别该JSON编程语言中的数据,根据JSON编程语言的树形结构的算法,将该JSON编程语言转换为JSON树形结构,该JSON树形结构中包括以树的形式排列的节点。当生成JSON树形结构后,可以根据XML编程语言的转换算法,将JSON树形结构转换为XML编程语言或其他界面布局编程语言,从而展示该购物可编辑图像,以及识别JSON树形结构中各个节点,根据XML编程语言的转换算法,在该可编辑图像中生成可编辑的节点,图2示出了应用程序YY的界面200,在该界面200中展示了该节点未绑定数据的购物可编辑图像,以及该应用程序YY绑定数据栏以及图层栏。在界面200中的购物可编辑图像包括可编辑的商品图片节点以及商品标题节点等。其中,商品图片节点可以为图片节点或视频节点,商品标题节点可以为商品标题节点。应理解,该购物可编辑图像可以包括很多节点,仅仅为了举例说明,此处只举例了两个节点而已。用户在终端设备上看到该购物可编辑图像后,选取该购物可编辑图像中的商品标题节点,终端设备响应于与该选取操作,根据鼠标事件,确定该商品标题节点,并进行选取。并将该商品标题节点作为目标节点。For example, the user exports the data of the shopping editable image of the node unbound data from the image design application XX installed locally on the terminal device, for example, the programming language of the XX application that contains the node of the shopping editable image, the node may include Commodity picture node, commodity title node, commodity price node, shopping cart node, purchase node, etc. The image design application XX automatically converts the programming language of the shopping editable image data of the XX application into a JSON programming language that contains the node of the shopping editable image, and stores it in the local storage space of the terminal device, the terminal device will The JSON programming language is imported into the code generation application YY that is installed locally on the terminal device. After receiving the JSON programming language, the application YY recognizes the data in the JSON programming language, according to the algorithm of the tree structure of the JSON programming language, The JSON programming language is converted into a JSON tree structure, and the JSON tree structure includes nodes arranged in the form of a tree. After the JSON tree structure is generated, the JSON tree structure can be converted into the XML programming language or other interface layout programming languages according to the conversion algorithm of the XML programming language, so as to display the shopping editable image and identify each of the JSON tree structures Node, according to the conversion algorithm of the XML programming language, an editable node is generated in the editable image. FIG. 2 shows the interface 200 of the application YY, in which the shopping for unbound data of the node is displayed. Edit images, and the application YY binding data bar and layer bar. The editable shopping images in the interface 200 include editable commodity picture nodes and commodity title nodes. The commodity picture node may be a picture node or a video node, and the commodity title node may be a commodity title node. It should be understood that the shopping editable image may include many nodes, only for illustration, only two nodes are illustrated here. After seeing the shopping editable image on the terminal device, the user selects the commodity title node in the shopping editable image. In response to the selection operation, the terminal device determines the commodity title node according to the mouse event and selects it. And take the commodity title node as the target node.
在一些实例中,从树形结构中识别出至少一个基础节点以及至少一个高级节点,包括:将从树形结构中识别出至少一个节点作为基础节点;根据节点名称,从至少一个基础节点中获取出待转换的节点,并将待转换的节点转换为高级节点。In some examples, identifying at least one basic node and at least one high-level node from the tree structure includes: identifying at least one node from the tree structure as the basic node; according to the node name, obtaining from at least one basic node The node to be converted is converted, and the node to be converted is converted into an advanced node.
例如,根据前文所述,当得到该JSON树形结构后,终端设备的应用程序YY可以 根据节点标识识别该JSON树形结构中的各个基础节点,图片节点和/或文字节点,在根据节点名称“视频”从基础节点中识别出与该节点名称对应的待转换的节点,将该节点转化为高级节点:视频节点。For example, according to the foregoing, when the JSON tree structure is obtained, the application program YY of the terminal device can identify each basic node, picture node, and/or text node in the JSON tree structure according to the node identifier, according to the node name "Video" identifies the node to be converted corresponding to the name of the node from the basic node, and converts the node into an advanced node: a video node.
需要说明的是,高级节点在实际应用场景中相较基础节点更为复杂,但是为了在可编辑图像中体现出该节点,可以通过基础节点的展现方式进行展示,后续还需要对该基础节点进行进一步的检查或校验,确定出该基础节点是否为高级节点。It should be noted that the advanced node is more complicated than the basic node in the actual application scenario, but in order to reflect the node in the editable image, it can be displayed through the display of the basic node, and the basic node needs to be Further inspection or verification determines whether the basic node is an advanced node.
在一些实例中,在选取目标节点后,该方法100B还包括:1002:根据选取的目标节点,获取与该目标节点对应的至少一个属性;响应于属性的查看操作,展示获取到的至少一个属性;响应于属性的选择操作,选择该目标节点的属性。In some examples, after selecting a target node, the method 100B further includes: 1002: Acquiring at least one attribute corresponding to the target node according to the selected target node; in response to the attribute viewing operation, displaying the acquired at least one attribute ; In response to the attribute selection operation, select the attribute of the target node.
例如,根据前文所述,当用户选取目标节点后,终端设备也展示了在该购物可编辑图像上选取了商品标题节点:商品标题节点后,用户对该商品标题节点进行属性查看,终端设备的应用程序YY响应于该查看操作,可以针对该商品标题节点或该商品标题节点所属文字节点查找或获取对应的属性,如,文字内容属性、展示属性以及隐藏属性等等。并可以将这些属性通过列表的形式展示给用户,用户根据该列表中展示的属性,选择其中一个属性,如文字内容属性,终端设备的应用程序YY响应于该选择操作,选择该文字内容属性作为该商品标题节点的属性。其中,图3示出了属性选择的界面300,在该界面300中,用户选择了商品标题节点作为目标节点,在点击该商品标题节点对应的属性选择框,该界面300展示了属性列表以供用户选择属性,当用户从该属性列表中选择了文字属性后,该属性选择框中就会展示该文字属性。For example, according to the foregoing, when the user selects the target node, the terminal device also shows that the product title node is selected on the shopping editable image: after the product title node, the user performs attribute review on the product title node, the terminal device’s In response to the viewing operation, the application YY may search or obtain corresponding attributes, such as text content attributes, display attributes, and hidden attributes, for the product title node or the text node to which the product title node belongs. And these attributes can be displayed to the user in the form of a list. The user selects one of the attributes according to the attributes displayed in the list, such as the text content attribute. In response to the selection operation, the application YY of the terminal device selects the text content attribute as The attribute of the item title node. Among them, FIG. 3 shows an interface 300 for attribute selection. In this interface 300, the user selects the commodity title node as the target node. After clicking the attribute selection box corresponding to the commodity title node, the interface 300 displays the attribute list for The user selects the attribute. When the user selects the text attribute from the attribute list, the text attribute is displayed in the attribute selection box.
在一些实例中,该方法100A还包括:根据选取的目标节点,获取并展示与目标节点对应的至少一个属性,其中,至少一个属性根据选择频率由大到小进行排序;响应于属性的选择操作,选择该目标节点的属性。In some examples, the method 100A further includes: acquiring and displaying at least one attribute corresponding to the target node according to the selected target node, wherein at least one attribute is sorted according to the selection frequency from large to small; in response to the attribute selection operation , Select the attribute of the target node.
需要说明的是,节点的属性因使用频率或选择频率不同而存在优先级,比如文字节点的文字内容属性,图片节点的图片地址属性,经过统计占了80%以上的数据绑定场景。在节点选中时将最常用的节点的较高频率的属性置于推荐位置并优先操作。这是为了用户使用的易用性而特意作的,将易用性发挥到极致。It should be noted that the attribute of the node has priority due to different use frequency or selection frequency, such as the text content attribute of the text node, and the image address attribute of the picture node, which account for more than 80% of the data binding scenarios. When the node is selected, the higher frequency attribute of the most commonly used node is placed in the recommended position and the operation is prioritized. This is purposely made for the user's ease of use and maximizes ease of use.
此外,还可以直接将最高频率的属性直接置于属性选择框中,或直接将该最高频率的属性作为该节点的默认属性,展示在属性选择框,无需用户进行选择,直接为用户设定了该节点的属性,为用户提供了较好的使用体验,达到智能匹配属性的效果。若用户不想要为该节点配置该属性,则可以重新按照上述方式自主选择属性。In addition, you can directly put the highest frequency attribute directly in the attribute selection box, or directly use the highest frequency attribute as the default attribute of the node, and display it in the attribute selection box, without user selection, directly set for the user The attributes of this node provide users with a better experience and achieve the effect of intelligent matching attributes. If the user does not want to configure this attribute for the node, he can choose the attribute again in the above manner.
例如,根据前文所述,在该界面300中,用户选择了商品标题节点作为目标节点,终端设备的YY应用程序根据该目标节点所属的文字节点,直接展示出使用频率或选择频率从高到低(即由大到小)的属性列表,以供用户选择,用户从列表中选择自己想要的属性后,展示在该节点的属性选择框中。或For example, according to the foregoing, in this interface 300, the user selects the product title node as the target node, and the YY application of the terminal device directly displays the frequency of use or selects the frequency from high to low according to the text node to which the target node belongs (That is, from large to small) the attribute list for the user to choose. After the user selects the attribute he wants from the list, it is displayed in the attribute selection box of the node. or
终端设备的YY应用程序根据该目标节点所属的文字节点,获取使用频率最高或选择频率最高的对应属性,并直接在该节点的属性选择框中展示出使用频率最高或选择频率最高的对应属性。The YY application of the terminal device obtains the corresponding attribute with the highest frequency of use or selection according to the text node to which the target node belongs, and directly displays the corresponding attribute with the highest frequency of use or selection frequency in the attribute selection box of the node.
102:响应于配置操作,配置目标节点的属性的绑定数据。102: In response to the configuration operation, configure the binding data of the attribute of the target node.
需要说明的是,步骤102是终端设备响应于用户的配置操作,配置目标节点的属性的绑定数据。It should be noted that step 102 is that the terminal device configures the binding data of the attribute of the target node in response to the user's configuration operation.
同时,步骤102也可以是终端直接进行自动配置操作,实现配置目标节点的属性的绑定数据。At the same time, step 102 may also be that the terminal directly performs an automatic configuration operation to realize the binding data of configuring the attributes of the target node.
在一些实例中,响应于配置操作,配置目标节点的属性的绑定数据,包括:1003:响应于静态的绑定数据的选择操作,确定绑定数据为静态值;响应于绑定数据的输入操作,确定目标节点的属性的绑定数据。In some instances, in response to the configuration operation, configuring the binding data of the attribute of the target node includes: 1003: in response to the selection operation of the static binding data, determining that the binding data is a static value; in response to the input of the binding data Operation to determine the binding data of the target node's attributes.
其中,绑定数据是指对可编辑图像中的文字,图片等用程序变量或静态数据进行关联的关联数据,并作为目标节点属性的属性值;那么数据绑定就是这个关联的过程。其中绑定数据可以包括静态数据和动态数据。Among them, the binding data refers to the associated data that associates the program variables or static data with text, pictures, etc. in the editable image, and is used as the attribute value of the target node attribute; then data binding is the process of this association. The binding data may include static data and dynamic data.
静态值(也可以称为静态数据)是指:程序语言中不可变的常量,即是静态的属性值,不随其他数据源变化,例如文字,图片链接等。Static values (also called static data) refer to: immutable constants in the programming language, that is, static attribute values that do not change with other data sources, such as text, image links, and so on.
例如,根据前文所述,在对界面300中的商品标题节点的属性选择完成后,用户对该商品标题节点:商品标题节点的文字内容属性进行配置绑定数据,当用户想要为该节点配置静态值时或静态数据时,在购物可编辑图像中选择静态的绑定数据,终端设备的YY应用程序响应于该选择操作,确定绑定数据为静态值,用户在在该购物可编辑图像中的数据类型进行选择,例如,选择“文字”类型,并在该绑定数据框中手动输入静态数据“卫衣女秋季20XX新款”,作为绑定数据,终端设备的YY应用程序响应于该输入操作,获取到该输入的绑定数据并展示到该绑定数据框中。从而形成了该节点与静态数据的绑定。For example, according to the foregoing, after the attribute selection of the product title node in the interface 300 is completed, the user configures binding data for the text content attribute of the product title node: the product title node, and when the user wants to configure the node When it is static value or static data, select the static binding data in the shopping editable image. The YY application of the terminal device responds to the selection operation and determines that the binding data is a static value. The user is in the shopping editable image Choose the type of data, for example, select the "text" type, and manually enter the static data "new sweater 20XX new style" in the binding data box, as the binding data, the YY application of the terminal device responds to the input operation To obtain the input binding data and display it in the binding data box. Thus forming the binding of the node and static data.
需要说明的是,该数据类型可用于对用户输入的绑定数据进行数据校测,确定该绑定数据是否为该数据类型。It should be noted that the data type can be used to perform data calibration on the binding data input by the user to determine whether the binding data is the data type.
在一些实例中,响应于配置操作,配置目标节点的属性的绑定数据,包括:1004:响应于动态的绑定数据的选择操作,确定绑定数据为动态值;获取并展示出与该目标节点的属性对应的数据源选择列表;响应于对数据源的选择操作,生成该目标节点的属性的绑定数据的获取路径。In some instances, in response to the configuration operation, configuring the binding data of the target node's attributes includes: 1004: In response to the dynamic binding data selection operation, determining that the binding data is a dynamic value; acquiring and displaying the target The data source selection list corresponding to the attribute of the node; in response to the selection operation on the data source, an acquisition path of the bound data of the attribute of the target node is generated.
其中,动态值(也可以称为动态数据)是指程序语言中的变量。在没有实际数据时只是一个占位符。Among them, dynamic values (also called dynamic data) refer to variables in the programming language. It is just a placeholder when there is no actual data.
数据源选择列表(也可以称为动态数据列表)是指来自于不同数据平台的动态数据所组成的列表。The data source selection list (also called dynamic data list) refers to a list composed of dynamic data from different data platforms.
需要说明的是,在有可参考的数据源依据作为动态数据时,可以用选择的方式来生成动态数据的取值路径(也可以称为获取路径或索引)。It should be noted that when there is a reference data source basis as dynamic data, a value path (also referred to as an acquisition path or index) of dynamic data can be generated in a selected manner.
例如,根据前文所述,在对界面300中的商品标题节点的属性选择完成后,用户对该商品标题节点:商品标题节点的文字内容属性进行配置绑定数据,当用户想要为该节点配置动态值时或动态数据时,在购物可编辑图像中选择动态的绑定数据,终端设备的YY应用程序响应于该选择操作,确定绑定数据为动态值,用户在在该购物可编辑图像中的数据类型进行选择,例如,选择“文字”类型,终端设备的YY应用程序根据该属性,获取到与该属性对应的数据源选择列表,该选择列表中可以包括表示商品标题的字符,表示商品数字ID的字符、表示城市的字符以及表示想要人气的字符等等。并获取到的数据源选择列表进行展示,当用户查看到展示的数据源选择列表后,选择该数据源选择列表中的表示商品标题的字符,作为该属性的动态的绑定数据,终端设备的YY应用程序响应于该选择操作,确定绑定数据为表示商品标题的字符,并展示在绑定数据框中,同时可以确定该动态的绑定数据对应的获取路径或索引方式,以获取该绑定数据,从而形成了该节点与动态数据的绑定。其中,图4示出了绑定动态数据的界面400,在该界面400中为商品标题节点的文字内容属性“Inner text”绑定动态数据,确定该动态数据,即绑定数据为文字,并选择该数据为动态数据,终端设备的YY应用程序响应于该选择操作,展示了对应的数据源选择列表,用户选择完该动态的绑定数据后,会在绑定数据框中展示该绑定数据。如图5所示,在界面500中展示了该属性在绑定后的动态的绑定数据。For example, according to the foregoing, after the attribute selection of the product title node in the interface 300 is completed, the user configures binding data for the text content attribute of the product title node: the product title node, and when the user wants to configure the node In dynamic value or dynamic data, select dynamic binding data in the shopping editable image. The YY application of the terminal device responds to the selection operation and determines that the binding data is a dynamic value. The user is in the shopping editable image Choose the data type of the data type, for example, select the "text" type, and the YY application of the terminal device obtains a data source selection list corresponding to the attribute according to the attribute. The selection list may include characters indicating the title of the commodity, indicating the commodity Characters such as numeric IDs, characters representing cities, characters representing popularity, etc. And the obtained data source selection list is displayed. When the user views the displayed data source selection list, the character representing the title of the product in the data source selection list is selected as the dynamic binding data of the attribute. In response to the selection operation, the YY application determines that the binding data is a character representing the title of the product, and displays it in the binding data frame, and at the same time can determine the acquisition path or indexing method corresponding to the dynamic binding data to obtain the binding Data, which forms the binding of the node to dynamic data. Among them, FIG. 4 shows an interface 400 for binding dynamic data. In this interface 400, the dynamic content is bound to the text content attribute “Inner” of the product title node, and the dynamic data is determined, that is, the binding data is text, and When the data is selected as dynamic data, the YY application of the terminal device responds to the selection operation and displays the corresponding data source selection list. After the user selects the dynamic binding data, the binding will be displayed in the binding data box. data. As shown in FIG. 5, the interface 500 shows the dynamic binding data of the attribute after binding.
在一些实例中,还可以将高频操作的属性直接置于属性选择框中,作为该节点的默认属性,便于用户对这个属性直接操作。在垂直领域下,节点因自身具有一定特征,其可绑定的数据是有规则可循的。终端设备可以猜测节点最可能绑定的数据,自动执行数 据绑定过程,达到智能匹配属性的效果。若用户不想为该节点配置该属性,则可以重新按照自主选择属性和绑定数据。In some instances, the attribute of the high-frequency operation can also be directly placed in the attribute selection box as the default attribute of the node, which is convenient for the user to directly manipulate this attribute. In the vertical domain, nodes have certain characteristics, and the data they can bind is rule-based. The terminal device can guess the data that the node is most likely to bind and automatically execute the data binding process to achieve the effect of intelligent matching attributes. If the user does not want to configure this attribute for the node, he can select the attribute and bind data again according to his own choice.
例如,根据前文所述,终端设备确定目标节点为商品标题节点后,则终端设备直接确定高频操作属性为文字内容属性,根据该文字内容属性直接确定该文字内容属性的绑定数据为高频操作绑定数据,如“aa”,并将该高频操作绑定数据作为该文字内容属性的绑定数据。或,For example, according to the foregoing, after the terminal device determines that the target node is a product title node, the terminal device directly determines the high-frequency operation attribute as the text content attribute, and directly determines the binding data of the text content attribute as the high frequency according to the text content attribute Operation binding data, such as "aa", and use the high-frequency operation binding data as the binding data of the text content attribute. or,
根据该文字内容属性直接确定该文字内容属性的绑定数据列表,该绑定数据列表中的绑定数据是根据出现频率或选择频率由大到小进行排序的,用户从该绑定数据列表中选择自己想要的绑定数据,终端设备响应于该选择操作,确定该属性的绑定数据。The binding data list of the text content attribute is directly determined according to the text content attribute. The binding data in the binding data list is sorted according to the appearance frequency or the selection frequency from large to small. The user selects from the binding data list Select the binding data that you want, and the terminal device determines the binding data of the attribute in response to the selection operation.
在一些实例中,该方法100B还包括:1005:在响应于动态的绑定数据的选择操作后,未展示出与该目标节点的属性对应的数据源选择列表,则响应于获取路径的输入操作,确定该目标节点的属性的绑定数据的获取路径。In some examples, the method 100B further includes: 1005: After responding to the dynamic binding data selection operation, but not displaying the data source selection list corresponding to the attribute of the target node, responding to the input operation of obtaining the path To determine the acquisition path of the binding data of the attribute of the target node.
需要说明的是,在未有可参考的数据源依据作为动态数据时,可以直接手写绑定数据的获取路径(或索引)。It should be noted that when there is no reference data source as dynamic data, the acquisition path (or index) of the bound data can be directly handwritten.
例如,根据前文所述,在购物可编辑图像中选择动态的绑定数据,终端设备的YY应用程序响应于该选择操作,确定绑定数据为动态值,用户在在该购物可编辑图像中的数据类型进行选择,例如,选择“文字”类型,此时,终端设备的YY应用程序根据该属性,未获取到与该属性对应的可靠的数据源时,则不会生成数据源选择列表,用户看到当前界面并未展示该数据源选择列表时,用户在该绑定数据框中手动输入动态数据的获取路径或索引“ZZ”,作为绑定数据,并展示在该绑定数据框中。For example, according to the foregoing, when dynamic binding data is selected in a shopping editable image, the YY application of the terminal device determines that the binding data is a dynamic value in response to the selection operation, and the user is in the shopping editable image. Select the data type, for example, select the "text" type. At this time, when the YY application of the terminal device does not obtain a reliable data source corresponding to the attribute according to the attribute, the data source selection list will not be generated. The user When the current interface does not display the data source selection list, the user manually enters the acquisition path or index “ZZ” of dynamic data in the bound data frame as the bound data, and displays it in the bound data frame.
需要说明的是,在配置完当前一个目标节点后,用户可以继续选取想要目标节点,并配置后续目标节点的属性的绑定数据,直至用户完成所有想要的目标节点属性的数据绑定。It should be noted that after configuring the current target node, the user can continue to select the desired target node and configure the binding data of the attributes of the subsequent target node until the user completes the data binding of all the desired target node attributes.
此外,在配置完该目标节点后的一个属性的绑定数据后,还可以针对该相同目标节点的其他属性继续进行数据绑定,直至用户完成所有想要的该目标节点的属性的数据绑定。In addition, after the binding data of an attribute after the target node is configured, data binding can be continued for other attributes of the same target node until the user completes all desired data binding of the attribute of the target node .
在一些实例中,该方法100A还包括:针对至少一个目标节点的属性的绑定数据,生成表示绑定数据的集合的描述文件。In some examples, the method 100A further includes generating a description file representing the set of binding data for the binding data of the attribute of at least one target node.
为了不同的用途,可以给予该视图模块不同的功能或处理方式,使得这样生成的视图模块可以适配多种平台以及多种场景。通过将多个节点的多个属性的绑定数据进行集 合,生成绑定数据的集合的描述文件,从而完成一份完整的数据结构。该描述文件可以增加对取值路径的模拟功能,对取值路径具有参考意义,从而模拟其他取值路径。还可以对该绑定数据的数据合法性进行集中检测,确定该绑定数据是否合法,是否存在问题等一系列功能。For different purposes, the view module can be given different functions or processing methods, so that the view module generated in this way can be adapted to multiple platforms and multiple scenarios. By combining the binding data of multiple attributes of multiple nodes, a description file of the collection of binding data is generated, thereby completing a complete data structure. The description file can increase the simulation function of the value path, and has a reference meaning to the value path, thereby simulating other value paths. A series of functions, such as centralized detection of the data legitimacy of the bound data, can be determined to determine whether the bound data is legal and whether there are problems.
还可以对绑定数据进行补充或限制,如显示绑定数据的文字在12个字数内,以及图片尺寸在m*n等等。You can also supplement or limit the binding data, such as the text showing the binding data is within 12 words, and the image size is m*n, etc.
103:根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。103: Generate the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
需要说明的是,步骤103可以是终端设备响应于用户的生成操作,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。It should be noted that step 103 may be that the terminal device generates a code corresponding to the target programming language according to the editable image, the binding data, and the binding data analysis method in response to the user's generating operation.
同时,步骤103也可以是终端直接进行自动生成操作,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。At the same time, step 103 may also be that the terminal directly performs an automatic generation operation, and generates a code corresponding to the target programming language according to the editable image, the binding data, and the binding data analysis method.
其中,解析方式是指绑定数据的获取方式,例如,与数据源所在平台进行数据对接的方式等。The parsing method refers to the method of acquiring bound data, for example, the method of data connection with the platform where the data source is located.
在一些实例中,响应于生成操作,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。In some examples, in response to the generating operation, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the binding data parsing method.
在一些实例中,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码,包括:将具有绑定数据的可编辑图像以及绑定数据的解析方式转换成目标编程语言对应的代码。In some examples, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the binding data parsing method, including: converting the editable image with the binding data and the binding data parsing method to the target The code corresponding to the programming language.
在一些实例中,将具有绑定数据的可编辑图像以及绑定数据的解析方式转换成目标编程语言对应的代码,包括:1006:响应于编程语言的选择操作,确定目标编程语言以及与目标编程语言对应的解析算法;响应于代码的生成操作,根据解析算法,对配置了绑定数据的可编辑图像进行目标编程语言的编码,生成可编辑图像代码;1007:根据解析算法,对绑定数据解析方式进行目标编程语言的编码,生成绑定数据解析代码。In some examples, the editable image with the binding data and the analysis method of the binding data are converted into codes corresponding to the target programming language, including: 1006: in response to the selection operation of the programming language, determining the target programming language and programming with the target Parsing algorithm corresponding to the language; in response to the code generation operation, according to the parsing algorithm, the editable image configured with the binding data is encoded in the target programming language to generate the editable image code; 1007: according to the parsing algorithm, the binding data The parsing method encodes the target programming language and generates the binding data parsing code.
在一些实例中,该方法100A还包括:将可编辑图像代码以及绑定数据解析代码进行发布,生成对应的视图模块。In some examples, the method 100A further includes: publishing the editable image code and the binding data parsing code to generate the corresponding view module.
其中,编程语言是指用来定义计算机程序的形式语言,可以包括不同的多个开发编程语言,此处就不再限定。Among them, the programming language refers to the formal language used to define the computer program, which may include multiple different development programming languages, which is no longer limited here.
解析算法是指用于将具有绑定数据的可编辑图像以及绑定数据的解析方式转换成目标编程语言对应代码的算法。The parsing algorithm refers to an algorithm used to convert the editable image with bound data and the parsing method of the bound data into the corresponding code of the target programming language.
例如,根据前文所述,当终端设备对购物可编辑图像上的至少一个节点以及该节点的至少一个属性配置绑定数据后,用户在YY应用程序的界面上的选择目标编程语言,还可以在该界面上设置对应的应用场景,用户点击YY应用程序的界面上的代码控件,执行该生成操作,终端设备的YY应用程序响应于该代码的生成操作,确定目标编程语言对应的解析算法,根据该目标编程语言对应的生成静态视图页面代码的生成方式,解析算法将设置好绑定数据的购物可编辑图像进行编码,生成购物静态页面代码。再根据该目标编程语言对应的解析方式的生成方式,解析算法将绑定数据解析方式进行目标编程语言的编码,生成绑定数据解析代码。将可编辑图像代码以及绑定数据解析代码进行组合,并将该组合代码进行展示,图5示出了生成代码的界面500,用户可以对该组合代码进行查看,用户点击界面500中的发布控件,对该组合代码进行发布,终端设备的YY应用程序响应该发布操作,将该组合代码进行发布,并生成视图模块。图6示出了通过该视图模块生成的线上购物场景下的前端购物的视图页面600B与可编辑图像600A的对比图600。其中,在该可编辑图像600A中进行数据绑定以及代码生成以及发布后,生成了视图模块,开发人员通过运用该视图模块,形成了可视化的视图页面600B,此时绑定数据已经展示在该视图页面600B中。For example, according to the foregoing, after the terminal device configures binding data for at least one node on the shopping editable image and at least one attribute of the node, the user selects the target programming language on the interface of the YY application, and can also The corresponding application scenario is set on this interface. The user clicks the code control on the interface of the YY application program to perform the generation operation. The YY application program of the terminal device responds to the code generation operation to determine the analysis algorithm corresponding to the target programming language. The method for generating the static view page code corresponding to the target programming language, the parsing algorithm encodes the shopping editable image with the binding data set, and generates the shopping static page code. Then according to the generation method of the analysis method corresponding to the target programming language, the analysis algorithm encodes the binding data analysis method to the target programming language to generate the binding data analysis code. The editable image code and the binding data parsing code are combined, and the combined code is displayed. FIG. 5 shows an interface 500 for generating the code. The user can view the combined code. The user clicks the release control in the interface 500 Publish the combined code, the YY application program of the terminal device responds to the publish operation, publishes the combined code, and generates a view module. FIG. 6 shows a comparison diagram 600 of a front-end shopping view page 600B and an editable image 600A in an online shopping scenario generated by the view module. Among them, after data binding and code generation and release in the editable image 600A, a view module is generated, and the developer forms a visual view page 600B by using the view module, and the binding data has been displayed in the View page 600B.
图1C为本申请一示例性实施例的代码的生成方法的流程示意图。本申请实施例提供的该方法100C由终端设备响应用户的操作(例如,获取操作、选取操作、选择操作、配置操作以及生成操作等)来执行,该方法100C包括以下步骤:FIG. 1C is a schematic flowchart of a code generation method according to an exemplary embodiment of the present application. The method 100C provided by the embodiment of the present application is executed by the terminal device in response to user operations (for example, acquisition operation, selection operation, selection operation, configuration operation, and generation operation, etc.). The method 100C includes the following steps:
11:响应于获取操作,获取并展示可编辑图像;11: In response to the acquisition operation, acquire and display editable images;
12:响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;12: In response to the selection operation, select the editable target node displayed in the editable image;
13:响应于选择操作,选择目标节点的属性;13: In response to the selection operation, select the attributes of the target node;
14:响应于配置操作,配置目标节点的属性的绑定数据;14: In response to the configuration operation, configure the binding data of the attributes of the target node;
15:响应于生成操作,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。15: In response to the generation operation, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
由于前文已经详细阐述过该代码的生成过程,此处就简略对以上步骤进行说明:Since the code generation process has been explained in detail above, the above steps are briefly explained here:
11:响应于获取操作,获取并展示可编辑图像。11: In response to the acquisition operation, acquire and display the editable image.
例如,用户在电脑本地安装的生成代码的应用程序的界面中,执行获取操作,该应用程序从电脑本地获取包含购物可编辑图像的节点的JSON编程语言,并将其转换为JSON树形结构,再将JSON树形结构转换为XML编程语言,运行该XML语言展示该购物可编辑图像以及该购物可编辑图像上的各个节点。For example, a user performs an acquisition operation on the interface of a code-generating application installed locally on the computer. The application acquires a JSON programming language containing nodes for shopping editable images locally from the computer and converts it into a JSON tree structure. Then convert the JSON tree structure into an XML programming language, and run the XML language to display the shopping editable image and various nodes on the shopping editable image.
12:响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点。12: In response to the selection operation, select the editable target node displayed in the editable image.
例如,根据前文所述,用户在电脑的应用程序的界面上执行选取操作,选取该购物可编辑图像上的任一节点作为目标节点,电脑响应于该选取操作,选取该目标节点。For example, according to the foregoing, the user performs a selection operation on the interface of the application program of the computer, selects any node on the shopping editable image as the target node, and the computer selects the target node in response to the selection operation.
13:响应于选择操作,选择目标节点的属性。13: In response to the selection operation, select the attribute of the target node.
例如,根据前文所述,用户在电脑的应用程序的界面上执行选择操作,选择该目标节点的一个属性,电脑响应于该选择操作,选择该目标节点的属性。For example, according to the foregoing, the user performs a selection operation on the interface of the application program of the computer to select an attribute of the target node, and the computer selects the attribute of the target node in response to the selection operation.
14:响应于配置操作,配置目标节点的属性的绑定数据。14: In response to the configuration operation, configure the binding data of the attributes of the target node.
例如,根据前文所述,用户在电脑的应用程序的界面上执行配置操作,配置该属性的绑定数据,电脑响应于该配置操作,配置该属性的绑定数据。For example, according to the foregoing, the user performs a configuration operation on the interface of the application program of the computer to configure the binding data of the attribute, and the computer configures the binding data of the attribute in response to the configuration operation.
15:响应于生成操作,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。15: In response to the generation operation, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
例如,根据前文所述,用户在电脑的应用程序的界面上执行生成操作,针对具有绑定数据的购物可编辑图像以及绑定数据的解析方式,生成目标编程语言对应的代码。电脑响应于该生成操作,将具有绑定数据的购物可编辑图像以及绑定数据的解析方式,生成目标编程语言对应的代码。For example, according to the foregoing, the user performs the generation operation on the interface of the application program of the computer, and generates the code corresponding to the target programming language for the shopping editable image with the binding data and the analysis method of the binding data. In response to the generating operation, the computer generates the code corresponding to the target programming language by combining the shopping editable image with the binding data and the analysis method of the binding data.
下面结合示例性应用场景对本申请技术方案进行详细说明:The technical solution of the present application will be described in detail below in conjunction with an exemplary application scenario:
场景1:在PC(Personal Computer)电脑上的设计工具s里面导出一个可编辑图像的数据,导入到该PC端的生成代码的应用程序中,得到一个该可编辑图像的静态UI。选择该静态UI中的标题节点以及文字内容属性,并选择进行动态数据源的绑定,由于标题节点是商品的标题,所以将该属性和这个商品数据源-标题数据绑定在了一起,在确定绑定关系之后,可以对这个绑定做额外操作,比如让文字数量不超过12个,比如模拟数据的生成等,并查看代码,通过代码可以看到,其中标题已经是绑定后的数据了,最终进行代码发布。Scenario 1: Export the data of an editable image in the design tool s on the PC (Personal Computer), and import it into the PC-generated code application to obtain a static UI of the editable image. Select the title node and text content attributes in the static UI, and choose to bind the dynamic data source. Since the title node is the title of the product, the attribute and the product data source-title data are bound together. After determining the binding relationship, you can do additional operations on the binding, such as making the number of text not more than 12, such as the generation of simulated data, and view the code. You can see through the code that the title is already the bound data Finally, the code is released.
数据绑定的思想具象化出来的对静态UI的操作可以基本替代开发人员代码,能帮助解决当前业界痛点,解放这部分的生产力。The operation of the static UI embodied by the idea of data binding can basically replace the developer code, which can help solve the current pain points in the industry and liberate this part of productivity.
图7为本申请又一示例性实施例提供的代码的生成装置的结构框架示意图。该装置700可以应用于终端设备中,该装置700包括选择模块701、配置模块702和生成模块703,以下针对各个模块的功能进行详细的阐述:FIG. 7 is a schematic structural diagram of a code generation apparatus according to another exemplary embodiment of the present application. The apparatus 700 can be applied to a terminal device. The apparatus 700 includes a selection module 701, a configuration module 702, and a generation module 703. The functions of each module are described in detail below:
选择模块701,用于响应于选取操作,选取在可编辑图像中展示的可编辑的目标节 点。The selection module 701 is configured to select the editable target node displayed in the editable image in response to the selection operation.
配置模块702,用于响应于配置操作,配置目标节点的属性的绑定数据。The configuration module 702 is configured to configure the binding data of the attribute of the target node in response to the configuration operation.
生成模块703,用于根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。The generating module 703 is configured to generate the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
在一些实例中,该装置700还包括:第一识别模块,用于识别获取到的可编辑图像的静态结构,将静态结构转换为指定编程语言的树形结构,并根据树形结构展示可编辑图像;其中,第二识别模块,用于通过从树形结构中识别出至少一个基础节点以及至少一个高级节点,展示在可编辑图像中,作为可编辑的节点,并将选取到的任一基础节点或任一高级节点作为目标节点;其中,高级节点是通过基础节点转化得到。In some examples, the device 700 further includes: a first recognition module for recognizing the static structure of the obtained editable image, converting the static structure into a tree structure of a specified programming language, and displaying the editable according to the tree structure Image; wherein, the second recognition module is used to identify at least one basic node and at least one high-level node from the tree structure, display it in the editable image as an editable node, and select any base The node or any high-level node is regarded as the target node; among them, the high-level node is obtained by transforming the basic node.
在一些实例中,第二识别模块,用于将从树形结构中识别出至少一个节点作为基础节点;根据节点名称,从至少一个基础节点中获取出待转换的节点,并将待转换的节点转换为高级节点。In some examples, the second identification module is used to identify at least one node from the tree structure as a basic node; according to the node name, obtain the node to be converted from the at least one basic node, and the node to be converted Convert to advanced node.
在一些实例中,在选取目标节点后,该装置700还包括:第一获取模块,用于根据选取的目标节点,获取与该目标节点对应的至少一个属性;展示模块,用于响应于属性的查看操作,展示获取到的至少一个属性;第一选择模块,用于响应于属性的选择操作,选择该目标节点的属性。In some examples, after selecting the target node, the device 700 further includes: a first acquisition module for acquiring at least one attribute corresponding to the target node according to the selected target node; a display module for responding to the attribute The viewing operation displays at least one acquired attribute; the first selection module is used to select the attribute of the target node in response to the attribute selection operation.
在一些实例中,该装置700还包括:第二获取模块,用于根据选取的目标节点,获取并展示与目标节点对应的至少一个属性,其中至少一个属性根据选择频率进行排序;第二选择模块,用于响应于属性的选择操作,选择该目标节点的属性。In some examples, the apparatus 700 further includes: a second acquisition module for acquiring and displaying at least one attribute corresponding to the target node according to the selected target node, wherein at least one attribute is sorted according to the selection frequency; the second selection module , Used to select the attribute of the target node in response to the attribute selection operation.
在一些实例中,配置模块702,用于响应于静态的绑定数据的选择操作,确定绑定数据为静态值;响应于绑定数据的输入操作,确定目标节点的属性的绑定数据。In some examples, the configuration module 702 is configured to determine the binding data as a static value in response to the selection operation of the static binding data; and determine the binding data of the attribute of the target node in response to the input operation of the binding data.
在一些实例中,配置模块702,包括:第一确定单元,用于响应于动态的绑定数据的选择操作,确定绑定数据为动态值;获取单元,用于获取并展示出与该目标节点的属性对应的数据源选择列表;第一生成单元,用于响应于对数据源的选择操作,生成该目标节点的属性的绑定数据的获取路径。In some examples, the configuration module 702 includes: a first determining unit for determining that the binding data is a dynamic value in response to a dynamic binding data selection operation; and an acquiring unit for acquiring and displaying the target node The data source selection list corresponding to the attribute of the; the first generating unit is configured to generate an acquisition path of the binding data of the attribute of the target node in response to the selection operation of the data source.
在一些实例中,该装置700还包括:确定模块,用于在响应于动态的绑定数据的选择操作后,未展示出与该目标节点的属性对应的数据源选择列表,则响应于获取路径的输入操作,确定该目标节点的属性的绑定数据的获取路径。In some examples, the apparatus 700 further includes: a determination module for responding to the acquisition path after not responding to the dynamic binding data selection operation and not displaying the data source selection list corresponding to the attribute of the target node The input operation determines the acquisition path of the binding data of the attribute of the target node.
在一些实例中,绑定数据作为该目标节点的属性的属性值。In some instances, the binding data is used as the attribute value of the attribute of the target node.
在一些实例中,生成模块703,用于针对至少一个目标节点的属性的绑定数据,生 成表示绑定数据的集合的描述文件。In some examples, the generating module 703 is configured to generate a description file representing the set of binding data for the binding data of the attribute of at least one target node.
在一些实例中,生成模块703,用于将具有绑定数据的可编辑图像以及绑定数据的解析方式转换成目标编程语言对应的代码。In some examples, the generation module 703 is used to convert the editable image with the binding data and the parsing method of the binding data into the code corresponding to the target programming language.
在一些实例中,生成模块703,包括:第二确定单元,用于响应于编程语言的选择操作,确定目标编程语言以及与目标编程语言对应的解析算法;第二生成单元,用于响应于代码的生成操作,根据解析算法,对配置了绑定数据的可编辑图像进行目标编程语言的编码,生成可编辑图像代码;第三生成单元,用于根据解析算法,对绑定数据解析方式进行目标编程语言的编码,生成绑定数据解析代码。In some examples, the generation module 703 includes: a second determination unit for determining a target programming language and a parsing algorithm corresponding to the target programming language in response to a selection operation of the programming language; a second generation unit for responding to code The generating operation is based on the parsing algorithm, and the editable image with the binding data is encoded in the target programming language to generate the editable image code; the third generating unit is used to target the binding data parsing method according to the parsing algorithm The coding of the programming language to generate the binding data analysis code.
在一些实例中,该装置700还包括:发布模块,用于将可编辑图像代码以及绑定数据解析代码进行发布,生成对应的视图模块。In some examples, the device 700 further includes: a publishing module, configured to publish the editable image code and the binding data parsing code to generate a corresponding view module.
以上描述了图7所示的生成装置700的内部功能和结构,在一个可能的设计中,图7所示的生成装置700的结构可实现为终端设备,如图8所示,该终端设备800可以包括:存储器801以及处理器802;The internal functions and structure of the generating device 700 shown in FIG. 7 are described above. In a possible design, the structure of the generating device 700 shown in FIG. 7 may be implemented as a terminal device, as shown in FIG. 8, the terminal device 800 It may include: a memory 801 and a processor 802;
存储器801,用于存储计算机程序;The memory 801 is used to store computer programs;
处理器802,用于执行计算机程序,以用于:The processor 802 is used to execute a computer program for:
响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;In response to the selection operation, select the editable target node displayed in the editable image;
响应于配置操作,配置目标节点的属性的绑定数据;In response to the configuration operation, configure the binding data of the attributes of the target node;
根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。The code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
在一些实例中,处理器802还用于:识别获取到的可编辑图像的静态结构,将静态结构转换为指定编程语言的树形结构,并根据树形结构展示可编辑图像;其中,通过从树形结构中识别出至少一个基础节点以及至少一个高级节点,展示在可编辑图像中,作为可编辑的节点,并将选取到的任一基础节点或任一高级节点作为目标节点;其中,高级节点是通过基础节点转化得到。In some examples, the processor 802 is also used to: identify the static structure of the obtained editable image, convert the static structure into a tree structure of a specified programming language, and display the editable image according to the tree structure; Identify at least one basic node and at least one advanced node in the tree structure, display it in an editable image as an editable node, and use any selected basic node or any advanced node as the target node; Nodes are obtained through the conversion of basic nodes.
在一些实例中,处理器802,具体用于:将从树形结构中识别出至少一个节点作为基础节点;根据节点名称,从至少一个基础节点中获取出待转换的节点,并将待转换的节点转换为高级节点。In some examples, the processor 802 is specifically configured to: identify at least one node from the tree structure as a basic node; obtain the node to be converted from the at least one basic node according to the node name, and convert the node to be converted The node is converted to an advanced node.
在一些实例中,在选取目标节点后,处理器802还用于:根据选取的目标节点,获取与该目标节点对应的至少一个属性;响应于属性的查看操作,展示获取到的至少一个属性;响应于属性的选择操作,选择该目标节点的属性。In some examples, after selecting the target node, the processor 802 is further configured to: according to the selected target node, obtain at least one attribute corresponding to the target node; in response to the attribute viewing operation, display the obtained at least one attribute; In response to the attribute selection operation, the attribute of the target node is selected.
在一些实例中,处理器802还用于:根据选取的目标节点,获取并展示与目标节点对应的至少一个属性,其中至少一个属性根据选择频率进行排序;第二选择模块,用于响应于属性的选择操作,选择该目标节点的属性。In some examples, the processor 802 is further configured to: acquire and display at least one attribute corresponding to the target node according to the selected target node, where at least one attribute is sorted according to the selection frequency; the second selection module is used to respond to the attribute Select operation, select the attribute of the target node.
在一些实例中,处理器802,具体用于:响应于静态的绑定数据的选择操作,确定绑定数据为静态值;响应于绑定数据的输入操作,确定目标节点的属性的绑定数据。In some examples, the processor 802 is specifically configured to: in response to the selection operation of the static binding data, determine the binding data as a static value; in response to the input operation of the binding data, determine the binding data of the attribute of the target node .
在一些实例中,处理器802,具体用于:响应于动态的绑定数据的选择操作,确定绑定数据为动态值;获取并展示出与该目标节点的属性对应的数据源选择列表;响应于对数据源的选择操作,生成该目标节点的属性的绑定数据的获取路径。In some examples, the processor 802 is specifically configured to: in response to the selection operation of the dynamic binding data, determine that the binding data is a dynamic value; obtain and display a data source selection list corresponding to the attribute of the target node; respond For the selection operation of the data source, an acquisition path of the binding data of the attribute of the target node is generated.
在一些实例中,处理器802还用于:在响应于动态的绑定数据的选择操作后,未展示出与该目标节点的属性对应的数据源选择列表,则响应于获取路径的输入操作,确定该目标节点的属性的绑定数据的获取路径。In some examples, the processor 802 is further configured to: in response to the selection operation of the dynamic binding data, without displaying the data source selection list corresponding to the attribute of the target node, in response to the input operation of obtaining the path, Determine the acquisition path of the binding data of the attribute of the target node.
其中,绑定数据作为该目标节点的属性的属性值。Among them, the binding data is used as the attribute value of the attribute of the target node.
在一些实例中,处理器802,具体用于:针对至少一个目标节点的属性的绑定数据,生成表示绑定数据的集合的描述文件。In some examples, the processor 802 is specifically configured to: for the binding data of the attribute of at least one target node, generate a description file representing the set of binding data.
在一些实例中,处理器802,具体用于:将具有绑定数据的可编辑图像以及绑定数据的解析方式转换成目标编程语言对应的代码。In some examples, the processor 802 is specifically configured to: convert the editable image with the binding data and the analysis method of the binding data into the code corresponding to the target programming language.
在一些实例中,处理器802,具体用于:响应于编程语言的选择操作,确定目标编程语言以及与目标编程语言对应的解析算法;响应于代码的生成操作,根据解析算法,对配置了绑定数据的可编辑图像进行目标编程语言的编码,生成可编辑图像代码;根据解析算法,对绑定数据解析方式进行目标编程语言的编码,生成绑定数据解析代码。In some examples, the processor 802 is specifically configured to: in response to the selection operation of the programming language, determine the target programming language and the parsing algorithm corresponding to the target programming language; in response to the code generation operation, bind the configuration according to the parsing algorithm The editable image of the fixed data is encoded in the target programming language to generate the editable image code; according to the analysis algorithm, the target programming language is encoded in the binding data analysis method to generate the binding data analysis code.
在一些实例中,处理器802,还用于:将可编辑图像代码以及绑定数据解析代码进行发布,生成对应的视图模块。In some examples, the processor 802 is also used to publish the editable image code and the binding data analysis code to generate the corresponding view module.
另外,本发明实施例提供了一种计算机存储介质,计算机程序被一个或多个处理器执行时,致使一个或多个处理器实现图1A方法实施例中代码的生成方法的步骤。In addition, an embodiment of the present invention provides a computer storage medium. When a computer program is executed by one or more processors, the one or more processors are caused to implement the steps of the code generation method in the method embodiment of FIG. 1A.
本申请又一示例性实施例提供了代码的生成装置。该装置900可以应用于终端设备中,该装置900包括展示模块901、选取模块902、选择模块903、配置模块904以及生成模块905,以下针对各个模块的功能进行详细的阐述:Yet another exemplary embodiment of the present application provides a code generation device. The device 900 can be applied to a terminal device. The device 900 includes a display module 901, a selection module 902, a selection module 903, a configuration module 904, and a generation module 905. The functions of each module are described in detail below:
展示模块901,用于响应于获取操作,获取并展示可编辑图像。The display module 901 is configured to obtain and display an editable image in response to the obtaining operation.
选取模块902,用于响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点。The selection module 902 is configured to select the editable target node displayed in the editable image in response to the selection operation.
选择模块903,用于响应于选择操作,选择目标节点的属性。The selection module 903 is configured to select attributes of the target node in response to the selection operation.
配置模块904,用于响应于配置操作,配置目标节点的属性的绑定数据。The configuration module 904 is configured to configure the binding data of the attribute of the target node in response to the configuration operation.
生成模块905,用于响应于生成操作,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。The generating module 905 is configured to generate a code corresponding to the target programming language according to the editable image, the binding data, and the binding data analysis method in response to the generating operation.
以上生成装置的内部功能和结构,在一个可能的设计中,生成装置的结构可实现为终端设备,该终端设备可以包括:存储器1001以及处理器1002;The internal function and structure of the above generating device, in a possible design, the structure of the generating device may be implemented as a terminal device, and the terminal device may include: a memory 1001 and a processor 1002;
存储器1001,用于存储计算机程序;The memory 1001 is used to store a computer program;
处理器1002,用于执行计算机程序,以用于:响应于获取操作,获取并展示可编辑图像;响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;响应于选择操作,选择目标节点的属性;响应于配置操作,配置目标节点的属性的绑定数据;响应于生成操作,根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。The processor 1002 is configured to execute a computer program for: acquiring and displaying an editable image in response to the acquiring operation; selecting an editable target node displayed in the editable image in response to the selecting operation; and responding to the selecting operation, Select the attributes of the target node; in response to the configuration operation, configure the binding data of the target node's attributes; in response to the generation operation, generate the code corresponding to the target programming language according to the editable image, the binding data, and the binding data parsing method.
另外,本发明实施例提供了一种计算机存储介质,计算机程序被一个或多个处理器执行时,致使一个或多个处理器实现图1C方法实施例中代码的生成方法的步骤。In addition, an embodiment of the present invention provides a computer storage medium. When a computer program is executed by one or more processors, the one or more processors cause the steps of the code generation method in the method embodiment of FIG. 1C to be implemented.
本申请一示例性实施例还提供了一种代码的生成方法。本申请实施例提供的该方法由终端设备响应用户的操作以及终端自动操作来执行,该方法包括以下步骤:An exemplary embodiment of the present application also provides a code generation method. The method provided by the embodiment of the present application is executed by the terminal device in response to the user's operation and the terminal's automatic operation. The method includes the following steps:
111:确定待进行处理的可编辑图像;111: Determine the editable image to be processed;
112:确定可编辑图像待编辑的目标节点;112: Determine the target node of the editable image to be edited;
113:确定目标节点的属性的绑定数据;113: Determine the binding data of the attributes of the target node;
114:根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。114: Generate the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
由于上述步骤111、112以及114的具体实现方式已经在前文详细阐述过了,此处就不再赘述。Since the specific implementation manners of the above steps 111, 112, and 114 have been described in detail in the foregoing, they will not be repeated here.
在一些实例中,确定可编辑图像待编辑的目标节点,包括:为用户提供可供选择的可供编辑目标节点的界面;基于用户选择,确定待编辑的目标节点。In some examples, determining the target node of the editable image to be edited includes: providing an interface for the user to select the target node to be edited; based on the user selection, determining the target node to be edited.
由于此步骤的具体实现方式已经在前文详细阐述过了,此处就不再赘述。Since the specific implementation of this step has been elaborated in the foregoing, it will not be repeated here.
在一些实例中,确定目标节点的属性的绑定数据,包括:根据目标节点获取对应的属性以及该属性的绑定数据。In some examples, determining the binding data of the attribute of the target node includes: obtaining the corresponding attribute and the binding data of the attribute according to the target node.
在一些实例中,确定目标节点的属性的绑定数据,包括:根据目标节点获取对应的属性以及该属性对应的绑定数据列表,其中,该绑定数据列表中的绑定数据是根据选择 频率由大到小进行排序的;响应于绑定数据的选择操作,选择该目标节点的属性的绑定数据。In some examples, determining the binding data of the attribute of the target node includes: obtaining the corresponding attribute and the binding data list corresponding to the attribute according to the target node, wherein the binding data in the binding data list is based on the selection frequency Sorted from large to small; in response to the selection operation of the binding data, the binding data of the attribute of the target node is selected.
例如,根据前文所述,终端设备确定目标节点为商品标题节点后,则终端设备直接确定高频操作属性为文字内容属性,根据该文字内容属性直接确定该文字内容属性的绑定数据为高频操作绑定数据,如“aa”,并将该高频操作绑定数据作为该文字内容属性的绑定数据。或,For example, according to the foregoing, after the terminal device determines that the target node is a product title node, the terminal device directly determines the high-frequency operation attribute as the text content attribute, and directly determines the binding data of the text content attribute as the high frequency according to the text content attribute Operation binding data, such as "aa", and use the high-frequency operation binding data as the binding data of the text content attribute. or,
根据该文字内容属性直接确定该文字内容属性的绑定数据列表,该绑定数据列表中的绑定数据是根据出现频率或选择频率由大到小进行排序的,用户从该绑定数据列表中选择自己想要的绑定数据,终端设备响应于该选择操作,确定该属性的绑定数据。The binding data list of the text content attribute is directly determined according to the text content attribute. The binding data in the binding data list is sorted according to the appearance frequency or the selection frequency from large to small. The user selects from the binding data list Select the binding data that you want, and the terminal device determines the binding data of the attribute in response to the selection operation.
本申请又一示例性实施例提供了代码的生成装置。该装置可以应用于终端设备中,该装置包括第一确定模块、第二确定模块、第三确定模块以及生成模块,以下针对各个模块的功能进行详细的阐述:Yet another exemplary embodiment of the present application provides a code generation device. The device can be applied to terminal equipment. The device includes a first determination module, a second determination module, a third determination module, and a generation module. The functions of each module are described in detail below:
第一确定模块,用于确定待进行处理的可编辑图像;The first determining module is used to determine the editable image to be processed;
第二确定模块,用于确定可编辑图像待编辑的目标节点;The second determination module is used to determine the target node of the editable image to be edited;
第三确定模块,用于确定目标节点的属性的绑定数据;The third determining module is used to determine the binding data of the attribute of the target node;
生成模块,用于根据可编辑图像、绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。The generating module is used to generate the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
以上生成装置的内部功能和结构,在一个可能的设计中,生成装置的结构可实现为终端设备,该终端设备可以包括:存储器以及处理器;The internal function and structure of the above generating device, in a possible design, the structure of the generating device may be implemented as a terminal device, and the terminal device may include: a memory and a processor;
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行所述计算机程序,以用于:A processor for executing the computer program for:
确定待进行处理的可编辑图像;Determine the editable image to be processed;
确定可编辑图像待编辑的目标节点;Determine the target node of the editable image to be edited;
确定目标节点的属性的绑定数据;Determine the binding data of the attributes of the target node;
根据可编辑图像、绑定数据以及绑定数据的解析方式,生成目标编程语言对应的代码。The code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
另外,本发明实施例提供了一种计算机存储介质,计算机程序被一个或多个处理器执行时,致使一个或多个处理器实现上述方法中实施例中代码的生成方法的步骤111-114。In addition, the embodiments of the present invention provide a computer storage medium. When the computer program is executed by one or more processors, the one or more processors are caused to implement steps 111-114 of the code generation method in the foregoing method embodiment.
另外,在上述实施例及附图中的描述的一些流程中,包含了按照特定顺序出现的多 个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如101、102、103等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。In addition, some processes described in the above embodiments and the drawings include multiple operations that appear in a specific order, but it should be clearly understood that these operations may not be performed in the order in which they appear in this document or in parallel The sequence numbers of operations such as 101, 102, 103, etc. are only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel. It should be noted that the descriptions of "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order, nor limit "first" and "second". Are different types.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located One place, or can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement without paying creative labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary universal hardware platform, and of course, can also be implemented by a combination of hardware and software. Based on this understanding, the above technical solution can be embodied in the form of a computer product in essence or part of the contribution to the existing technology, and the present invention can adopt one or more computer-usable storages containing computer-usable program code The form of the computer program product implemented on media (including but not limited to disk storage, CD-ROM, optical storage, etc.).
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程多媒体数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程多媒体数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and/or block in the flowchart and/or block diagram and a combination of the flow and/or block in the flowchart and/or block diagram may be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable multimedia data processing device to produce a machine that causes instructions to be executed by the processor of the computer or other programmable multimedia data processing device Means for generating the functions specified in a block or blocks of a flowchart or a flow and/or a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程多媒体数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer readable memory that can guide a computer or other programmable multimedia data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including instruction means, which The instruction device implements the functions specified in one block or multiple blocks in the flowchart one flow or multiple flows and/or block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程多媒体数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计 算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable multimedia data processing device so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing to be executed on the computer or other programmable device The instructions provided provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in a computer-readable medium, such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including permanent and non-permanent, removable and non-removable media, can store information by any method or technology. The information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. As defined in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (27)

  1. 一种代码的生成方法,其特征在于,包括:A code generation method, which is characterized by including:
    响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;In response to the selection operation, select the editable target node displayed in the editable image;
    响应于配置操作,配置所述目标节点的属性的绑定数据;In response to the configuration operation, configure the binding data of the attributes of the target node;
    根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。According to the editable image, the binding data, and the analysis method of the binding data, a code corresponding to the target programming language is generated.
  2. 根据权利要求1所述的方法,其特征在于,响应于选取操作之前,所述方法还包括:The method according to claim 1, wherein before responding to the selection operation, the method further comprises:
    识别获取到的可编辑图像的静态结构,将所述静态结构转换为指定编程语言的树形结构,并根据所述树形结构展示所述可编辑图像;Identify the static structure of the obtained editable image, convert the static structure into a tree structure of a specified programming language, and display the editable image according to the tree structure;
    其中,通过从所述树形结构中识别出至少一个基础节点以及至少一个高级节点,展示在所述可编辑图像中,作为可编辑的节点,并将选取到的任一基础节点或任一高级节点作为目标节点;Wherein, at least one basic node and at least one advanced node are identified from the tree structure, displayed in the editable image as an editable node, and any selected basic node or any advanced node is selected Node as the target node;
    其中,所述高级节点是通过基础节点转化得到。Wherein, the high-level node is obtained through conversion of the basic node.
  3. 根据权利要求2所述的方法,其特征在于,所述从所述树形结构中识别出所述至少一个基础节点以及至少一个高级节点,包括:The method according to claim 2, wherein the identifying the at least one basic node and at least one high-level node from the tree structure includes:
    将从所述树形结构中识别出所述至少一个节点作为基础节点;Identifying the at least one node from the tree structure as a basic node;
    根据节点名称,从所述至少一个基础节点中获取出待转换的节点,并将待转换的节点转换为高级节点。According to the node name, the node to be converted is obtained from the at least one basic node, and the node to be converted is converted into an advanced node.
  4. 根据权利要求1所述的方法,其特征在于,在选取目标节点后,所述方法还包括:The method according to claim 1, wherein after selecting the target node, the method further comprises:
    根据选取的目标节点,获取与该目标节点对应的至少一个属性;Acquire at least one attribute corresponding to the target node according to the selected target node;
    响应于属性的查看操作,展示获取到的所述至少一个属性;Responsive to the attribute viewing operation, displaying the at least one acquired attribute;
    响应于属性的选择操作,选择该目标节点的属性。In response to the attribute selection operation, the attribute of the target node is selected.
  5. 根据权利要求1或4所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 4, further comprising:
    根据选取的目标节点,获取并展示与所述目标节点对应的至少一个属性,其中,所述至少一个属性根据选择频率由大到小进行排序;Acquiring and displaying at least one attribute corresponding to the target node according to the selected target node, wherein the at least one attribute is sorted according to the selection frequency from large to small;
    响应于属性的选择操作,选择该目标节点的属性。In response to the attribute selection operation, the attribute of the target node is selected.
  6. 根据权利要求1所述的方法,其特征在于,所述响应于配置操作,配置所述目标节点的属性的绑定数据,包括:The method according to claim 1, wherein the configuration of the binding data of the attribute of the target node in response to the configuration operation includes:
    响应于静态的绑定数据的选择操作,确定所述绑定数据为静态值;In response to the selection operation of the static binding data, determining that the binding data is a static value;
    响应于所述绑定数据的输入操作,确定所述目标节点的属性的绑定数据。In response to the input operation of the binding data, the binding data of the attribute of the target node is determined.
  7. 根据权利要求1所述的方法,其特征在于,所述响应于配置操作,配置所述目标节点的属性的绑定数据,包括:The method according to claim 1, wherein the configuration of the binding data of the attribute of the target node in response to the configuration operation includes:
    响应于动态的绑定数据的选择操作,确定所述绑定数据为动态值;In response to the selection operation of the dynamic binding data, determining that the binding data is a dynamic value;
    获取并展示出与该目标节点的属性对应的数据源选择列表;Obtain and display a data source selection list corresponding to the attributes of the target node;
    响应于对数据源的选择操作,生成该目标节点的属性的绑定数据的获取路径。In response to the selection operation on the data source, an acquisition path of the binding data of the attribute of the target node is generated.
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:The method according to claim 7, wherein the method further comprises:
    在响应于动态的绑定数据的选择操作后,未展示出与该目标节点的属性对应的数据源选择列表,则响应于所述获取路径的输入操作,确定所述该目标节点的属性的绑定数据的获取路径。After responding to the dynamic binding data selection operation and not displaying the data source selection list corresponding to the attribute of the target node, in response to the input operation of the obtaining path, determining the binding of the attribute of the target node Specify the data acquisition path.
  9. 根据权利要求1所述的方法,其特征在于,所述绑定数据作为该目标节点的属性的属性值。The method according to claim 1, wherein the binding data is used as the attribute value of the attribute of the target node.
  10. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    针对至少一个目标节点的属性的绑定数据,生成表示绑定数据的集合的描述文件。For the binding data of the attribute of at least one target node, a description file representing the set of binding data is generated.
  11. 根据权利要求1所述的方法,其特征在于,所述根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码,包括:The method according to claim 1, wherein the generating the code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data includes:
    将具有绑定数据的可编辑图像以及所述绑定数据的解析方式转换成目标编程语言对应的代码。The editable image with binding data and the parsing method of the binding data are converted into codes corresponding to the target programming language.
  12. 根据权利要求11所述的方法,其特征在于,所述将具有绑定数据的可编辑图像以及所述绑定数据的解析方式转换成目标编程语言对应的代码,包括:The method according to claim 11, wherein the method of converting the editable image with the binding data and the binding data into the code corresponding to the target programming language includes:
    响应于编程语言的选择操作,确定目标编程语言以及与所述目标编程语言对应的解析算法;In response to the selection operation of the programming language, determine the target programming language and the parsing algorithm corresponding to the target programming language;
    响应于代码的生成操作,根据所述解析算法,对配置了绑定数据的可编辑图像进行目标编程语言的编码,生成可编辑图像代码;In response to the code generation operation, according to the parsing algorithm, the editable image configured with the binding data is encoded in the target programming language to generate the editable image code;
    根据所述解析算法,对所述绑定数据解析方式进行目标编程语言的编码,生成绑定数据解析代码。According to the parsing algorithm, the binding data parsing method is encoded in the target programming language to generate the binding data parsing code.
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, wherein the method further comprises:
    将所述可编辑图像代码以及所述绑定数据解析代码进行发布,生成对应的视图模块。Publish the editable image code and the binding data analysis code to generate a corresponding view module.
  14. 一种代码的生成装置,其特征在于,包括:A code generation device, characterized in that it includes:
    选择模块,用于响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;The selection module is used to select the editable target node displayed in the editable image in response to the selection operation;
    配置模块,用于响应于配置操作,配置所述目标节点的属性的绑定数据;A configuration module, configured to configure the binding data of the attribute of the target node in response to the configuration operation;
    生成模块,用于根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。The generating module is configured to generate a code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
  15. 一种设备,其特征在于,包括存储器以及处理器;A device characterized by including a memory and a processor;
    所述存储器,用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序,以用于:The processor is used to execute the computer program for:
    响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;In response to the selection operation, select the editable target node displayed in the editable image;
    响应于配置操作,配置所述目标节点的属性的绑定数据;In response to the configuration operation, configure the binding data of the attributes of the target node;
    根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。According to the editable image, the binding data, and the analysis method of the binding data, a code corresponding to the target programming language is generated.
  16. 一种存储有计算机程序的计算机可读存储介质,其特征在于,计算机程序被一个或多个处理器执行时,致使所述一个或多个处理器实现权利要求1-13任一项所述方法中的步骤。A computer-readable storage medium storing a computer program, wherein when the computer program is executed by one or more processors, the one or more processors are caused to implement the method according to any one of claims 1-13 Steps.
  17. 一种代码的生成方法,其特征在于,包括:A code generation method, which is characterized by including:
    响应于获取操作,获取并展示可编辑图像;In response to the acquisition operation, acquire and display editable images;
    响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;In response to the selection operation, select the editable target node displayed in the editable image;
    响应于选择操作,选择所述目标节点的属性;In response to the selection operation, select the attribute of the target node;
    响应于配置操作,配置所述目标节点的属性的绑定数据;In response to the configuration operation, configure the binding data of the attributes of the target node;
    响应于生成操作,根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。In response to the generating operation, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
  18. 一种代码的生成装置,其特征在于,包括:A code generation device, characterized in that it includes:
    展示模块,用于响应于获取操作,获取并展示可编辑图像;The display module is used to obtain and display the editable image in response to the obtaining operation;
    选取模块,用于响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;The selection module is used to select the editable target node displayed in the editable image in response to the selection operation;
    选择模块,用于响应于选择操作,选择所述目标节点的属性;A selection module for selecting attributes of the target node in response to the selection operation;
    配置模块,用于响应于配置操作,配置所述目标节点的属性的绑定数据;A configuration module, configured to configure the binding data of the attribute of the target node in response to the configuration operation;
    生成模块,用于响应于生成操作,根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。The generating module is configured to generate the code corresponding to the target programming language according to the editable image, the binding data, and the binding data parsing method in response to the generating operation.
  19. 一种设备,其特征在于,包括存储器以及处理器;A device characterized by including a memory and a processor;
    所述存储器,用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序,以用于:The processor is used to execute the computer program for:
    响应于获取操作,获取并展示可编辑图像;In response to the acquisition operation, acquire and display editable images;
    响应于选取操作,选取在可编辑图像中展示的可编辑的目标节点;In response to the selection operation, select the editable target node displayed in the editable image;
    响应于选择操作,选择所述目标节点的属性;In response to the selection operation, select the attribute of the target node;
    响应于配置操作,配置所述目标节点的属性的绑定数据;In response to the configuration operation, configure the binding data of the attributes of the target node;
    响应于生成操作,根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。In response to the generating operation, the code corresponding to the target programming language is generated according to the editable image, the binding data, and the analysis method of the binding data.
  20. 一种存储有计算机程序的计算机可读存储介质,其特征在于,计算机程序被一个或多个处理器执行时,致使所述一个或多个处理器实现权利要求17项所述方法中的步骤。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by one or more processors, the one or more processors are caused to implement the steps in the method of claim 17.
  21. 一种代码的生成方法,其特征在于,包括:A code generation method, which is characterized by including:
    确定待进行处理的可编辑图像;Determine the editable image to be processed;
    确定所述可编辑图像待编辑的目标节点;Determine the target node of the editable image to be edited;
    确定所述目标节点的属性的绑定数据;Determine the binding data of the attributes of the target node;
    根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。According to the editable image, the binding data, and the analysis method of the binding data, a code corresponding to the target programming language is generated.
  22. 根据权利要求21所述的方法,其特征在于,所述确定所述可编辑图像待编辑的目标节点,包括:The method according to claim 21, wherein the determining the target node of the editable image to be edited comprises:
    为用户提供可供选择的可供编辑目标节点的界面;Provide users with an optional interface for editing target nodes;
    基于用户选择,确定待编辑的目标节点。Based on the user selection, the target node to be edited is determined.
  23. 根据权利要求21或22所述的方法,其特征在于,所述确定所述目标节点的属性的绑定数据,包括:The method according to claim 21 or 22, wherein the binding data that determines the attribute of the target node includes:
    根据所述目标节点获取对应的属性以及该属性的绑定数据。Acquire the corresponding attribute and the binding data of the attribute according to the target node.
  24. 根据权利要求21或22所述的方法,其特征在于,所述确定所述目标节点的属性的绑定数据,包括:The method according to claim 21 or 22, wherein the binding data that determines the attribute of the target node includes:
    根据所述目标节点获取对应的属性以及该属性对应的绑定数据列表,其中,该绑定数据列表中的绑定数据是根据选择频率由大到小进行排序的;Acquiring the corresponding attribute and the binding data list corresponding to the attribute according to the target node, wherein the binding data in the binding data list is sorted according to the selection frequency from large to small;
    响应于绑定数据的选择操作,选择该目标节点的属性的绑定数据。In response to the selection operation of the binding data, the binding data of the attribute of the target node is selected.
  25. 一种代码的生成装置,其特征在于,包括:A code generation device, characterized in that it includes:
    第一确定模块,用于确定待进行处理的可编辑图像;The first determining module is used to determine the editable image to be processed;
    第二确定模块,用于确定所述可编辑图像待编辑的目标节点;A second determination module, used to determine the target node of the editable image to be edited;
    第三确定模块,用于确定所述目标节点的属性的绑定数据;A third determining module, configured to determine the binding data of the attribute of the target node;
    生成模块,用于根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。The generating module is configured to generate a code corresponding to the target programming language according to the editable image, the binding data, and the analysis method of the binding data.
  26. 一种设备,其特征在于,包括存储器以及处理器;A device characterized by including a memory and a processor;
    所述存储器,用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序,以用于:The processor is used to execute the computer program for:
    确定待进行处理的可编辑图像;Determine the editable image to be processed;
    确定所述可编辑图像待编辑的目标节点;Determine the target node of the editable image to be edited;
    确定所述目标节点的属性的绑定数据;Determine the binding data of the attributes of the target node;
    根据所述可编辑图像、所述绑定数据以及所述绑定数据的解析方式,生成目标编程语言对应的代码。According to the editable image, the binding data, and the analysis method of the binding data, a code corresponding to the target programming language is generated.
  27. 一种存储有计算机程序的计算机可读存储介质,其特征在于,计算机程序被一个或多个处理器执行时,致使所述一个或多个处理器实现权利要求21-24任一项所述方法中的步骤。A computer-readable storage medium storing a computer program, wherein when the computer program is executed by one or more processors, the one or more processors are caused to implement the method according to any one of claims 21-24 Steps.
PCT/CN2020/070096 2019-01-06 2020-01-02 Code generation method and apparatus, and device and storage medium WO2020140940A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910014443.9 2019-01-06
CN201910014443.9A CN111414166B (en) 2019-01-06 2019-01-06 Code generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020140940A1 true WO2020140940A1 (en) 2020-07-09

Family

ID=71406995

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/070096 WO2020140940A1 (en) 2019-01-06 2020-01-02 Code generation method and apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN111414166B (en)
WO (1) WO2020140940A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051448A (en) * 2021-03-17 2021-06-29 平安普惠企业管理有限公司 Data processing method and device, electronic equipment and storage medium
CN113110838A (en) * 2021-04-06 2021-07-13 北京城市网邻信息技术有限公司 Method, device, equipment and computer readable medium for displaying landing page design interface
CN113448605A (en) * 2021-06-29 2021-09-28 北京高途云集教育科技有限公司 Software updating method and device, electronic equipment and storage medium
CN113703765A (en) * 2021-08-23 2021-11-26 风变科技(深圳)有限公司 Course data generation method and device, computer equipment and storage medium
CN116108235A (en) * 2023-02-20 2023-05-12 上海安博通信息科技有限公司 Path acquisition method and device for tree structure and processing equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183028A (en) * 2020-09-26 2021-01-05 广州鲁邦通物联网科技有限公司 Data display method, equipment and system
WO2023123089A1 (en) * 2021-12-29 2023-07-06 深圳晶泰科技有限公司 Content management system, static page management method and device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078665A1 (en) * 2009-09-29 2011-03-31 Microsoft Corporation Computing a symbolic bound for a procedure
CN103744674A (en) * 2014-01-06 2014-04-23 北京奇虎科技有限公司 Method and device for generating hypertext markup language (HTML) procedure code
CN106708479A (en) * 2015-07-27 2017-05-24 恒生电子股份有限公司 Page rendering method and device
CN106815022A (en) * 2017-01-04 2017-06-09 中国石油大学(北京) A kind of general UI interface creating methods and device based on tree data structure

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4120980B2 (en) * 2001-07-10 2008-07-16 シャープ株式会社 Encoding apparatus and method, and decoding apparatus and method
AU2002950444A0 (en) * 2002-07-29 2002-09-12 Interad Technology Limited Bi-directional programming system/method for program development
KR101479141B1 (en) * 2009-12-10 2015-01-07 에스케이텔레콤 주식회사 Coding Method and Apparatus by Using Tree Structure
CN103646023A (en) * 2013-09-24 2014-03-19 国家电网公司 Page and control increasing method based on WEB

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078665A1 (en) * 2009-09-29 2011-03-31 Microsoft Corporation Computing a symbolic bound for a procedure
CN103744674A (en) * 2014-01-06 2014-04-23 北京奇虎科技有限公司 Method and device for generating hypertext markup language (HTML) procedure code
CN106708479A (en) * 2015-07-27 2017-05-24 恒生电子股份有限公司 Page rendering method and device
CN106815022A (en) * 2017-01-04 2017-06-09 中国石油大学(北京) A kind of general UI interface creating methods and device based on tree data structure

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051448A (en) * 2021-03-17 2021-06-29 平安普惠企业管理有限公司 Data processing method and device, electronic equipment and storage medium
CN113110838A (en) * 2021-04-06 2021-07-13 北京城市网邻信息技术有限公司 Method, device, equipment and computer readable medium for displaying landing page design interface
CN113448605A (en) * 2021-06-29 2021-09-28 北京高途云集教育科技有限公司 Software updating method and device, electronic equipment and storage medium
CN113448605B (en) * 2021-06-29 2024-02-09 北京高途云集教育科技有限公司 Software updating method and device, electronic equipment and storage medium
CN113703765A (en) * 2021-08-23 2021-11-26 风变科技(深圳)有限公司 Course data generation method and device, computer equipment and storage medium
CN113703765B (en) * 2021-08-23 2023-10-17 风变科技(深圳)有限公司 Course data generation method, course data generation device, computer equipment and storage medium
CN116108235A (en) * 2023-02-20 2023-05-12 上海安博通信息科技有限公司 Path acquisition method and device for tree structure and processing equipment
CN116108235B (en) * 2023-02-20 2023-11-10 上海安博通信息科技有限公司 Path acquisition method and device for tree structure and processing equipment

Also Published As

Publication number Publication date
CN111414166A (en) 2020-07-14
CN111414166B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
WO2020140940A1 (en) Code generation method and apparatus, and device and storage medium
CN108491205B (en) Front-end webpage development method and system based on component tree
CN112099768B (en) Business process processing method and device and computer readable storage medium
CN106462555B (en) Method and system for WEB content generation
CN100530083C (en) Programming interface for a computer program
WO2018072071A1 (en) Knowledge map building system and method
CN110515896B (en) Model resource management method, model file manufacturing method, device and system
CN105511873B (en) User interface control display method and device
JP2022534933A (en) System and method for integrating user feedback into web building system services
CN105517681A (en) Chart conversion system using metadata and method therefor
US20200264851A1 (en) Systems and methods for organizing, classifying, and discovering automatically generated computer software
US20180349345A1 (en) Reducing graphical interface description code
Standridge et al. TESS—the extended simulation support system
US20230134235A1 (en) Applying a Visual Analytics Intent Language to Generate Data Visualizations
US10776351B2 (en) Automatic core data service view generator
CN110647322A (en) List rendering method and device, electronic equipment and computer readable medium
CN111611419B (en) Sub-graph identification method and device
CN113095056B (en) Generation method, processing method, device, electronic equipment and medium
CN114594927A (en) Low code development method, device, system, server and storage medium
CN111367514A (en) Page card development method and device, computing device and storage medium
US9116931B2 (en) Integrated, configurable, analytical, temporal, visual electronic plan system
US10896161B2 (en) Integrated computing environment for managing and presenting design iterations
CN114207598A (en) Electronic form conversion
CN116028062A (en) Target code generation method, NPU instruction display method and device
US11526578B2 (en) System and method for producing transferable, modular web pages

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20735890

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20735890

Country of ref document: EP

Kind code of ref document: A1