CN111198686A - Programming method, device, equipment and computer readable storage medium - Google Patents

Programming method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111198686A
CN111198686A CN201911373360.5A CN201911373360A CN111198686A CN 111198686 A CN111198686 A CN 111198686A CN 201911373360 A CN201911373360 A CN 201911373360A CN 111198686 A CN111198686 A CN 111198686A
Authority
CN
China
Prior art keywords
programming
graphic module
instruction
determining
module
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.)
Withdrawn
Application number
CN201911373360.5A
Other languages
Chinese (zh)
Inventor
杨昌安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN201911373360.5A priority Critical patent/CN111198686A/en
Publication of CN111198686A publication Critical patent/CN111198686A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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

Landscapes

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

Abstract

The invention relates to the technical field of data processing, and provides a programming method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: when a creating instruction is detected, creating an editing interface corresponding to the creating instruction, wherein the editing interface comprises a graphic module area and a programming area; if a dragging instruction is detected in the graphic module area, determining a graphic module corresponding to the dragging instruction, and determining logic parameters of the graphic module in the programming area; and when the operation instruction is detected, determining a programming function corresponding to the graphic module, and displaying a corresponding programming result based on the programming function and the logic parameter. The invention replaces codes by the graphic module, simplifies the programming process, reduces the workload of programmers and realizes simple programming.

Description

