CN112506503A - Programming method, device, terminal equipment and storage medium - Google Patents

Programming method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN112506503A
CN112506503A CN202011509487.8A CN202011509487A CN112506503A CN 112506503 A CN112506503 A CN 112506503A CN 202011509487 A CN202011509487 A CN 202011509487A CN 112506503 A CN112506503 A CN 112506503A
Authority
CN
China
Prior art keywords
target
program
display interface
behavior tree
programming
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011509487.8A
Other languages
Chinese (zh)
Other versions
CN112506503B (en
Inventor
陈凌锋
崔宁
王轶丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
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 Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN202011509487.8A priority Critical patent/CN112506503B/en
Publication of CN112506503A publication Critical patent/CN112506503A/en
Application granted granted Critical
Publication of CN112506503B publication Critical patent/CN112506503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a programming method, a programming device, terminal equipment and a storage medium, wherein the method comprises the following steps: when programming operation on a target is detected in a first preset display interface, calling a UI function component associated with the target, and displaying a second display interface above the first display interface; on a second display interface, when detecting that a user connects K selected UI function components into a behavior tree diagram, converting the behavior tree diagram into a target program; and compiling the object program, and associating the compiled object program with the object so that the compiled object program becomes a control behavior program of the object. The user connects visual UI functional components into the behavior tree diagram, so that the children or beginners can conveniently and simply conduct programming operation, and the behavior tree diagram can effectively enable the children to learn the programming thought essentially.

Description

Programming method, device, terminal equipment and storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a programming method, an apparatus, a terminal device, and a storage medium.
Background
With the rapid development of computer technology, various convenient and rapid learning methods and using tools are provided for modern education informatization, and programming education is also a product adapting to the requirements of the era. The traditional programming is usually completed by inputting a programming language, and the complex grammar and instructions of the programming language are not suitable for users with weak programming base such as children and beginners.
In order to enable a child to contact with the programming idea earlier, graphical programming is used as a natural programming mode and is a feasible way for programming of the child, concepts of various programming can be converted into various graphics displayed on a screen, the child can complete the whole programming process only by dragging and splicing the various graphics, and the conventional child programming method cannot enable the child to learn the programming idea essentially.
Disclosure of Invention
The embodiment of the application provides a programming method, a programming device, terminal equipment and a storage medium, and aims to solve the problem that the existing child programming method cannot simply and effectively enable a child to essentially learn the programming idea.
In a first aspect, an embodiment of the present application provides a programming method, including:
when programming operation on a target is detected in a first preset display interface, calling a UI function component associated with the target, and displaying a second display interface above the first display interface;
on the second display interface, when detecting that a user connects K selected UI function components into a behavior tree diagram, converting the behavior tree diagram into a target program; wherein K is not less than 1 and is an integer;
and compiling the object program, and associating the compiled object program with the object, so that the compiled object program becomes a control behavior program of the object.
In one embodiment, the converting the behavior tree into the target program includes:
analyzing the logic structure of the behavior tree diagram;
acquiring a function corresponding to each UI function component in the behavior tree diagram, and respectively converting the K UI function components into program segments corresponding to K segments of target programming languages;
and converting the behavior tree diagram into a target program based on the target programming language according to the logic structure and the program segment corresponding to the K segments of the target programming language.
In one embodiment, the converting the behavior tree into a target program based on a target programming language includes:
and converting the behavior tree diagram into an LUA program programmed based on an LUA script language.
In one embodiment, the method further comprises:
when the operation of connecting the UI function components is detected, detecting whether the UI function components are connected according to a preset rule of a behavior tree or not;
and when detecting that the functional components which are not connected according to the preset rules of the behavior tree exist, generating prompt information according to the case of the preset behavior tree so that the user can connect the UI functional components according to the preset rules of the behavior tree according to the prompt information.
In one embodiment, after associating the compiled object program with the object, the method further includes:
and if an instruction for changing the target program is received, displaying the behavior tree diagram corresponding to the target so that a user can change the corresponding UI functional component based on the displayed behavior tree diagram.
In one embodiment, the first display interface includes a first area for displaying a work area of the target and a second area for displaying at least one toolbar button;
displaying a second display interface over the first display interface, comprising:
and displaying the second display interface on the first area of the first display interface so that a user can perform connection operation on the UI functional component on the second display interface.
In one embodiment, the second display interface includes a third area and a fourth area, the third area is an operation area for programming, and the fourth area is used for displaying the top N UI function components associated with the target and having the most frequent usage, so that the user can select the N UI function components.
In a second aspect, an embodiment of the present application provides a programming apparatus, including:
the system comprises a first detection module, a second detection module and a display module, wherein the first detection module is used for calling a UI (user interface) functional component associated with a target and displaying a second display interface above the first display interface when the programming operation of the target is detected in a preset first display interface;
the second detection module is used for converting the behavior dendrogram into a target program when detecting that the user connects the K selected UI function components into the behavior dendrogram on the second display interface; wherein K is not less than 1 and is an integer;
and the association module is used for compiling the target program and associating the compiled target program with the target so that the compiled target program becomes a control behavior program of the target.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the above programming method when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program implements the steps of the programming method when executed by a processor.
In a fifth aspect, the present application provides a computer program product, which when run on an electronic device, causes the electronic device to perform the steps of the above programming method.
Compared with the prior art, the embodiment of the application has the advantages that: according to the embodiment of the application, a user can perform programming operation on the target in a preset first display interface, when the programming operation of the user on the target is detected, the associated UI function component is called, the user can select the UI function component on a second display interface, the selected UI function component is connected into the behavior dendrogram, the connected behavior dendrogram is converted into the target program, the compiled target program is associated with the target, the compiled target program becomes the control behavior program of the target, therefore, the user can connect the visual UI function component into the behavior dendrogram, the programming operation of children or beginners can be conveniently and simply performed, and the behavior dendrogram can be connected to enable the children to learn the programming thought essentially.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart illustrating a programming method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a first display interface provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a second display interface provided by an embodiment of the present application;
FIG. 4 is a flow chart illustrating a programming method according to another embodiment of the present application;
FIG. 5 is a schematic structural diagram of a programming device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The programming method provided by the embodiment of the application can be applied to terminal devices such as a Mobile phone, a desktop Computer, a notebook Computer, a super-Mobile Personal Computer (UMPC), a netbook, a Personal Digital Assistant (PDA), a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a television, a robot, and the like, and the embodiment of the application does not limit the specific types of the terminal devices at all.
In order to explain the technical means described in the present application, the following examples are given below.
Referring to fig. 1, a programming method provided in an embodiment of the present application includes:
step S101, when a programming operation on a target is detected in a first preset display interface, calling a UI function component associated with the target, and displaying a second display interface above the first display interface.
Specifically, the first display interfaces can be set according to different application scenes, each first display interface comprises one or more programmable targets, the targets are displayed in the first display interfaces in a graphical mode, and a user can directly click one or more targets in the first display interfaces to perform corresponding programming.
In one embodiment, the first display interface includes a first area for displaying a work area of the target and a second area for displaying at least one toolbar button; displaying a second display interface over the first display interface, comprising: and displaying the second display interface on the first area of the first display interface so that a user can perform connection operation on the UI functional component on the second display interface.
Specifically, the first display interface may include a first area and a second area, the first area includes a work area of a target, a user may select a corresponding target in the work area, the second area is used for displaying an area of a toolbar, after the user selects the target in the first area, the user selects a corresponding toolbar button in the second area, for example, the user clicks one or more targets in the first area, and then clicks a preset programming operation button in the second area, which is equivalent to inputting a request instruction of a programming operation, at this time, the programming operation may be performed, the second display interface is first invoked to be displayed in the process of performing the programming operation, and specifically, the second display interface is displayed above the first display interface, and the user may perform the programming operation on the second display interface.
In one embodiment, the second display interface includes a third area and a fourth area, the third area is an operation area for programming, and the fourth area is used for displaying the top N UI function components associated with the target and having the most frequent usage, so that the user can select the N UI function components.
Specifically, on the preset second display interface, the user can perform a programming operation. For example, the third area included in the second display interface is a programmed work area, and the fourth area is a preset UI function component frequently used for programming. Specifically, the first N UI function components with the highest use frequency can be displayed in the fourth area according to the historical use frequency of the target by the user, the user can select a UI function component in the fourth area, drag the UI function component to the third area, and connect the UI function components through a preset connection line, or the UI function components that are not displayed in the fourth display area can be searched by the user in a searching manner to connect the UI function components. The UI function component is a programming module which is imaged in advance, the UI function component is associated with function functions in a programming language in advance, and the execution sequence among the UI function components is determined according to the behavior tree diagram, so that the programming function can be realized.
In a specific application scenario, as shown in fig. 2, a schematic diagram of the first display interface is shown, for example, a left area 21 of the first display interface is a menu bar (i.e., the first area), a right area 22 is a second area, the second area may specifically be an area corresponding to a scenario where the object is located, and after the object is associated with the object program in the second area, the object may be controlled to make a corresponding behavior event or a behavior event interacting with another object according to the object program. In order to better display the target of the current programming control, if the target is selected, the object corresponding to the target can be highlighted or preset prompt information is displayed at a specific position. The target may specifically be a predetermined 2D object or 3D object.
Step S102, when detecting that a user connects K selected UI function components into a behavior tree diagram on the second display interface, converting the behavior tree diagram into a target program; wherein K is not less than 1 and is an integer.
Specifically, when it is detected that the user connects the selected K UI function components into the behavior tree, the behavior tree may be converted into the target program after the user selects one or more UI function components to connect into the behavior tree and submits an instruction to complete connection of the behavior tree. The behavior tree diagram is a tree diagram matched with the structure of the behavior tree.
In a specific application scenario, as shown in fig. 3, a schematic diagram of a second display interface displayed above the first display interface is shown, for example, a diamond diagram in a fourth area 31 of the second display interface is a functional component corresponding to a conditional judgment function, a block diagram is a functional component corresponding to a behavior node, and the behavior node includes, but is not limited to, a sequence node, a selection node, and the like. A connected behavior tree is shown in the third area 32, the root node of the behavior tree is a sequence node, the execution logic of the sequence node is analyzed from left to right (the order is fixed, or from right to left), all the results are returned as success, and the sequence node returns success. The selection node is analyzed from left to right (the sequence is fixed, or from right to left), and if one returns success, the selection node is successful. If the logical idea of the behavior tree is that the current node first judges that the current event cannot be executed, can be executed and is successfully executed according to the execution condition, the node which is allowed to execute the event is notified, and the execution result (success or failure, or waiting for a period of time) of the event is returned to the node which is allowed to execute the event.
For example, in the third area 32 of fig. 3, the nodes 1, 2, 3, 4, 5, 6, 7, 8 and 9 can be connected into a behavior tree, the logic process of the behavior tree is that the node 1 makes the node 2 judge whether the target is asleep, and the events of the right node 3, 4, 5, 6, 7, 8 and 9 are not executed while asleep; when the user does not sleep, the user returns to the root node 1 of the behavior tree, the node 1 enables the sequence node 3 to judge that the user cannot eat, the node 3 enables the first node 4 to judge whether the user is hungry or not, the node 5, the node 6, the node 7, the node 8 and the node 9 are not executed if the user is hungry, the user continues to execute the node 5 to find out the user, the node 5 is a selected node, the execution node 6 is selected to eat apples first, the node 6 enables the node 7 to judge whether the user has apples or not, the node 7 returns that the user has apples, the execution node 7 finishes eating the apples, if the node 7 does not have the apples, the node 6 enables the node 9 to eat beef noodles, the execution logic is from left to right, and the analogy is realized, the logic of the behavior tree is clear and easy to expand, and the user can learn programming thinking better.
In one embodiment, when the operation of connecting the UI function components is detected, whether the UI function components are connected according to a preset rule of a behavior tree is detected; and when detecting that the functional components which are not connected according to the preset rules of the behavior tree exist, generating prompt information according to the case of the preset behavior tree so that the user can connect the UI functional components according to the preset rules of the behavior tree according to the prompt information.
Specifically, in the process of connecting the functional components by the user, whether the functional components are connected according to the preset rule of the behavior tree is detected in real time. If the connection is not performed according to the preset rule of the behavior tree, displaying the pre-stored behavior tree connection case column to the user so as to prompt the user to connect the functional components into a behavior tree diagram according to the preset rule of the behavior tree. The behavior tree has good expansibility, so that the behavior tree can be conveniently changed subsequently, the logic of the behavior tree is clear and simple, the behavior tree conforms to the programming logic, and the behavior tree can help a user to enter programming study simply and conveniently.
In one embodiment, the converting the behavior tree into the target program includes:
step S1021, analyzing the logic structure of the behavior tree diagram.
Specifically, the logical structure of the behavior tree is clear and easy to understand, and the connection relationship of each UI function component in the behavior tree diagram can be analyzed first to obtain the logical structure of the connection between the UI function components.
Step S1022, obtaining a function corresponding to each UI function component in the behavior tree, and respectively converting the K UI function components into program segments corresponding to K target programming languages.
Specifically, each UI function component associates a corresponding function in advance, and generates a corresponding program segment from the corresponding function component according to the function associated in advance. If some function functions need to input parameters to generate a complete program segment, a corresponding program segment is generated according to the parameters input by the user and the selected functional components. And converting the K UI function components in the behavior tree diagram into program segments corresponding to the K segments based on the target programming language. If the functional component is a judgment function, a judgment condition needs to be input, the input condition can be in a graphic form or a character form, and if the input is that the characters are not hungry, the judgment condition is recognized to be hungry according to semantics.
And step S1023, converting the behavior dendrogram into a target program based on the target programming language according to the logic structure and the program segment corresponding to the K-segment target programming language.
Specifically, the logic structure includes a connection relationship between the functions, so that an index relationship between K program segments can be obtained, and then the K program segments are converted into the target program according to the index between the K program segments.
In one embodiment, the converting the behavior tree into a target program based on a target programming language includes: and converting the behavior tree diagram into an LUA program programmed based on an LUA script language.
Specifically, the behavior tree diagram is converted into a LUA program based on LUA scripting language programming, specifically, each node in the behavior tree diagram may generate LUA code through a LUA generator, or other code generators may generate corresponding programs, so that the carrier engine or the framework can execute the corresponding programs.
Step S103, compiling the object program, and associating the compiled object program with the object, so that the compiled object program becomes a control behavior program of the object.
Specifically, the object program is automatically compiled, so that the compiled object program becomes a control behavior program of the object, and when the object is in a specific application scene, for example, after the object in the first interface is programmed, the object program is automatically executed when the execution condition is met, so that the object can be controlled to perform corresponding operation according to simple programming, and the interest of programming is improved.
In one embodiment, after associating the compiled object program with the object, the method further includes: and if an instruction for changing the target program is received, displaying the behavior tree diagram corresponding to the target so that a user can change the corresponding UI functional component based on the displayed behavior tree diagram.
Specifically, after the target program is associated with the target, if the functions of the target need to be expanded or some existing functions need to be changed and deleted, after the target is selected, a preset button for changing the program corresponding to the target is clicked, and the button is a graphical button. And when detecting that a button corresponding to the target program is clicked, calling the behavior tree diagram, displaying the behavior tree diagram on a second interface, so that a user can change the corresponding UI function component based on the displayed behavior tree diagram, and returning to execute the steps S102 to S103 after detecting the change operation, so as to update the target program associated with the target.
According to the embodiment of the application, a user can perform programming operation on the target in a preset first display interface, when the programming operation of the user on the target is detected, the associated UI function component is called, the user can select the UI function component on a second display interface, the selected UI function component is connected into the behavior dendrogram, the connected behavior dendrogram is converted into the target program, the compiled target program is associated with the target, the compiled target program becomes the control behavior program of the target, therefore, the user can connect the visual UI function component into the behavior dendrogram, the programming operation of children or beginners can be conveniently and simply performed, and the behavior dendrogram is connected to effectively enable the children to learn the programming idea essentially.
Fig. 5 shows a block diagram of a programming apparatus provided in an embodiment of the present application, corresponding to the programming method described in the above embodiment, and only shows portions related to the embodiment of the present application for convenience of description. Referring to fig. 5, the apparatus includes:
a first detection module 501, configured to, when a programming operation on a target is detected in a preset first display interface, invoke a UI function component associated with the target, and display a second display interface above the first display interface;
a second detecting module 502, configured to, on the second display interface, when detecting that a user connects K selected UI function components into a behavior tree, convert the behavior tree into a target program; wherein K is not less than 1 and is an integer;
the associating module 503 is configured to compile the object program, and associate the compiled object program with the object, so that the compiled object program becomes a control behavior program of the object.
In one embodiment, the second detection module comprises:
the analysis unit is used for analyzing the logic structure of the behavior tree diagram;
the first conversion unit is used for acquiring a function corresponding to each UI function component in the behavior tree diagram and respectively converting the K UI function components into program segments corresponding to K segments of target programming languages;
and the second conversion unit is used for converting the behavior dendrogram into a target program based on the target programming language according to the logic structure and the program segment corresponding to the K segments of the target programming language.
In one embodiment, the second detection module is specifically configured to: and on the second display interface, when detecting that the user connects the selected K UI function components into a behavior tree diagram, converting the behavior tree diagram into an LUA program based on LUA scripting language programming.
In one embodiment, the programming means comprises:
the third detection module is used for detecting whether the UI function components are connected according to the preset rule of the behavior tree or not when the operation of connecting the UI function components is detected;
and the fourth detection module is used for generating prompt information according to the case of the preset behavior tree when detecting that the functional components which are not connected according to the preset rule of the behavior tree exist, so that the user can connect the UI functional components according to the preset rule of the behavior tree according to the prompt information.
In one embodiment, the programming apparatus further comprises:
and the changing module is used for displaying the behavior tree diagram corresponding to the target when receiving an instruction for changing the target program so as to enable a user to change the corresponding UI functional component based on the displayed behavior tree diagram.
In one embodiment, the first display interface includes a first area for displaying a work area of the target and a second area for displaying at least one toolbar button; displaying a second display interface over the first display interface, comprising: and displaying the second display interface on the first area of the first display interface so that a user can perform connection operation on the UI functional component on the second display interface.
In one embodiment, the second display interface includes a third area and a fourth area, the third area is an operation area for programming, and the fourth area is used for displaying the top N UI function components associated with the target and having the most frequent usage, so that the user can select the N UI function components.
According to the embodiment of the application, a user can perform programming operation on the target in a preset first display interface, when the programming operation of the user on the target is detected, the associated UI function component is called, the user can select the UI function component on a second display interface, the selected UI function component is connected into the behavior dendrogram, the connected behavior dendrogram is converted into the target program, the compiled target program is associated with the target, the compiled target program becomes the control behavior program of the target, therefore, the user can connect the visual UI function component into the behavior dendrogram, the programming operation of children or beginners can be conveniently and simply performed, and the behavior dendrogram is connected to effectively enable the children to learn the programming idea essentially.
As shown in fig. 6, an embodiment of the present invention further provides a terminal device 600 including: a processor 601, a memory 602 and a computer program 603, e.g. a programming program, stored in said memory 602 and executable on said processor 601. The steps in the various programming method embodiments described above, such as the method steps in the embodiments described above, are implemented when the computer program 603 is executed by the processor 601. The processor 601, when executing the computer program 603, implements the functions of the modules in the above-described device embodiments, such as the functions of the modules 501 to 503 shown in fig. 5.
Illustratively, the computer program 603 may be partitioned into one or more modules that are stored in the memory 602 and executed by the processor 601 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 603 in the terminal device 600. For example, the computer program 603 may be implemented by a first detection module, a second detection module, and an association module, and specific functions of each module have been described in the foregoing embodiments, which are not described herein again.
The terminal device 600 may be a Mobile phone, a desktop Computer, a notebook Computer, a super Mobile Personal Computer (UMPC), a netbook, a Personal Digital Assistant (PDA), a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, a television, a robot, or other computing devices. The terminal device may include, but is not limited to, a processor 601, a memory 602. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 600 and does not constitute a limitation of terminal device 600 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 601 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 602 may be an internal storage unit of the terminal device 600, such as a hard disk or a memory of the terminal device 600. The memory 602 may also be an external storage device of the terminal device 600, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 600. Further, the memory 602 may also include both an internal storage unit and an external storage device of the terminal device 600. The memory 602 is used for storing the computer programs and other programs and data required by the terminal device. The memory 602 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A programming method, comprising:
when programming operation on a target is detected in a first preset display interface, calling a UI function component associated with the target, and displaying a second display interface above the first display interface;
on the second display interface, when detecting that a user connects K selected UI function components into a behavior tree diagram, converting the behavior tree diagram into a target program; wherein K is not less than 1 and is an integer;
and compiling the object program, and associating the compiled object program with the object, so that the compiled object program becomes a control behavior program of the object.
2. The method of claim 1, wherein converting the behavior tree into a target program comprises:
analyzing the logic structure of the behavior tree diagram;
acquiring a function corresponding to each UI function component in the behavior tree diagram, and respectively converting the K UI function components into program segments corresponding to K segments of target programming languages;
and converting the behavior tree diagram into a target program based on the target programming language according to the logic structure and the program segment corresponding to the K segments of the target programming language.
3. The method of claim 1, wherein transforming the behavior tree into a target program based on a target programming language comprises:
and converting the behavior tree diagram into an LUA program programmed based on an LUA script language.
4. The method of claim 1, further comprising:
when the operation of connecting the UI function components is detected, detecting whether the UI function components are connected according to a preset rule of a behavior tree or not;
and when detecting that the functional components which are not connected according to the preset rules of the behavior tree exist, generating prompt information according to the case of the preset behavior tree so that the user can connect the UI functional components according to the preset rules of the behavior tree according to the prompt information.
5. The method of claim 1, further comprising, after associating the compiled object program with the object:
and if an instruction for changing the target program is received, displaying the behavior tree diagram corresponding to the target so that a user can change the corresponding UI functional component based on the displayed behavior tree diagram.
6. The method of claim 1, wherein the first display interface comprises a first area for displaying a work area of the target and a second area for displaying at least one toolbar button;
displaying a second display interface over the first display interface, comprising:
and displaying the second display interface on the first area of the first display interface so that a user can perform connection operation on the UI functional component on the second display interface.
7. The method of claim 6, wherein the second display interface comprises a third area and a fourth area, the third area is a programming operation area, and the fourth area is used for displaying the top N UI function components which are most frequently used and are associated with the target, so that the user can select the N UI function components.
8. A programming apparatus, comprising:
the system comprises a first detection module, a second detection module and a display module, wherein the first detection module is used for calling a UI (user interface) functional component associated with a target and displaying a second display interface above the first display interface when the programming operation of the target is detected in a preset first display interface;
the second detection module is used for converting the behavior dendrogram into a target program when detecting that the user connects the K selected UI function components into the behavior dendrogram on the second display interface; wherein K is not less than 1 and is an integer;
and the association module is used for compiling the target program and associating the compiled target program with the target so that the compiled target program becomes a control behavior program of the target.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202011509487.8A 2020-12-18 2020-12-18 Programming method, device, terminal equipment and storage medium Active CN112506503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011509487.8A CN112506503B (en) 2020-12-18 2020-12-18 Programming method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011509487.8A CN112506503B (en) 2020-12-18 2020-12-18 Programming method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112506503A true CN112506503A (en) 2021-03-16
CN112506503B CN112506503B (en) 2024-01-12

Family

ID=74922937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011509487.8A Active CN112506503B (en) 2020-12-18 2020-12-18 Programming method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112506503B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467757A (en) * 2021-06-01 2021-10-01 成都节节高教育科技有限公司 System mining and software optimization assistance based on user personalized customization
WO2023142075A1 (en) * 2022-01-29 2023-08-03 西门子股份公司 Workflow creation method and apparatus, platform and computer readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960504A (en) * 2019-04-05 2019-07-02 腾讯科技(深圳)有限公司 Object switching method, method for showing interface and device based on visual programming
CN109992263A (en) * 2019-04-05 2019-07-09 腾讯科技(深圳)有限公司 A kind of method and apparatus executing visual programming
CN111045667A (en) * 2019-12-06 2020-04-21 中国科学院自动化研究所 Graphical programming system based on Lua script

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960504A (en) * 2019-04-05 2019-07-02 腾讯科技(深圳)有限公司 Object switching method, method for showing interface and device based on visual programming
CN109992263A (en) * 2019-04-05 2019-07-09 腾讯科技(深圳)有限公司 A kind of method and apparatus executing visual programming
CN111045667A (en) * 2019-12-06 2020-04-21 中国科学院自动化研究所 Graphical programming system based on Lua script

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467757A (en) * 2021-06-01 2021-10-01 成都节节高教育科技有限公司 System mining and software optimization assistance based on user personalized customization
CN113467757B (en) * 2021-06-01 2024-03-22 成都节节高教育科技有限公司 System mining and software optimization assistance based on user personalized customization
WO2023142075A1 (en) * 2022-01-29 2023-08-03 西门子股份公司 Workflow creation method and apparatus, platform and computer readable medium

Also Published As

Publication number Publication date
CN112506503B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
CN108958736B (en) Page generation method and device, electronic equipment and computer readable medium
WO2021017735A1 (en) Smart contract formal verification method, electronic apparatus and storage medium
CN107766349B (en) Method, device, equipment and client for generating text
CN111708528A (en) Method, device and equipment for generating small program and storage medium
CN110968305A (en) Applet visualization generation method, device, equipment and storage medium
CN111523021B (en) Information processing system and execution method thereof
JP7093397B2 (en) Question answering robot generation method and equipment
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN112506503B (en) Programming method, device, terminal equipment and storage medium
CN112070202B (en) Fusion graph generation method and device and computer readable storage medium
EP3195115A1 (en) Code development tool with multi-context intelligent assistance
CN108170425B (en) Program code modification method and device and terminal equipment
CN116028028A (en) Request function generation method, device, equipment and storage medium
CN115658523A (en) Automatic control and test method for human-computer interaction interface and computer equipment
CN113486215A (en) Data display method, device and equipment based on data relevance
US10445290B1 (en) System and method for a smart configurable high performance interactive log file viewer
CN111142871A (en) Front-end page development system, method, equipment and medium
CN116009852A (en) Code construction method, device, computer equipment and storage medium
CN114222317A (en) Data processing method and device, electronic equipment and storage medium
CN111079771B (en) Method, system, terminal equipment and storage medium for extracting characteristics of click-to-read image
CN111459584B (en) Page rendering method and device and electronic equipment
CN113935847A (en) Online process risk processing method, device, server and medium
CN115756452A (en) Target page code generation method, device, storage medium and program product
CN112632436A (en) Webpage display method and device, electronic equipment and storage medium

Legal Events

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