CN108874383A - Graphical programming method and programing system - Google Patents
Graphical programming method and programing system Download PDFInfo
- Publication number
- CN108874383A CN108874383A CN201810528771.6A CN201810528771A CN108874383A CN 108874383 A CN108874383 A CN 108874383A CN 201810528771 A CN201810528771 A CN 201810528771A CN 108874383 A CN108874383 A CN 108874383A
- Authority
- CN
- China
- Prior art keywords
- programming
- card
- default
- code
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012544 monitoring process Methods 0.000 claims description 14
- 239000000463 material Substances 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 7
- 230000008859 change Effects 0.000 claims description 2
- 230000009471 action Effects 0.000 description 27
- 230000006870 function Effects 0.000 description 18
- 238000012163 sequencing technique Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 235000013399 edible fruits Nutrition 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000012546 transfer Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 241001062009 Indigofera Species 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000004040 coloring Methods 0.000 description 2
- 239000010979 ruby Substances 0.000 description 2
- 229910001750 ruby Inorganic materials 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
This application discloses a kind of graphical programming method and programing systems.The graphical programming method and programing system include the programming card determine instruction for receiving the first user, wherein the programming card determine instruction, which is used to be used as, shows programming content by patterned mode;Judge whether the programming card determine instruction meets default programming grammar rule;If the programming card determine instruction meets the default programming grammar rule, the programming card determine instruction is converted into default programming code, and execute the default programming code.That present application addresses programming languages is cumbersome, is not easy to be grasped by user, the advanced technical problem to conventional programming language difficulty.
Description
Technical field
This application involves programming technique fields, in particular to a kind of graphical programming method and programing system.
Background technique
With the development of modern science and technology, people are at one's side throughout various calculating equipment.From computer, hold
Equipment is all to calculate equipment to various household electrical appliance and various wearable devices and implanted equipment.These calculate equipment
Children are affected, they play game by miscellaneous calculating equipment, browsing webpage, receive and send messages, learning knowledge, and calculating is set
Standby life and the mode of learning for changing children.The computing capability for cultivating children, has become education and social hotspots,
And writing program is to cultivate the most direct mode of children's computing capability.The characteristics of for children, needs to improve existing programming language
And programming mode.
Traditional programming language is realized usually in such a way that keyboard inputs text.Because of traditional programming language speech
Method and sentence are all very complicated, and need to do a large amount of text input work, so traditional programming language and programming mode
It is extremely complex for beginner, especially children, cause beginner to understand and using difficult.And the core objective programmed is solution
Certainly practical problem, the significant capability of programming are the mode of thinking and realization logic;But in conventional programming language, this part is covered
Under complicated grammer and cumbersome input.Since children want to weaker the grasp of text, it is difficult to editor and understanding tradition text
This program code causes children to be difficult to write program using traditional programming language and programming mode.
Graphical programming language provides a kind of feasible way of programming to children.Graphical programming language is by various program statements
The various figures being converted on screen complete the whole process of programming by dragging and organizing figure.Graphical programming can be compiled
Virtual program is write, other embedding assembly equipment, such as robot etc. can also be controlled by peripheral expansion.
Material object programming is interacted by technologies such as tactile, phy-awares with material object, then converts programmed logic for logic in kind.
By different material object combinations, the virtual scene in computer is controlled;Or directly form the physical logic in kind connected.
What graphical programming and programming in kind were designed and developed both for the characteristics of children, but there are some disadvantages and not
Foot:1, lack the control vector for causing interest of children.In general, graphical programming and programming in kind are all more suitable control virtually
Object, such as game, animation and the preset study scene of various computers, and controllable robot and reality scene are to children
Attraction it is stronger;2, graphical programming language more simplifies than traditional programming language, but if for controlling external equipment, example
When such as controlling robot, it is desired nonetheless to many and diverse sentence and logic;3, programming in kind and graphical programming generally can not be accomplished and pass
Programming language of uniting is corresponding, causes to need to understand programmed environment again when children are advanced.
It is cumbersome for programming language in the related technology, be not easy to be grasped by user, be advanced difficult to conventional programming language
Problem, currently no effective solution has been proposed.
Summary of the invention
The main purpose of the application is to provide a kind of graphical programming method and programing system, to solve existing programming language
It is cumbersome, be not easy by user grasp, the advanced problem to conventional programming language difficulty.
To achieve the goals above, according to the one aspect of the application, a kind of graphical programming method is provided.
Include according to the graphical programming method of the application:Receive the programming card determine instruction of the first user, wherein described
Programming card determine instruction, which is used to be used as, shows programming content by patterned mode;Judge the programming card determine instruction
Whether default programming grammar rule is met;If the programming card determine instruction meets the default programming grammar rule,
The programming card determine instruction is converted into default programming code, and executes the default programming code;It monitors described default
The implementing result of programming code.
Further, the programming card determine instruction for receiving the first user includes:Obtain the first user selection
Programming card sequence;The programming card determine instruction is obtained according to the programming card sequence.
Further, include before the programming card determine instruction for receiving the first user:The volume of default different function
Journey card, the programming card include electronic card and dummy program card in kind;Establish the programming card and corresponding function
Programming code between mapping relations.
Further, described to judge whether the programming card determine instruction meets default programming grammar rule and include:Sentence
Whether the collating sequence of the electronic card in kind of breaking meets the default programming card ordering rule;If the programming
Card determine instruction meets the default programming grammar rule, then the programming card determine instruction is converted to default programming generation
Code, and execute the default programming code and include:If the collating sequence of the material object electronic card meets the default programming
Card ordering rule then generates programming code corresponding with the programming card sequence;The programming code is parsed, acquisition can be held
Line program is simultaneously run.
Further, described to judge whether the programming card determine instruction meets default programming grammar rule and include:It is logical
It crosses computer and judges whether the collating sequence of the dummy program card meets the default programming card ordering rule;It is described such as
Programming card determine instruction described in fruit meets the default programming grammar rule, then is converted to the programming card determine instruction
Default programming code, and execute the default programming code and include:If the collating sequence of the dummy program card meets institute
Default programming card ordering rule is stated, then the computer generates programming code corresponding with the programming card sequence;It is described
Computer parses the programming code, obtains executable program and uploads;Receiving the described of computer upload can
It executes program and runs.
Further, the implementing result of the monitoring default programming code includes:Obtain holding for the default programming code
Row result;Obtain the pre-execution result of the programming card determine instruction;Compare the implementing result of the default programming code with
Whether the pre-execution result of the programming card determine instruction is consistent;If the implementing result of the default programming code with it is described
The pre-execution result for programming card determine instruction is inconsistent, then sends prompt information.
To achieve the goals above, according to the another aspect of the application, a kind of graphical programming system is provided.
Include according to the graphical programming system of the application:Instruction receiving unit, grammer judging unit, instruction execution unit and
As a result monitoring unit, described instruction receiving unit, for receiving the programming card determine instruction of the first user, wherein the volume
Journey card determine instruction, which is used to be used as, shows programming content by patterned mode;The grammer judging unit, for judging
Whether the programming card determine instruction meets default programming grammar rule;Described instruction execution unit, if being used for the volume
Journey card determine instruction meets the default programming grammar rule, then the programming card determine instruction is converted to default programming
Code, and execute the default programming code.The result monitoring unit, for monitoring the execution knot of the default programming code
Fruit.
Further, the grammer judging unit includes:First grammer judgment module, the first grammer judgment module are used
Whether meet the default programming card ordering rule in the collating sequence for judging the electronic card in kind;Described instruction executes
Unit includes:First code generation module and parsing operation module, if the first code generation module is used for the material object
The collating sequence of electronic card meets the default programming card ordering rule, then generates corresponding with the programming card sequence
Programming code;The parsing operation module is for parsing the programming code, obtaining executable program and running.
Further, the grammer judging unit includes:Second grammer judgment module, the second grammer judgment module are used
In judging whether the collating sequence of the dummy program card meets the default programming card ordering rule by computer;Institute
Stating instruction execution unit includes:Second code generation module, parsing uploading module and reception operation module, the second code are raw
If the collating sequence at module for the dummy program card meets the default programming card ordering rule, the meter
Calculation machine generates programming code corresponding with the programming card sequence;The parsing uploading module is for the computer to described
Programming code is parsed, and is obtained executable program and is uploaded;The reception operation module is uploaded for receiving the computer
The executable program and run.
Further, the result monitoring unit includes:Implementing result obtains module, pre-execution result obtains module, ratio
Compared with module and prompt information sending module, the implementing result obtains the execution knot that module is used to obtain the default programming code
Fruit;The pre-execution result obtains the pre-execution result that module is used to obtain the programming card determine instruction;The relatively mould
Block for the default programming code implementing result and it is described programming card determine instruction pre-execution result whether one
It causes;If implementing result of the prompt information sending module for the default programming code refers to programming card determination
The pre-execution result of order is inconsistent, then sends prompt information.
In the embodiment of the present application, two kinds of programming card units of electronic card in kind and dummy program card, root are provided with
The mapping relations between the programming code of corresponding function are established according to different programming card units, syntax parsing unit only needs to program
The graphical information of card unit, and judge whether programming rule meets default programming rule, it can be by execution unit to institute
The program of editor is run, simple and convenient, has achieved the purpose that the complexity of effective simplified programming study, while guaranteeing to make
User can focus onto the understanding of Computation schema, be conducive to the study of logical thinking and the grasp of art of programming,
To realize the technical effect of simplified programming language, person easy to use grasps the advanced of Program Thought and programming language, in turn
Solve programming language is cumbersome, be not easy by user grasp, the advanced technical problem to conventional programming language difficulty.
Detailed description of the invention
The attached drawing constituted part of this application is used to provide further understanding of the present application, so that the application's is other
Feature, objects and advantages become more apparent upon.The illustrative examples attached drawing and its explanation of the application is for explaining the application, not
Constitute the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the flow chart of first embodiment in the application graphical programming method;
Fig. 2 is the flow chart of second embodiment in the application graphical programming method;
Fig. 3 is the flow chart of 3rd embodiment in the application graphical programming method;
Fig. 4 is the schematic diagram of material object electronic card in the application graphical programming method;
Fig. 5 is the schematic diagram of dummy program card in the application graphical programming method;
Fig. 6 is the flow chart of fourth embodiment in the application graphical programming method;
Fig. 7 is the flow chart of the 5th embodiment in the application graphical programming method;
Fig. 8 is the flow chart of sixth embodiment in the application graphical programming method
Fig. 9 is the structural schematic diagram of first embodiment in the application graphical programming system;
Figure 10 is the structural schematic diagram of second embodiment in the application graphical programming system;
Figure 11 is the structural schematic diagram of 3rd embodiment in the application graphical programming system;And
Figure 12 is the structural schematic diagram of fourth embodiment in the application graphical programming system.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only
The embodiment of the application a part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's every other embodiment obtained without making creative work, all should belong to the model of the application protection
It encloses.
It should be noted that the description and claims of this application and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to embodiments herein described herein.In addition, term " includes " and " tool
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing a series of steps or units
Process, method, system, product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include without clear
Other step or units listing to Chu or intrinsic for these process, methods, product or equipment.
In this application, the orientation or positional relationship of the instructions such as term " on ", "lower", "front", "rear" is based on attached drawing institute
The orientation or positional relationship shown.These terms are not intended to limit primarily to better describe the present invention and embodiment
Indicated device, element or component must have particular orientation, or be constructed and operated with particular orientation.
Also, above-mentioned part term is other than it can be used to indicate that orientation or positional relationship, it is also possible to for indicating it
His meaning, such as term " on " also are likely used for indicating certain relations of dependence or connection relationship in some cases.For ability
For the those of ordinary skill of domain, the concrete meaning of these terms in the present invention can be understood as the case may be.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
As shown in Figure 1, this method includes the following steps, namely S101 to step S104:
Step S101:Receive the programming card determine instruction of the first user, wherein the programming card determine instruction is used for
Programming content is showed as by patterned mode;
Specifically, programming card includes variable card, action card and Row control card, letter corresponding to variable card
Breath instruction is that variable information instructs, and information command corresponding to action card is action message instruction, and Row control card is corresponding
Information command be flow control information instruction.The programming card determine instruction may be either the selected single programming of user
The instruction of single piece of information corresponding to card can also be the selected multiple programming cards of user, and form according to sequencing
Sentence information command.
Specifically, the instruction of single piece of information corresponding to single programming card is variable information instruction, action message instruction
With flow control information instruction one of.Wherein variable information instruction includes the digital information instruction of digital " 1 " to " 10 ";
The colouring information instruction of " red ", " Huang ", " indigo plant ", " green ";Wherein action message includes the movement of " moving up ", " moving to right ", " moving to left "
Information command;The action message of " light " instructs;The action message of " sound " instructs;Wherein Row control card information, which instructs, includes
The control information command of " function starts ";The control information command of " function terminates ";The control information command of " circulation starts ";
The control information command of " circulation terminates ".Sentence information is rearranged according to sequencing by instructing several single piece of information
Instruction.
Step S102:Judge whether the programming card determine instruction meets default programming grammar rule;
Specifically, carrying out presetting, the default programming of formation to the sequencing of the corresponding information command arrangement of programming card
Syntax rule.Such as:At the end of programmed statements, if there is the control information command of " circulation starts ", then there must be " circulation knot
The control information command of beam ";The action message instruction of " light ", the action message instruction of " sound " or the control of " circulation starts "
It must be variable information instruction after information command;It must be action message the instruction, " sound of " light " before variable information instruction
The action message of sound " instructs or the control information command of " circulation starts ";Instruction before programmed statements terminate cannot be " lamp
Light ", " sound ", " circulation starts ";Information command before function terminates cannot be the action message instruction of " light ", " sound "
The control information command of action message instruction or " circulation starts ";First information command of programmed statements must be that " function is opened
The control information command of beginning ", the last one information command of programmed statements must be the control information command of " function terminates ";
There must be the control information command of " circulation starts " before the control information command of " circulation terminates ";It is corresponding that programming card is not read
Not including information command in information command or programming card is then mistake.
Step S103:If the programming card determine instruction meets the default programming grammar rule, by the volume
Journey card determine instruction is converted to default programming code, and executes the default programming code;
Specifically, if the sequencing of the corresponding information command arrangement of programming card meets preset volume in step S102
Journey syntax rule judges grammer used by programmed statements then for correct grammer, can will program the corresponding information of card and refer to
Order is converted to executable programming code, which directly can parse and hold for programing system in the application
Capable programming code can also be the mainstream programming code that is parsed by computer, as Java, JavaScript, C/C++,
Python, PHP, Ruby on Rails etc., if being converted to can be needed by the mainstream programming code that computer is parsed
It wants computer to upload to the programming code after parsing and executes the programming code in the programing system of the application again.
Step S104:Monitor the implementing result of the default programming code.
Wherein, step S104 includes step step S1441 to step S1444,
Step S1441:Obtain the implementing result of the default programming code;
Specifically, programming personnel inputs be programmed programming knot into programming robot or programmed computer in advance
Fruit is mainly used for the practice of programming, therefore make since the application graphical programming method is suitable for children or programming learner
User has learned that the result to be achieved of itself be programmed practice before programming.Such as:It is programmed for " 1,2,3,4 summation ",
Programming output result is " 10 " known to programmer, which is pre-entered programming robot or programmed computer
It is interior.
Step S1442:Obtain the pre-execution result of the programming card determine instruction;
Specifically, being converted to programming code according to programming card determine instruction, and pass through programming robot or programming meter
Calculation machine executes the programming code of " 1,2,3,4 summation ", obtains programmed result after executing programming code.
Step S1443:The implementing result and programming the pre- of card determine instruction for comparing the default programming code are held
Whether row result is consistent;
Specifically, transferring the programmed result being prior-entered in programming robot or programmed computer, and will be defeated in advance
The programmed result entered is compared with programming code programmed result obtained is executed.
Step S1444:If the implementing result of the default programming code is held with programming the pre- of card determine instruction
Row result is inconsistent, then sends prompt information.
Specifically, being prior-entered in programming robot or programmed computer for being programmed for " 1,2,3,4 summation "
Programmed result be " 10 ", if execute programming code programmed result obtained be also " 10 ", program robot or volume
Programming code performed by journey computer is correct, illustrates that programming card determine instruction transmitted by programming personnel is correct, programs people
The selected programming card of member and the sequence for programming card are correct;It is not if executing programming code programmed result obtained
" 10 ", then it is incorrect to program programming code performed by robot or programmed computer, illustrates that programming personnel is being programmed
Wrong in the selection of card or the sequence of programming card, programming robot externally sends miscue information, programming personnel
The selection of programming card and the sequence of programming card can be reexamined and edited according to prompt information, until the volume of output
Journey result is " 10 ", illustrates that programming is correct.
User can real time inspection programming robot to the implementing result of the range code that prelists, and by implementing result and selected volume
The pre-execution result to be realized of journey card compares, and judges that the range code that prelists is held by programming robot according to comparing result
Row result with whether be user's programmed result to be achieved.If the two is consistent, reach programming purpose without subsequent place
Reason;If the two is inconsistent, shows to program robot and mistake occurs in executing program process or in transcode process,
It programs robot and sends prompt information, prompt information can be acousto-optic hint information or text prompt information, to complete to pre-
The monitoring and feedback of the implementing result of programming code.
In the second embodiment of the application, as shown in Fig. 2, the programming card determine instruction for receiving the first user, packet
Step S1011 is included to step S1012:
Step S1011:Obtain the programming card sequence of the first user selection;
Specifically, user is in the case where choosing multiple programming cards, the sequencing selected to each programming card into
Row sequence, programming card can arbitrarily be chosen in variable card, action card and Row control card.
Step S1012:The programming card determine instruction is obtained according to the programming card sequence.
Specifically, extract the information command of alternative programming card, according to programming card sequence by information command according to
The sequencing of execution is ranked up, thus the programming card determine instruction after being sorted.
In the 3rd embodiment of the application, as shown in figure 3, further including step S111 and step before step S101
S112:
Step S111:The programming card of default different function, the programming card include electronic card in kind and virtually compile
Journey card;
Specifically, being previously written in electronic tag corresponding real as shown in figure 4, be equipped with electronic tag in electronic card in kind
Command information represented by object electronic card, the information can directly be instructed by programming robot or computer card reader
The reading of information.
Preferably, the electronic tag in electronic card in kind can be RFID tag.
Specifically, as shown in figure 5, dummy program card is the figure that can be shown on computers.
Step S112:Establish the mapping relations between the programming card and the programming code of corresponding function.
Specifically, establishing the mapping relations between programming card and programming code, the function and meter that programming card on piece is shown
Function corresponding to the executable programming code of calculation machine is identical, and computer obtains root after the programming card command information that user selects
The executable programming code being stored in computer can be transferred according to mapping relations, computer is according to acquired programming card
The sequence of piece command information can be according to the executable programming code of the multiple groups being stored in computer be transferred, to be counted
Calculation machine programmed statements, programming robot can be completed according to computer programming sentence and program information command representated by card.
In the fourth embodiment of the application, as shown in fig. 6, programming card is electronic card in kind, then include,
Step S1021:Judge whether the collating sequence of the electronic card in kind meets the default programming card sequence
Rule;
Specifically, being successively read the instruction being previously written in the electronic card in kind of user's selection letter by programming robot
Breath, and judge whether the reading order of electronic card in kind meets preset programming card ordering rule.
Step S1031:If the collating sequence of the material object electronic card meets the default programming card ordering rule,
Then generate programming code corresponding with the programming card sequence;
Specifically, if programming robot meets the reading order for the command information being previously written in electronic card in kind
Preset programming card ordering rule, programming robot can then transfer computer programming corresponding with the electronic card sequence
Sentence.
Step S1041:The programming code is parsed, executable program is obtained and is run.
Specifically, programming robot parses the programmed statements, the executable program of the programmed statements is obtained, and transport
The row executable program, completes the operation in the executable program.
In the 5th embodiment of the application, as shown in fig. 7, programming card is dummy program card, then include:
Step S1022:Judge whether the collating sequence of the dummy program card meets the default volume by computer
Journey card ordering rule;
Specifically, choosing dummy program card in the selection region that user passes through computer runs programs, and will choosing with this
In dummy program card be dragged in program regions, computer be successively read user selection virtual electronic card instruction letter
Breath, and judge whether the selecting sequence of virtual electronic card meets preset programming card ordering rule.
Preferably, dummy program card can be shown in Computer display interface with electronics icon or graphic form
Show.
Step S1032:If the collating sequence of the dummy program card meets the default programming card ordering rule,
Then the computer generates programming code corresponding with the programming card sequence;
Specifically, if computer meets preset programming card sequence rule to the reading order of dummy program card
Then, computer can then transfer computer programming sentence corresponding with the electronic card sequence.
Step S1042:Computer parses the programming code, obtains executable program and uploads;
Specifically, computer parses the programmed statements, the executable journey of the programmed statements is obtained, and by the programming
The executable program of sentence is uploaded to programming robot.
Step S1052:It receives the executable program that the computer uploads and runs.
Specifically, programming robot receives the executable program that computer is sent, and the executable program is run, completing should
Operation in executable program.Or computer directly executes the executable program, completes the operation in the executable program.
It can be seen from the above description that the present invention realizes following technical effect:Be provided with electronic card in kind and
Two kinds of programming card units of dummy program card, are established between the programming code of corresponding function according to different programming card units
Mapping relations, syntax parsing unit need to only program the graphical information of card unit, and it is pre- to judge whether programming rule meets
If programming rule, the program edited can be run by execution unit, it is simple and convenient, reach effective simplified programming
The purpose of the complexity of study, while guaranteeing that user can focus onto the understanding of Computation schema, be conducive to
The study of logical thinking and the grasp of art of programming, so that the technical effect of simplified programming language is realized, person's palm easy to use
Hold the advanced of Program Thought and programming language.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions
It is executed in computer system, although also, logical order is shown in flow charts, and it in some cases, can be with not
The sequence being same as herein executes shown or described step.
According to embodiments of the present invention, it additionally provides a kind of for implementing the programing system of above-mentioned graphical programming method, such as Fig. 9
Shown, which includes:Instruction receiving unit 1, grammer judging unit 2, instruction execution unit 3 and result monitoring unit 4.
Instruction receiving unit 1, for receiving the programming card determine instruction of the first user, wherein the programming card is true
Fixed instruction shows programming content by patterned mode for being used as;
Specifically, programming card includes variable card, action card and Row control card, letter corresponding to variable card
Breath instruction is that variable information instructs, and information command corresponding to action card is action message instruction, and Row control card is corresponding
Information command be flow control information instruction.The programming card determine instruction may be either the selected single programming of user
The instruction of single piece of information corresponding to card can also be the selected multiple programming cards of user, and form according to sequencing
Sentence information command.Wherein variable information instruction includes the digital information instruction of digital " 1 " to " 10 ";" red ", " Huang ",
The colouring information of " indigo plant ", " green " instructs;Wherein action message includes the action message instruction of " moving up ", " moving to right ", " moving to left ";
The action message of " light " instructs;The action message of " sound " instructs;Wherein the instruction of Row control card information includes that " function is opened
The control information command of beginning ";The control information command of " function terminates ";The control information command of " circulation starts ";" circulation knot
The control information command of beam ".Sentence information command is rearranged according to sequencing by instructing several single piece of information.
Grammer judging unit 2, for judging whether the programming card determine instruction meets default programming grammar rule;
Specifically, carrying out presetting, the default programming of formation to the sequencing of the corresponding information command arrangement of programming card
Syntax rule.Such as:At the end of programmed statements, if there is the control information command of " circulation starts ", then there must be " circulation knot
The control information command of beam ";The action message instruction of " light ", the action message instruction of " sound " or the control of " circulation starts "
It must be variable information instruction after information command;It must be action message the instruction, " sound of " light " before variable information instruction
The action message of sound " instructs or the control information command of " circulation starts ";Instruction before programmed statements terminate cannot be " lamp
Light ", " sound ", " circulation starts ";Information command before function terminates cannot be the action message instruction of " light ", " sound "
The control information command of action message instruction or " circulation starts ";First information command of programmed statements must be that " function is opened
The control information command of beginning ", the last one information command of programmed statements must be the control information command of " function terminates ";
There must be the control information command of " circulation starts " before the control information command of " circulation terminates ";It is corresponding that programming card is not read
Not including information command in information command or programming card is then mistake.
Instruction execution unit 3, if meeting the default programming grammar rule for the programming card determine instruction,
The programming card determine instruction is converted into default programming code, and executes the default programming code;
Specifically, if the sequencing of the corresponding information command arrangement of programming card meets preset volume in step S102
Journey syntax rule judges grammer used by programmed statements then for correct grammer, can will program the corresponding information of card and refer to
Order is converted to executable programming code, which directly can parse and hold for programing system in the application
Capable programming code can also be the mainstream programming code that is parsed by computer, as Java, JavaScript, C/C++,
Python, PHP, Ruby on Rails etc., if being converted to can be needed by the mainstream programming code that computer is parsed
It wants computer to upload to the programming code after parsing and executes the programming code in the programing system of the application again.
As a result monitoring unit 4, for monitoring the implementing result of the default programming code.
Specifically, obtaining the implementing result of the default programming code;Programming the pre- of card determine instruction is obtained to hold
Row result;Compare the default programming code implementing result and it is described programming card determine instruction pre-execution result whether one
It causes;If the implementing result of the default programming code and the pre-execution result of the programming card determine instruction are inconsistent,
Send prompt information.
As shown in Figure 10, grammer judging unit 2 includes:First grammer judgment module 201;Instruction execution unit 3 includes:The
One code generation module 301 and parsing operation module 302.
First grammer judgment module 201, for judging it is described pre- whether the collating sequence of the electronic card in kind meets
If programming card ordering rule;
Specifically, being successively read the instruction being previously written in the electronic card in kind of user's selection letter by programming robot
Breath, and judge whether the reading order of electronic card in kind meets preset programming card ordering rule.
First code generation module 301, if the collating sequence for the electronic card in kind meets the default volume
Journey card ordering rule then generates programming code corresponding with the programming card sequence;
Specifically, if programming robot meets the reading order for the command information being previously written in electronic card in kind
Preset programming card ordering rule, programming robot can then transfer computer programming corresponding with the electronic card sequence
Sentence.
Parsing operation module 302, for parsing the programming code, obtaining executable program and running.
Specifically, programming robot parses the programmed statements, the executable program of the programmed statements is obtained, and transport
The row executable program, completes the operation in the executable program.
As shown in figure 11, grammer judging unit 2 includes:Second grammer judgment module 211;Instruction execution unit 3 includes:The
Two code generation modules 311, parsing uploading module 312 and reception operation module 313.
Second grammer judgment module 211, for judged by computer the dummy program card collating sequence whether
Meet the default programming card ordering rule;
Specifically, choosing dummy program card in the selection region that user passes through computer runs programs, and will choosing with this
In dummy program card be dragged in program regions, computer be successively read user selection virtual electronic card instruction letter
Breath, and judge whether the selecting sequence of virtual electronic card meets preset programming card ordering rule.
Preferably, dummy program card can be shown in Computer display interface with electronics icon or graphic form
Show.
Second code generates mould 311, if the collating sequence for the dummy program card meets the default programming
Card ordering rule, then the computer generates programming code corresponding with the programming card sequence;
Specifically, if computer meets preset programming card sequence rule to the reading order of dummy program card
Then, computer can then transfer computer programming sentence corresponding with the electronic card sequence.
Uploading module 312 is parsed, the programming code is parsed for the computer, obtains executable program simultaneously
It uploads;
Specifically, computer parses the programmed statements, the executable journey of the programmed statements is obtained, and by the programming
The executable program of sentence is uploaded to programming robot.
Operation mould 313 is received, for receiving the executable program of the computer upload and running.
Specifically, programming robot receives the executable program that computer is sent, and the executable program is run, completing should
Operation in executable program.Or computer directly executes the executable program, completes the operation in the executable program.
As shown in figure 12, as a result monitoring unit 4 includes that implementing result obtains module 411, pre-execution result obtains module
412, comparison module 413 and prompt information sending module 414.
Implementing result obtains module 411, for obtaining the implementing result of the default programming code;
Specifically, programming personnel inputs be programmed programming knot into programming robot or programmed computer in advance
Fruit is mainly used for the practice of programming, therefore make since the application graphical programming method is suitable for children or programming learner
User has learned that the result to be achieved of itself be programmed practice before programming.
Pre-execution result obtains module 412, for obtaining the pre-execution result of the programming card determine instruction;
Specifically, being converted to programming code according to programming card determine instruction, and pass through programming robot or programming meter
The programming code that calculation machine executes obtains programmed result after executing programming code.
Comparison module 413, implementing result and the programming card determine instruction for the default programming code
Pre-execution result it is whether consistent;
Specifically, transferring the programmed result being prior-entered in programming robot or programmed computer, and will be defeated in advance
The programmed result entered is compared with programming code programmed result obtained is executed.
Prompt information sending module 414, if implementing result and the programming card for the default programming code
The pre-execution result of determine instruction is inconsistent, then sends prompt information.
Specifically, if the programmed result being prior-entered in programming robot or programmed computer and execution programming generation
Code programmed result obtained is identical, then it is correct to program programming code performed by robot or programmed computer, illustrates to compile
Programming card determine instruction transmitted by Cheng personnel is correct, the selected programming card of programming personnel and the sequence for programming card
Correctly;If the programmed result being prior-entered in programming robot or programmed computer and execution programming code are obtained
Programmed result is identical, then it is incorrect to program programming code performed by robot or programmed computer, illustrates that programming personnel exists
Be programmed card selection or program card sequence on it is wrong, programming robot externally send miscue information,
Programming personnel can reexamine and edit to the selection of programming card and the sequence of programming card according to prompt information, until
The programmed result and execution programming code programmed result obtained being prior-entered in programming robot or programmed computer
It is identical, illustrate that programming is correct.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
Be performed by computing device in the storage device, perhaps they are fabricated to each integrated circuit modules or by they
In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific
Hardware and software combines.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field
For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair
Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.
Claims (10)
1. a kind of graphical programming method, which is characterized in that including:
Receive the programming card determine instruction of the first user, wherein the programming card determine instruction, which is used to be used as, passes through figure
The mode of change shows programming content;
Judge whether the programming card determine instruction meets default programming grammar rule;
If the programming card determine instruction meets the default programming grammar rule, by the programming card determine instruction
Default programming code is converted to, and executes the default programming code;
Monitor the implementing result of the default programming code.
2. graphical programming method according to claim 1, which is characterized in that the programming card for receiving the first user is true
It instructs calmly and includes:
Obtain the programming card sequence of the first user selection;
The programming card determine instruction is obtained according to the programming card sequence.
3. graphical programming method according to claim 1, which is characterized in that the programming card for receiving the first user is true
Include before fixed instruction:
The programming card of default different function, the programming card include electronic card and dummy program card in kind;
Establish the mapping relations between the programming card and the programming code of corresponding function.
4. graphical programming method according to claim 3, which is characterized in that
It is described to judge whether the programming card determine instruction meets default programming grammar rule and include:
Judge whether the collating sequence of the electronic card in kind meets the default programming card ordering rule;
If the programming card determine instruction meets the default programming grammar rule, the programming card is determined
Instruction is converted to default programming code, and executes the default programming code and include:
If the collating sequence of the material object electronic card meets the default programming card ordering rule, generate and the volume
The corresponding programming code of journey card sequence;
The programming code is parsed, executable program is obtained and is run.
5. graphical programming method according to claim 3, which is characterized in that
It is described to judge whether the programming card determine instruction meets default programming grammar rule and include:
Judge whether the collating sequence of the dummy program card meets the default programming card ordering rule by computer;
If the programming card determine instruction meets the default programming grammar rule, the programming card is determined
Instruction is converted to default programming code, and executes the default programming code and include:
If the collating sequence of the dummy program card meets the default programming card ordering rule, the computer is raw
At programming code corresponding with the programming card sequence;
The computer parses the programming code, obtains executable program and uploads;
It receives the executable program that the computer uploads and runs.
6. graphical programming method according to claim 1, which is characterized in that described to monitor holding for the default programming code
Row result includes:
Obtain the implementing result of the default programming code;
Obtain the pre-execution result of the programming card determine instruction;
Whether the implementing result for comparing the default programming code is consistent with the pre-execution result of the programming card determine instruction;
If the implementing result of the default programming code and the pre-execution result of the programming card determine instruction are inconsistent,
Send prompt information.
7. a kind of graphical programming system, including:Instruction receiving unit, grammer judging unit, instruction execution unit and result monitoring
Unit,
Described instruction receiving unit, for receiving the programming card determine instruction of the first user, wherein the programming card determines
Instruction shows programming content by patterned mode for being used as;
The grammer judging unit, for judging whether the programming card determine instruction meets default programming grammar rule;
Described instruction execution unit, if meeting the default programming grammar rule for the programming card determine instruction,
The programming card determine instruction is converted into default programming code, and executes the default programming code.
The result monitoring unit, for monitoring the implementing result of the default programming code.
8. graphical programming system according to claim 7, which is characterized in that
The grammer judging unit includes:First grammer judgment module,
The first grammer judgment module is used to judge whether the collating sequence of the electronic card in kind to meet the default volume
Journey card ordering rule;
Described instruction execution unit includes:First code generation module and parsing operation module,
If collating sequence of the first code generation module for the electronic card in kind meets the default programming card
Piece ordering rule then generates programming code corresponding with the programming card sequence;
The parsing operation module is for parsing the programming code, obtaining executable program and running.
9. graphical programming system according to claim 7, which is characterized in that
The grammer judging unit includes:Second grammer judgment module,
The second grammer judgment module is used to judge whether the collating sequence of the dummy program card meets by computer
The default programming card ordering rule;
Described instruction execution unit includes:Second code generation module, parsing uploading module and reception operation module,
If collating sequence of the second code generation module for the dummy program card meets the default programming card
Piece ordering rule, then the computer generates programming code corresponding with the programming card sequence;
The parsing uploading module parses the programming code for the computer, obtain executable program and on
It passes;
The operation module that receives is used to receive the executable program of the computer upload and runs.
10. graphical programming system according to claim 7, which is characterized in that result monitoring unit includes:Implementing result obtains
Modulus block, pre-execution result obtain module, comparison module and prompt information sending module,
The implementing result obtains the implementing result that module is used to obtain the default programming code;
The pre-execution result obtains the pre-execution result that module is used to obtain the programming card determine instruction;
Implementing result of the comparison module for the default programming code programs the pre- of card determine instruction with described
Whether implementing result is consistent;
If the prompt information sending module is determined for the implementing result of the default programming code and the programming card
The pre-execution result of instruction is inconsistent, then sends prompt information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810528771.6A CN108874383A (en) | 2018-05-28 | 2018-05-28 | Graphical programming method and programing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810528771.6A CN108874383A (en) | 2018-05-28 | 2018-05-28 | Graphical programming method and programing system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108874383A true CN108874383A (en) | 2018-11-23 |
Family
ID=64335427
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810528771.6A Pending CN108874383A (en) | 2018-05-28 | 2018-05-28 | Graphical programming method and programing system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108874383A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683885A (en) * | 2018-12-26 | 2019-04-26 | 王新宇 | The method and device thereof of programming language input, apparatus control method |
CN110866575A (en) * | 2019-11-04 | 2020-03-06 | 西安交通大学 | Information encryption bearing method based on magnetic domain programming |
CN111026386A (en) * | 2019-12-23 | 2020-04-17 | 杨宏伟 | Jigsaw programmable instruction input method and system based on image recognition |
CN111651153A (en) * | 2020-04-27 | 2020-09-11 | 北京编程猫科技有限公司 | Programming creation method and device based on graphical programming tool |
CN112463140A (en) * | 2020-11-23 | 2021-03-09 | 乐聚(深圳)机器人技术有限公司 | Programming method and device based on electronic building blocks, electronic equipment and storage medium |
CN113238758A (en) * | 2021-04-10 | 2021-08-10 | 北京猿力未来科技有限公司 | Method and device for displaying programming codes |
CN113238757A (en) * | 2021-04-10 | 2021-08-10 | 北京猿力未来科技有限公司 | Method and device for identifying programming instruction |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1549118A (en) * | 2003-05-08 | 2004-11-24 | 冯健辉 | Computer pattern programming language system conception |
CN102136208A (en) * | 2011-03-30 | 2011-07-27 | 中国科学院软件研究所 | Material object programming method and system |
CN103197929A (en) * | 2013-03-25 | 2013-07-10 | 中国科学院软件研究所 | System and method for graphical programming facing children |
CN105137887A (en) * | 2015-09-24 | 2015-12-09 | 苏州乐派特机器人有限公司 | Materialized programming method based on programming plate and application thereof in robot field |
CN105511860A (en) * | 2015-11-30 | 2016-04-20 | 大连文森特软件科技有限公司 | On-line graphical programming system |
CN105739974A (en) * | 2016-01-25 | 2016-07-06 | 杭州电子科技大学 | Method for controlling electronic building blocks by graphical programming |
CN205680078U (en) * | 2016-05-09 | 2016-11-09 | 福建省闽骏科教设备有限公司 | A kind of graphic programming system |
CN106178505A (en) * | 2016-07-29 | 2016-12-07 | 成都伟嘉斯特科技有限公司 | A kind of graphical child programs toy and method thereof |
CN106484398A (en) * | 2016-09-19 | 2017-03-08 | 深圳奥松机器人科技有限公司 | Programming device progress control method and system |
-
2018
- 2018-05-28 CN CN201810528771.6A patent/CN108874383A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1549118A (en) * | 2003-05-08 | 2004-11-24 | 冯健辉 | Computer pattern programming language system conception |
CN102136208A (en) * | 2011-03-30 | 2011-07-27 | 中国科学院软件研究所 | Material object programming method and system |
CN103197929A (en) * | 2013-03-25 | 2013-07-10 | 中国科学院软件研究所 | System and method for graphical programming facing children |
CN105137887A (en) * | 2015-09-24 | 2015-12-09 | 苏州乐派特机器人有限公司 | Materialized programming method based on programming plate and application thereof in robot field |
CN105511860A (en) * | 2015-11-30 | 2016-04-20 | 大连文森特软件科技有限公司 | On-line graphical programming system |
CN105739974A (en) * | 2016-01-25 | 2016-07-06 | 杭州电子科技大学 | Method for controlling electronic building blocks by graphical programming |
CN205680078U (en) * | 2016-05-09 | 2016-11-09 | 福建省闽骏科教设备有限公司 | A kind of graphic programming system |
CN106178505A (en) * | 2016-07-29 | 2016-12-07 | 成都伟嘉斯特科技有限公司 | A kind of graphical child programs toy and method thereof |
CN106484398A (en) * | 2016-09-19 | 2017-03-08 | 深圳奥松机器人科技有限公司 | Programming device progress control method and system |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683885A (en) * | 2018-12-26 | 2019-04-26 | 王新宇 | The method and device thereof of programming language input, apparatus control method |
CN110866575A (en) * | 2019-11-04 | 2020-03-06 | 西安交通大学 | Information encryption bearing method based on magnetic domain programming |
CN110866575B (en) * | 2019-11-04 | 2020-11-17 | 西安交通大学 | Information encryption bearing method based on magnetic domain programming |
CN111026386A (en) * | 2019-12-23 | 2020-04-17 | 杨宏伟 | Jigsaw programmable instruction input method and system based on image recognition |
CN111651153A (en) * | 2020-04-27 | 2020-09-11 | 北京编程猫科技有限公司 | Programming creation method and device based on graphical programming tool |
CN112463140A (en) * | 2020-11-23 | 2021-03-09 | 乐聚(深圳)机器人技术有限公司 | Programming method and device based on electronic building blocks, electronic equipment and storage medium |
CN112463140B (en) * | 2020-11-23 | 2023-09-12 | 乐聚(深圳)机器人技术有限公司 | Programming method and device based on electronic building blocks, electronic equipment and storage medium |
CN113238758A (en) * | 2021-04-10 | 2021-08-10 | 北京猿力未来科技有限公司 | Method and device for displaying programming codes |
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 |
CN113238758B (en) * | 2021-04-10 | 2024-05-14 | 北京猿力未来科技有限公司 | Program code display method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108874383A (en) | Graphical programming method and programing system | |
Homer et al. | Combining tiled and textual views of code | |
CN109144374A (en) | Method for processing business, system and relevant device based on visualization regulation engine | |
CN103456203B (en) | A kind of portable entity programmed method and system | |
CN102789713B (en) | Entity programming method and system based on infrared and wireless transmission technology | |
CN105739974A (en) | Method for controlling electronic building blocks by graphical programming | |
Litts et al. | Engaging youth in computational thinking practices through designing place-based mobile games about local issues | |
Fauquex et al. | Creating people-aware IoT applications by combining design thinking and user-centered design methods | |
CN110480633A (en) | A kind of method, apparatus and storage medium controlling equipment | |
CN113919158A (en) | Simulation method and device for flight control panel and storage medium | |
CN111563371A (en) | Text generation method and equipment | |
CN106164854A (en) | User interface controls with communicate | |
Setiawan et al. | Mobile visual programming apps for internet of things applications based on raspberry Pi 3 platform | |
CN109859537A (en) | A kind of picture-weaving in silk tutoring system and method, information data processing terminal | |
CN108284445A (en) | Personalization machine people's custom-built system | |
CN108762728A (en) | By integrated method, medium, device and the computing device in the application of communication function | |
Jain et al. | Educational tool for understanding algorithm building and learning programming languages | |
KR102251867B1 (en) | System and method for providing coding education using star topology in Internet of things | |
Kui et al. | Teaching method reform of python language programming course based on minimum knowledge sets | |
CN112308748A (en) | Teaching application system, method and medium based on AI software system | |
CN111935359A (en) | Terminal control method and device based on virtual terminal and computer equipment | |
Mokoginta et al. | Developing Modern JavaScript Frameworks for Building Interactive Single-Page Applications | |
Gorton | Tangible toolkits for reflective systems modeling | |
Gursch et al. | From Smartphone to Fabric: Mobile Embroidery Programming: Improving the maker workflow to reduce entry barriers in STEAM | |
Fellmann et al. | A command line interface versus a graphical user interface in coding VR systems |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210825 Address after: 123000 23-2-1 Xinggong Road, Xihe District, Fuxin City, Liaoning Province Applicant after: Wei Liang Address before: Room 02-a593, block B, No. 22, information road, Haidian District, Beijing 100085 Applicant before: ZEASN INFO TECH Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181123 |