Programming method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a programming method, an apparatus, a device, and a computer-readable storage medium.
Background
With the development of computer technology, more and more things are replaced by computer technology, such as the photographing function of a camera; the scanning function of the printer may be implemented by an App of the computer, that is, the computer may implement various utility functions, and the implementation of the utility functions depends on the programming of the programmer. The programming is a process of specifying a certain operation mode for a certain computing system by a computer to solve a certain problem, operating the computing system according to the operation mode, and finally obtaining a corresponding result.
However, this process requires a user to have certain programming knowledge including various language codes and various logic operations, which makes it difficult for a non-professional user to program, resulting in a high programming threshold and a high operation difficulty, and in the programming process, even a professional user needs to type a code into an edit bar, which is a heavy task.
Disclosure of Invention
The invention mainly aims to provide a programming method, a programming device, programming equipment and a computer readable storage medium, and aims to solve the technical problems of high programming threshold and large workload in the prior art.
To achieve the above object, the present invention provides a programming method, comprising the steps of:
when a creating instruction is detected, creating an editing interface corresponding to the creating instruction, wherein the editing interface comprises a graphic module area and a programming area;
if a dragging instruction is detected in the graphic module area, determining a graphic module corresponding to the dragging instruction, and determining logic parameters of the graphic module in the programming area;
and when the operation instruction is detected, determining a programming function corresponding to the graphic module, and displaying a corresponding programming result based on the programming function and the logic parameter.
Optionally, when a creation instruction is detected, the step of creating an editing interface corresponding to the creation instruction includes:
when a creating instruction is detected, acquiring the identity of a current user, and determining a programming version corresponding to the identity;
and displaying a display interface corresponding to the programming version, and creating an editing interface corresponding to the creation instruction in the display interface.
Optionally, before the step of determining a programming function corresponding to the graphics module when the execution instruction is detected, and displaying a corresponding programming result based on the programming function and the logic parameter, the programming method further includes:
when the dragging instruction is detected to be completed, displaying a parameter input interface of the graphic module, and receiving inlet data and outlet data input based on the parameter input interface;
when the operation instruction is detected, the step of determining the programming function corresponding to the graphic module and displaying the corresponding programming result based on the programming function and the logic parameter comprises the following steps:
when an operating instruction is detected, a corresponding programming function is determined based on the entry data and the exit data, and a corresponding programming result is displayed based on the programming function and the logic parameter.
Optionally, the logic parameter includes a dragging position of the graphics module in the programming area, and the step of determining a programming function corresponding to the graphics module when the execution instruction is detected, and displaying a corresponding programming result based on the programming function and the logic parameter includes:
when an operation instruction is detected, determining a programming function corresponding to the graphic module based on the mark of the graphic module, and determining an execution logic of the programming function based on the dragging position;
converting the programming function and the execution logic into programming data in a preset format according to an agreed rule, and creating a programming file corresponding to the programming data;
and inputting the programming file into a virtual machine to enable the virtual machine to decompile the programming file to obtain an execution code, running the execution code, and displaying a programming result corresponding to the execution code.
Optionally, the step of inputting the programming file into a virtual machine, so that the virtual machine decompiles the programming file to obtain an execution code, runs the execution code, and displays a programming result corresponding to the execution code includes:
inputting the programming file into a virtual machine to allow the virtual machine to decompile the programming file to obtain an execution code, and determining whether the execution code is correct;
and if the result is correct, the execution code is operated, and a programming result corresponding to the execution code is displayed.
Optionally, after the step of inputting the programming file into a virtual machine for the virtual machine to decompile the programming file to obtain an execution code, and determining whether the execution code is correct, the programming method further includes:
if the error exists, determining an error code existing in the execution code, and determining a target graphic module corresponding to the error code in the graphic module;
and marking the target graphic module in the programming area, and outputting a corresponding error prompt.
Optionally, before the step of converting the programming function and the execution logic into programming data in a preset format according to an agreed rule and creating a programming file corresponding to the programming data, the logic parameter includes a dragging sequence of the graphics module in the programming area, the programming method further includes:
when the operation instruction is detected, determining a programming function corresponding to the graphics module based on the mark of the graphics module, and determining the execution logic of the programming function based on the dragging sequence.
Further, to achieve the above object, the present invention also provides a programming apparatus including:
the creating module is used for creating an editing interface corresponding to the creating instruction when the creating instruction is detected, and the editing interface comprises a graphic module area and a programming area;
the determining module is used for determining a graphic module corresponding to a dragging instruction and determining the logic parameter of the graphic module in the programming area if the dragging instruction is detected in the graphic module area;
and the display module is used for determining the programming function corresponding to the graphic module when the operation instruction is detected, and displaying the corresponding programming result based on the programming function and the logic parameter.
Furthermore, to achieve the above object, the present invention also provides a programming device, which includes a processor, a memory, and a programming program stored on the memory and executable by the processor, wherein the programming program, when executed by the processor, implements the steps of the programming method as described above.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium having a programming program stored thereon, wherein the programming program, when executed by a processor, implements the steps of the programming method as described above.
The invention provides a programming method, when a creating instruction is detected, an editing interface corresponding to the creating instruction is created, wherein the editing interface comprises a graphic module area and a programming area; if a dragging instruction is detected in the graphic module area, determining a graphic module corresponding to the dragging instruction, and determining logic parameters of the graphic module in the programming area; and when the operation instruction is detected, determining a programming function corresponding to the graphic module, and displaying a corresponding programming result based on the programming function and the logic parameter. The invention replaces codes by the graphic module, simplifies the programming process, reduces the workload of programmers and realizes simple programming.
Drawings
Fig. 1 is a schematic hardware configuration diagram of a programming device according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a programming method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a programming method according to a second embodiment of the present invention;
FIG. 4 is a functional block diagram of a programming apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The programming method related to the embodiment of the invention is mainly applied to programming equipment, and the programming equipment can be equipment with display and processing functions, such as a PC (personal computer), a portable computer, a mobile terminal and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a programming device according to an embodiment of the present invention. In an embodiment of the present invention, the programming device may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the programming device, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005 of fig. 1, which is one type of computer-readable storage medium, may include an operating system, a network communication module, and a programming program.
In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; and the processor 1001 may call the programming program stored in the memory 1005 and perform the programming method provided by the embodiment of the present invention.
The embodiment of the invention provides a programming method.
Referring to fig. 2, fig. 2 is a flowchart illustrating a programming method according to a first embodiment of the present invention.
In this embodiment, the programming method includes the steps of:
step S10, when a creating instruction is detected, creating an editing interface corresponding to the creating instruction, wherein the editing interface comprises a graphic module area and a programming area;
step S20, if a dragging instruction is detected in the graphic module area, determining the graphic module corresponding to the dragging instruction, and determining the logic parameter of the graphic module in the programming area;
step S30, when the operation instruction is detected, determining a programming function corresponding to the graphics module, and displaying a corresponding programming result based on the programming function and the logic parameter.
In the embodiment, the graphic module and the corresponding logic parameter replace actual codes and execution logic, and the corresponding programming function can be called to realize the corresponding programming effect only by detecting whether the graphic module is dragged and determining the logic parameter of the graphic module in the programming area.
The respective steps will be described in detail below:
step S10, when a creating instruction is detected, creating an editing interface corresponding to the creating instruction, wherein the editing interface comprises a graphic module area and a programming area.
In this embodiment, the programming method is applied to a programming device, where the programming device may be a terminal such as a computer, or a mobile terminal such as an iPad or a mobile phone, and the programming device stores a programming program for implementing a programming function, that is, the programming device is installed with programming software required by programming, and implements the programming method by using the programming program.
In this embodiment, when the programming device detects a creation instruction, an editing interface corresponding to the current creation instruction is created on the display interface, where the editing interface includes a graphic module area and a programming area.
In specific implementation, the programming device is provided with corresponding programming software, a user opens a display interface of the programming software by clicking an icon of the programming software, and issues a creation instruction on the basis of the display interface, the specific creation instruction can be a voice instruction, such as a voice including 'creating the programming interface', or a physical creation button or a virtual creation button reserved for the programming device, the user can trigger the creation instruction by only pressing or clicking the creation button, and when the programming device detects the triggered creation instruction, a corresponding editing interface is created on the display interface.
It should be noted that various different graphic modules are stored in the graphic module area in advance, and are displayed in the graphic module area in the form of icons, and a user can drag corresponding icons to the editing area, and different graphic modules are attached with different programming marks, and the programming marks correspond to the programming functions one to one.
Further, in specific implementation, the programming software of the programming device includes a plurality of programming versions to adapt to users with different requirements, so that before the editing interface is created, if the programming device detects a version switching instruction, the current display interface is switched to the display interface corresponding to the version switching instruction, then whether a creation instruction exists on the display interface is detected, and if the creation instruction exists, the editing interface is created. Wherein the programming versions include a low-level version and a high-level version, the low-level version being suitable for children aged 5-16 years and the high-level version being suitable for adults.
Further, step S10 includes:
step a, when a creating instruction is detected, acquiring the identity of a current user, and determining a programming version corresponding to the identity;
and b, displaying a display interface corresponding to the programming version, and creating an editing interface corresponding to the creation instruction in the display interface.
In this step, when the programming device detects a creation instruction, the identity of the current user is obtained first, and a programming version corresponding to the current identity is determined, that is, when the programming device detects the creation instruction, the programming device includes a plurality of programming versions, such as a low programming version corresponding to children, a high programming version corresponding to adults, and the like, the corresponding programming version is opened by obtaining the identity of the current user, and a corresponding editing interface is created on a display interface corresponding to the programming version to adapt to users with different requirements, wherein a specific method for obtaining the identity of the current user may be that when the programming device detects the creation instruction, a camera of the programming device is opened, face information of the current user is acquired by the camera, the identity of the user is determined by recognizing the face information, such as by face recognition, the age of the current user is determined, thereby determining whether the current user is a child or an adult, wherein the boundary between the child and the adult is 16 years old.
In this step, the programming versions are switched without manual switching, and the programming device automatically displays the display interfaces corresponding to the different programming versions according to different identities of users.
Step S20, if a dragging instruction is detected in the graphics module area, determining a graphics module corresponding to the dragging instruction, and determining a logic parameter of the graphics module in the programming area.
In this embodiment, after the editing interface is displayed, a user may perform an operation on the editing interface, specifically, drag a graphic module in the graphic module area into the programming area, that is, if the programming device detects a drag instruction in the graphic area, determine which graphic module the user drags, and determine where the graphic module is dragged by the user in the programming area, thereby determining a logical parameter of the graphic module in the programming area, where the logical parameter is an execution logic for executing a programming function, and if there are an a graphic module and a B graphic module in the programming area, it is necessary to determine whether to execute the a graphic module first or execute the B graphic module first when subsequently executing the programming function.
In specific implementation, the operation logic of the programming region is operated from top to bottom, that is, the execution logic of the programming function is from top to bottom, the graphic module with the relative position located above is executed first, and then the graphic module with the relative position located below is executed, so that when the graphic module corresponding to the dragging instruction is determined, the logic parameter corresponding to the dragging instruction, such as the dragging position, needs to be determined.
Step S30, when the operation instruction is detected, determining a programming function corresponding to the graphics module, and displaying a corresponding programming result based on the programming function and the logic parameter.
In this embodiment, when the programming device detects the operation instruction, that is, the user has completed dragging the graphic module, at this time, the programming device determines the programming function corresponding to the graphic module, and displays the corresponding programming result according to the programming function and the previously determined logic parameter.
Specifically, when the programming device detects an operation instruction, the corresponding programming function is determined in the background according to the graphic module on the editing interface, that is, in this step, the graphic module corresponds to the programming function one to one, and specifically, the corresponding programming function can be determined according to the mark of the graphic module, if the current graphic module is a For module, the corresponding programming function is a For loop function, and the logic parameter is the execution sequence of the function, finally, the execution result corresponding to the programming function is displayed on the console, where the console is located below the editing interface, that is, the editing interface is composed of a graphic module area, a programming area and a console, and in the specific implementation, the graphic module area is located on the left side of the editing interface, the console is located below the editing interface, and the remaining area is the programming area.
Further, the logic parameter includes a drag position of the graphic module in the programming area, and the step S30 includes:
c, when an operation instruction is detected, determining a programming function corresponding to the graphic module based on the mark of the graphic module, and determining an execution logic of the programming function based on the dragging position;
step d, converting the programming function and the execution logic into programming data in a preset format according to an agreed rule, and creating a programming file corresponding to the programming data;
and e, inputting the programming file into a virtual machine to enable the virtual machine to decompile the programming file to obtain an execution code, running the execution code, and displaying a programming result corresponding to the execution code.
When an operation instruction is detected, namely a user drags a graphic module which the user wants, and after dragging is completed, the user clicks to operate, the programming equipment determines a mark of the graphic module in a current editing interface, determines a programming function corresponding to the graphic module according to the mark and an execution logic corresponding to a dragging position of the graphic module, converts the programming function and the execution logic into programming data in a preset format, specifically data in a json format, and creates a programming file corresponding to the programming data, namely converts the programming function and the execution logic into a json data packet, wherein the convention rule is a rule in which a front end and a background agree in advance, for example, a front end 1 equals to a background east, a front end 2 equals to a background west, and the like, when the front end input is detected to be '1' and '2', the background can convert the front end and the background into 'east', and then, creating a programming file corresponding to the programming data, aiming at inputting the programming file into a virtual machine, wherein in the concrete implementation, the virtual machine is a Java virtual machine of the computer, and the Java virtual machine can reversely compile the programming file into an execution code which can be recognized by the computer, so that the programming equipment executes corresponding actions according to the execution code.
Further, the logic parameter includes a dragging sequence of the graphic module in the programming area, and before step d, the programming method further includes:
and f, when an operation instruction is detected, determining a programming function corresponding to the graphic module based on the mark of the graphic module, and determining the execution logic of the programming function based on the dragging sequence.
In this step, the logic parameter may further include a dragging order of the graphics module in the programming area, and thus, when determining the execution logic of the programming function, the dragging order is determined according to the dragging order of the graphics module, and if the a graphics module is dragged first and the B graphics module is dragged later, regardless of the dragging position of the A, B graphics module in the programming area, the programming function corresponding to the a graphics module is executed first and the programming function corresponding to the B graphics module is executed later.
The embodiment provides a programming method, wherein when a creating instruction is detected, an editing interface corresponding to the creating instruction is created, and the editing interface comprises a graphic module area and a programming area; if a dragging instruction based on the graphic module area is detected, determining a graphic module corresponding to the dragging instruction, and determining a logic parameter of the graphic module in the programming area; and when the operation instruction is detected, determining a programming function corresponding to the graphic module, and displaying a corresponding programming result based on the programming function and the logic parameter. The invention replaces codes by the graphic module, simplifies the programming process, reduces the workload of programmers and realizes simple programming.
Further, a second embodiment of the programming method of the invention is proposed based on the first embodiment. The second embodiment of the programming method is different from the first embodiment of the programming method in that, referring to fig. 3, before step S30, the programming method further includes:
step S31, when the dragging instruction is detected to be completed, displaying a parameter input interface of the graphic module, and receiving inlet data and outlet data input based on the parameter input interface;
step S30 includes:
step S32, when an operation instruction is detected, determining a corresponding programming function based on the entry data and the exit data, and displaying a corresponding programming result based on the programming function and the logic parameter.
In this embodiment, the graphic module is a blank module, that is, does not include any programming function or a mark associated with the programming function, and the user needs to input related entry data and exit data by himself, that is, the graphic module can be edited, thereby improving the flexibility of the programming device.
The respective steps will be described in detail below:
and step S31, when the dragging instruction is detected to be completed, displaying a parameter input interface of the graphic module, and receiving the input data and the output data based on the parameter input interface.
In this embodiment, the graphics module is a blank module, and a user needs to input entry data and exit data of the graphics module, where the entry data is a parameter that needs to be used when the graphics module implements a certain service; and the export data is an object for returning a result and receiving the result after the graphics module finishes processing the service.
That is, in this step, it is necessary for the user to have a certain professional ability, that is, this step corresponds to the programming of the advanced version, the user can edit the graphic module using his own professional ability, and in the specific implementation, when it is detected that the user drags the graphic module to the programming area, the parameter input interface of the current graphic module is displayed, and the entry data and the exit data input by the user on the parameter input interface are received.
Step S32, when an operation instruction is detected, determining a corresponding programming function based on the entry data and the exit data, and displaying a corresponding programming result based on the programming function and the logic parameter.
In this embodiment, when the programming device detects an operation instruction, it determines a corresponding programming function according to the entry data and the exit data of the graphics module, and displays a corresponding programming result according to the programming function and the logic parameter.
In specific implementation, a programming device displays programming problems, similar to passing, a user creates an editing interface according to the programming problems and drags a corresponding graphic module in the editing interface, wherein the graphic module is a blank module, the user needs to input corresponding parameter values, namely, entry data and exit data, in the blank module, a background of the programming device determines a programming function and corresponding execution logic according to the graphic module on the editing interface and logic parameters (dragging sequence or dragging position and the like) of the graphic module, converts the programming function and the execution logic into json format data, creates a corresponding json file based on the json format data, inputs the json file into a Java virtual machine for the Java virtual machine to decompile the json file to obtain computer execution codes and execute the json file to obtain a corresponding programming result, and displays the json a console, the data converted into json format is converted by using the rule agreed in advance, and is not described in detail herein.
The graphic module of this embodiment is a blank module, and the user is required to input the relevant entry data and exit data by himself, that is, the graphic module can be edited, and the execution logic is still determined according to the logic parameters, thereby improving the flexibility of the programming device.
Further, a third embodiment of the programming method of the present invention is provided based on the first and second embodiments. The third embodiment of the programming method differs from the first and second embodiments of the programming method in that the programming method further comprises:
step g, inputting the programming file into a virtual machine to allow the virtual machine to decompile the programming file to obtain an execution code, and determining whether the execution code is correct;
step h, if the result is correct, the execution code is operated, and a programming result corresponding to the execution code is displayed;
step i, if the error exists, determining an error code existing in the execution code, and determining a target graphic module corresponding to the error code in the graphic module;
and j, marking the target graphic module in the programming area, and outputting a corresponding error prompt.
In order to ensure that the programming result is correct, the executable code needs to be verified before being displayed, if the executable code is correct, the executable code can normally run to obtain a correct programming result, and if the executable code is wrong, the reason for the mistake is picked up so that a user can correct the mistake.
The respective steps will be described in detail below:
step g, inputting the programming file into a virtual machine, so that the virtual machine can decompile the programming file to obtain an execution code, and determining whether the execution code is correct.
In this embodiment, the programming device inputs the programming file into the virtual machine, so that the virtual machine decompiles the programming file after receiving the programming file, thereby obtaining an execution code that can be recognized by the computer.
Specifically, the execution code obtained by decompiling the virtual machine is verified according to the code specification, when the execution code is specifically implemented, the code specification is a Java code specification and is a uniform specification in the industry, and the programming equipment checks whether the execution code is wrong according to the Java code specification.
And h, if the result is correct, operating the execution code and displaying a programming result corresponding to the execution code.
If the program is correct, namely the executed code does not have an unreasonable or BUG (BUG) place, the executed code is operated, a programming result corresponding to the executed code is displayed, namely the logic of the executed code is operated, so that the programming result is obtained, and finally the programming result is displayed on a display interface.
And i, if the error exists, determining an error code existing in the execution code, and determining a target graphic module corresponding to the error code in the graphic module.
And if the error exists, namely the execution code is unreasonable or the BUG exists, determining the error code existing in the execution code, and determining a target graphic module corresponding to the error code in the graphic module. In implementation, when the execution code is determined to have an error, the number of lines where the error code is located is determined, so that which graphics module in the editing area has the error is reversely deduced.
And j, marking the target graphic module in the programming area, and outputting a corresponding error prompt.
After determining which graphic module, namely the target graphic module, has made an error, marking the erroneous target graphic module in the programming area, and outputting a corresponding error prompt for the user to correct, wherein in the specific implementation, the user's correction mode may be to drag a new graphic module in the graphic module area to replace the current erroneous target graphic module, or to edit and modify the current erroneous target graphic module, specifically issuing an editing instruction, and the programming device displays a parameter input interface on the target graphic module after receiving the editing instruction, so as to allow the user to edit and modify the current erroneous target graphic module.
In order to ensure that the programming result is correct, the executable code needs to be verified before being displayed, if the executable code is correct, the executable code can normally run to obtain the correct programming result, and if the executable code is wrong, the reason for the mistake is picked up so that a user can correct the result, so that the flexibility of programming equipment is improved while the operation requirement is reduced.
It should be noted that the programming device can perform multi-version switching to adapt to users with different requirements, and in the process of programming, function codes corresponding to motion characteristics or display characteristics of the robot do not need to be packaged into a graphic module, but an association relationship is established between the function codes and marks of the graphic module, and a user can determine the corresponding function codes only by dragging the graphic module on an editing interface and using a background, and the graphic module can be edited, and finally a programming result is obtained by decompiling through a virtual machine, and is visualized in error.
In addition, the embodiment of the invention also provides a programming device.
Referring to fig. 4, fig. 4 is a functional block diagram of a programming apparatus according to a first embodiment of the invention.
In this embodiment, the programming apparatus includes:
the creating module 10 is configured to create, when a creating instruction is detected, an editing interface corresponding to the creating instruction, where the editing interface includes a graphic module area and a programming area;
a determining module 20, configured to determine, if a dragging instruction is detected in the graphics module area, a graphics module corresponding to the dragging instruction, and determine a logic parameter of the graphics module in the programming area;
and the display module 30 is configured to determine a programming function corresponding to the graphics module when the operation instruction is detected, and display a corresponding programming result based on the programming function and the logic parameter.
Further, the creating module 10 is further configured to:
when a creating instruction is detected, acquiring the identity of a current user, and determining a programming version corresponding to the identity;
and displaying a display interface corresponding to the programming version, and creating an editing interface corresponding to the creation instruction in the display interface.
Further, the programming device further comprises a receiving module, wherein the receiving module is configured to:
when the dragging instruction is detected to be completed, displaying a parameter input interface of the graphic module, and receiving inlet data and outlet data input based on the parameter input interface;
the display module 30 is further configured to:
when an operating instruction is detected, a corresponding programming function is determined based on the entry data and the exit data, and a corresponding programming result is displayed based on the programming function and the logic parameter.
Further, the logic parameter includes a drag position of the graphic module in the programming area, and the display module 30 is further configured to:
when an operation instruction is detected, determining a programming function corresponding to the graphic module based on the mark of the graphic module, and determining an execution logic of the programming function based on the dragging position;
converting the programming function and the execution logic into programming data in a preset format according to an agreed rule, and creating a programming file corresponding to the programming data;
and inputting the programming file into a virtual machine to enable the virtual machine to decompile the programming file to obtain an execution code, running the execution code, and displaying a programming result corresponding to the execution code.
Further, the display module 30 is further configured to:
inputting the programming file into a virtual machine to allow the virtual machine to decompile the programming file to obtain an execution code, and determining whether the execution code is correct;
and if the result is correct, the execution code is operated, and a programming result corresponding to the execution code is displayed.
Further, the display module 30 is further configured to:
if the error exists, determining an error code existing in the execution code, and determining a target graphic module corresponding to the error code in the graphic module;
and marking the target graphic module in the programming area, and outputting a corresponding error prompt.
Further, the logic parameter includes a dragging sequence of the graphic module in the programming area, and the display module 30 is further configured to:
when the operation instruction is detected, determining a programming function corresponding to the graphics module based on the mark of the graphics module, and determining the execution logic of the programming function based on the dragging sequence.
Each module and unit in the programming apparatus correspond to each step in the programming method embodiment, and the functions and implementation processes thereof are not described in detail herein.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer-readable storage medium of the present invention has a programming program stored thereon, wherein the programming program, when executed by a processor, implements the steps of the programming method as described above.
The method implemented when the programming program is executed may refer to various embodiments of the programming method of the present invention, and details thereof are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A programming method, comprising the steps of:
when a creating instruction is detected, creating an editing interface corresponding to the creating instruction, wherein the editing interface comprises a graphic module area and a programming area;
if a dragging instruction is detected in the graphic module area, determining a graphic module corresponding to the dragging instruction, and determining logic parameters of the graphic module in the programming area;
and when the operation instruction is detected, determining a programming function corresponding to the graphic module, and displaying a corresponding programming result based on the programming function and the logic parameter.
2. The programming method according to claim 1, wherein when a creation instruction is detected, the step of creating an editing interface corresponding to the creation instruction includes:
when a creating instruction is detected, acquiring the identity of a current user, and determining a programming version corresponding to the identity;
and displaying a display interface corresponding to the programming version, and creating an editing interface corresponding to the creation instruction in the display interface.
3. The programming method of claim 1, wherein prior to the step of determining a programming function corresponding to the graphics module upon detection of the run instruction and displaying a corresponding programming result based on the programming function and the logic parameter, the programming method further comprises:
and when the dragging instruction is detected to be completed, displaying a parameter input interface of the graphic module, and receiving inlet data and outlet data input based on the parameter input interface.
When the operation instruction is detected, the step of determining the programming function corresponding to the graphic module and displaying the corresponding programming result based on the programming function and the logic parameter comprises the following steps:
when an operating instruction is detected, a corresponding programming function is determined based on the entry data and the exit data, and a corresponding programming result is displayed based on the programming function and the logic parameter.
4. The programming method according to any one of claims 1 to 3, wherein the logic parameter includes a drag position of the graphic module in the programming area, and the step of determining a corresponding programming function of the graphic module upon detection of the execution instruction and displaying a corresponding programming result based on the programming function and the logic parameter includes:
when an operation instruction is detected, determining a programming function corresponding to the graphic module based on the mark of the graphic module, and determining an execution logic of the programming function based on the dragging position;
converting the programming function and the execution logic into programming data in a preset format according to an agreed rule, and creating a programming file corresponding to the programming data;
and inputting the programming file into a virtual machine to enable the virtual machine to decompile the programming file to obtain an execution code, running the execution code, and displaying a programming result corresponding to the execution code.
5. The programming method according to claim 4, wherein the step of inputting the programming file into the virtual machine for the virtual machine to decompile the programming file to obtain an execution code, running the execution code, and displaying a programming result corresponding to the execution code comprises:
inputting the programming file into a virtual machine to allow the virtual machine to decompile the programming file to obtain an execution code, and determining whether the execution code is correct;
and if the result is correct, the execution code is operated, and a programming result corresponding to the execution code is displayed.
6. The programming method of claim 5, wherein after the step of inputting the programming file into a virtual machine for the virtual machine to decompile the programming file, obtain an execution code, and determine whether the execution code is correct, the programming method further comprises:
if the error exists, determining an error code existing in the execution code, and determining a target graphic module corresponding to the error code in the graphic module;
and marking the target graphic module in the programming area, and outputting a corresponding error prompt.
7. The programming method according to claim 4, wherein before the steps of referring the logic to the dragging sequence of the graphic module in the programming area, converting the programming function and the execution logic into the programming data in the preset format according to the convention rule, and creating the programming file corresponding to the programming data, the programming method further comprises:
when the operation instruction is detected, determining a programming function corresponding to the graphics module based on the mark of the graphics module, and determining the execution logic of the programming function based on the dragging sequence.
8. A programming apparatus, comprising:
the creating module is used for creating an editing interface corresponding to the creating instruction when the creating instruction is detected, and the editing interface comprises a graphic module area and a programming area;
the determining module is used for determining a graphic module corresponding to a dragging instruction and determining the logic parameter of the graphic module in the programming area if the dragging instruction is detected in the graphic module area;
and the display module is used for determining the programming function corresponding to the graphic module when the operation instruction is detected, and displaying the corresponding programming result based on the programming function and the logic parameter.
9. A programming device, characterized in that the programming device comprises a processor, a memory, and a programming program stored on the memory and executable by the processor, wherein the programming program, when executed by the processor, implements the steps of the programming method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having a programming program stored thereon, wherein the programming program, when executed by a processor, implements the steps of the programming method of any one of claims 1 to 7.
CN201911373360.5A 2019-12-26 2019-12-26 Programming method, device, equipment and computer readable storage medium Withdrawn CN111198686A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911373360.5A CN111198686A (en) 2019-12-26 2019-12-26 Programming method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911373360.5A CN111198686A (en) 2019-12-26 2019-12-26 Programming method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111198686A true CN111198686A (en) 2020-05-26

Family

ID=70747128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911373360.5A Withdrawn CN111198686A (en) 2019-12-26 2019-12-26 Programming method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111198686A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238757A (en) * 2021-04-10 2021-08-10 北京猿力未来科技有限公司 Method and device for identifying programming instruction
CN113254008A (en) * 2021-06-21 2021-08-13 腾讯科技(深圳)有限公司 Data processing method, device and equipment
CN114029931A (en) * 2021-11-12 2022-02-11 珠海格力电器股份有限公司 Robot programming control method and device and robot system
CN114265586A (en) * 2021-12-09 2022-04-01 深圳模德宝科技有限公司 Automatic cutting programming method and device and computer readable storage medium
CN115061670A (en) * 2022-06-10 2022-09-16 广州速胜科技服务有限公司 Method for module matching in program editing operation
US20230121281A1 (en) * 2021-10-20 2023-04-20 Faurecia Aptoide Automotive, Lda Method and device for automatically detecting potential failures in mobile applications
WO2024041081A1 (en) * 2022-08-22 2024-02-29 腾讯科技(深圳)有限公司 Data processing method, apparatus and device, and readable storage medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238757A (en) * 2021-04-10 2021-08-10 北京猿力未来科技有限公司 Method and device for identifying programming instruction
CN113238757B (en) * 2021-04-10 2023-10-31 北京猿力未来科技有限公司 Method and device for identifying programming instruction
CN113254008A (en) * 2021-06-21 2021-08-13 腾讯科技(深圳)有限公司 Data processing method, device and equipment
CN113254008B (en) * 2021-06-21 2024-04-19 腾讯科技(深圳)有限公司 Data processing method, device and equipment
US20230121281A1 (en) * 2021-10-20 2023-04-20 Faurecia Aptoide Automotive, Lda Method and device for automatically detecting potential failures in mobile applications
US11940870B2 (en) * 2021-10-20 2024-03-26 Faurecia Aptoide Automotive, Lda Method and device for automatically detecting potential failures in mobile applications
CN114029931A (en) * 2021-11-12 2022-02-11 珠海格力电器股份有限公司 Robot programming control method and device and robot system
CN114029931B (en) * 2021-11-12 2024-01-16 珠海格力电器股份有限公司 Robot programming control method and device and robot system
CN114265586A (en) * 2021-12-09 2022-04-01 深圳模德宝科技有限公司 Automatic cutting programming method and device and computer readable storage medium
CN114265586B (en) * 2021-12-09 2023-12-05 深圳模德宝科技有限公司 Automatic programming method and device for cutting and computer readable storage medium
CN115061670A (en) * 2022-06-10 2022-09-16 广州速胜科技服务有限公司 Method for module matching in program editing operation
WO2024041081A1 (en) * 2022-08-22 2024-02-29 腾讯科技(深圳)有限公司 Data processing method, apparatus and device, and readable storage medium

Similar Documents

Publication Publication Date Title
CN111198686A (en) Programming method, device, equipment and computer readable storage medium
CN104007958B (en) Program editor and method for creating and processing the program for industrial automation arrangement
GB2513431A (en) Method for creating a label
CN111080170A (en) Workflow modeling method and device, electronic equipment and storage medium
CN112306481A (en) Code display method, system, device and storage medium for graphical programming scene
CN112699362A (en) Login verification method and device, electronic equipment and computer readable storage medium
JP2024506044A (en) Visual software development system, method, apparatus and computer storage medium
CN105808257B (en) Application popup identification method and device
WO2020150899A1 (en) Voice control method, voice control apparatus, and computer-executable non-volatile storage medium
CN112799656B (en) Script file configuration method, device, equipment and storage medium for automation operation
CN109550232A (en) Touch control device and its response method, device
US20050102327A1 (en) Data file processor, data file processing method and program
CN111158842A (en) Operation flow detection method, device and storage medium
CN115469849B (en) Service processing system, method, electronic equipment and storage medium
CN115359793A (en) Vehicle-mounted voice interaction method and device and vehicle
CN111240658A (en) Console implementation method and terminal based on Unity engine
CN106126056B (en) PowerPoint-based slide automatic creation method and device
US20170228207A1 (en) System and method for providing visual feedback related to cross device gestures
CN109582312B (en) UI layer and logic layer separation method of intelligent POS
CN113807698A (en) Work order generation method and device, electronic equipment and readable storage medium
JP5657183B2 (en) Method and apparatus for enabling a first computer program to execute application logic of a second computer program, for interfacing the first computer program and the second computer program And apparatus for generating computer program code for the same, a computer program, and a software interface for enabling a first computer program to execute application logic of a second computer program For providing information (computer program interface)
TWI625636B (en) Control system and method having visual programming capabilities and computer program product having visual control program
CN113791881B (en) Periodic task processing method, system and medium
CN111324213A (en) Information input method of terminal and terminal
CN113568609B (en) UI style editing method based on Qss style sheet

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200526