CN113238758B - Program code display method and device - Google Patents

Program code display method and device Download PDF

Info

Publication number
CN113238758B
CN113238758B CN202110387633.2A CN202110387633A CN113238758B CN 113238758 B CN113238758 B CN 113238758B CN 202110387633 A CN202110387633 A CN 202110387633A CN 113238758 B CN113238758 B CN 113238758B
Authority
CN
China
Prior art keywords
programming
code
instruction
information
action function
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.)
Active
Application number
CN202110387633.2A
Other languages
Chinese (zh)
Other versions
CN113238758A (en
Inventor
何山
臧楠
陈月
宋维杰
古全
李翊嘉
朱润珠
李翊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ape Power Future Technology Co Ltd
Original Assignee
Beijing Ape Power Future 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 Beijing Ape Power Future Technology Co Ltd filed Critical Beijing Ape Power Future Technology Co Ltd
Priority to CN202110387633.2A priority Critical patent/CN113238758B/en
Publication of CN113238758A publication Critical patent/CN113238758A/en
Application granted granted Critical
Publication of CN113238758B publication Critical patent/CN113238758B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63HTOYS, e.g. TOPS, DOLLS, HOOPS OR BUILDING BLOCKS
    • A63H33/00Other toys
    • A63H33/04Building blocks, strips, or similar building parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Educational Technology (AREA)
  • Educational Administration (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention discloses a method and a device for displaying programming codes, relates to the technical field of programming, and mainly aims to solve the problem that intelligent equipment is excessively relied on in the existing programming code display. The method comprises the following steps: acquiring programming code information, wherein the programming code information is acquired from a programming card group through preset image acquisition equipment, the programming card group comprises at least one programming card, and the programming card at least represents one code statement; determining an execution instruction according to the programming code information, wherein the execution instruction is determined according to the code statement; acquiring scene information, wherein the scene information is obtained based on an entity graph; and generating display information according to the execution instruction and the scene information, wherein the display information comprises a control target unit, the execution instruction is executed in a scene environment, and the scene environment is determined according to the scene information. The invention is used for the program code display process.

Description

Program code display method and device
Technical Field
The present invention relates to the field of programming technologies, and in particular, to a method and apparatus for displaying a programming code.
Background
In order to facilitate children to understand and learn programming thinking, some application programs stored with programming building blocks are developed in the prior art, in the application programs, the application programs can be constructed in a dragging and stacking mode through an interactive interface, and the children can stack different programming building blocks according to different sequences so as to control a target object to travel according to an expected route or execute an expected action, so that the programming effect is displayed.
However, in practical application, the program code display process in the conventional technology is completely performed by the intelligent device, such as the intelligent device of a tablet computer, a mobile phone, etc., which results in that the user is too dependent on the intelligent device in the program code display process, especially in the program process, when the intelligent device cannot be used, the program operation cannot be performed, and then the display of the program code is affected.
Disclosure of Invention
In view of the above problems, the present invention provides a method and an apparatus for displaying a programming code, which mainly aims to solve the problem that the programming display is affected due to too much dependence on an intelligent device in the present displaying process of the programming code.
In order to solve the technical problem, in a first aspect, the present invention provides a method for displaying programming codes, which includes:
acquiring programming code information, wherein the programming code information is acquired from a programming card group through preset image acquisition equipment, the programming card group comprises at least one programming card, and the programming card at least represents one code statement;
determining an execution instruction according to the programming code information, wherein the execution instruction is determined according to the code statement;
acquiring scene information, wherein the scene information is obtained based on an entity graph;
and generating display information according to the execution instruction and the scene information, wherein the display information comprises a control target unit, the execution instruction is executed in a scene environment, and the scene environment is determined according to the scene information.
Optionally, the determining the execution instruction according to the programming code information includes:
Determining action function instructions and a hierarchical relationship according to the programming code information, wherein the action function instructions are used for representing actions of the target units, the hierarchical relationship is used for representing logic among the action function instructions, the action function instructions are determined based on the programming cards, and the hierarchical relationship is determined based on the positions of the programming cards;
and constructing the execution instruction according to the action function instruction and the hierarchical relationship.
Optionally, the programming code information includes at least one code statement;
The determining the action function instruction and the hierarchical relation according to the programming code information comprises the following steps:
Determining an action function instruction corresponding to each code statement according to the programming code information and a preset instruction relationship, wherein the preset instruction relationship comprises a relationship between the code statement and the action function instruction.
Optionally, the determining the action function instruction and the hierarchical relationship according to the programming code information includes:
Determining an instruction position of each action function instruction according to the programming code information, wherein the instruction position is determined based on the position of the code statement;
And determining a hierarchical relationship of the action function instructions according to the instruction positions, wherein the hierarchical relationship is used for representing an execution sequence in the execution process of the action function instructions and/or an instruction nesting relationship among the action function instructions.
Optionally, the acquiring programming code information includes:
And scanning the programming card group through the preset image acquisition equipment to obtain a first scanning result, and generating the programming code information according to the first scanning result, wherein the programming card group is obtained by a user based on the programming card combination.
Optionally, the acquiring the scene information includes:
Determining a target scene according to a user input instruction, wherein the user input instruction is acquired based on a preset image interaction interface, and the graphical interaction interface comprises at least one scene option;
acquiring corresponding scene information from a cloud through the target scene;
Or alternatively
And scanning an entity graph through the preset image acquisition equipment to obtain a second scanning result, and generating the scene information according to the second scanning result, wherein the entity graph comprises a three-dimensional graph and a two-dimensional image.
Optionally, the display information includes a display animation;
the generating the display information according to the execution instruction and the scene information includes:
determining a route and behavior operation of a target unit in the scene environment according to the execution instruction;
And controlling the target unit to act according to the route and executing the behavior operation to obtain the display animation.
In a second aspect, an embodiment of the present invention further provides a display apparatus for a programming code, including:
The first acquisition unit is used for acquiring programming code information, wherein the programming code information is acquired from a programming card group through preset image acquisition equipment, the programming card group comprises at least one programming card, and the programming card at least represents one code statement;
A determining unit configured to determine an execution instruction according to the programming code information, where the execution instruction is determined according to the code statement;
The second acquisition unit is used for acquiring scene information, wherein the scene information is obtained based on the entity graph;
and the generating unit is used for generating display information according to the execution instruction and the scene information, wherein the display information comprises a control target unit for executing the execution instruction in a scene environment, and the scene environment is determined according to the scene information.
In order to achieve the above object, according to a third aspect of the present invention, there is provided a storage medium including a stored program, wherein the program, when run, controls a device in which the storage medium is located to execute the above-described program code presentation method.
In order to achieve the above object, according to a fourth aspect of the present invention, there is provided a processor for running a program, wherein the program executes the program code presentation method described above.
By means of the technical scheme, the method and the device for displaying the programming codes are too dependent on the intelligent equipment in the existing process of displaying the programming codes, so that the problem of displaying the programming codes is affected. In the scheme, the programming code information is acquired from the programming card group through the preset image acquisition device, and the programming card group comprises at least one programming card, and each programming card at least represents one code statement, so that programming can be performed based on the programming card in the programming process of a user without using an intelligent device in the programming process, the problem that the intelligent device cannot be used in the programming process and then the programming code cannot be programmed is avoided, and then the influence on the programming code display is avoided. Meanwhile, the peeling between the programming process and the display process can be ensured in the display scheme, so that the moment for displaying the programming effect can be selected according to the requirement after the programming of the user is finished, the control of the display time of the programming code is realized, and the display effect of the programming code related by the invention has better controllability. In addition, in the display process, since the display information includes the control target unit to execute the execution instruction in the scene environment, and the scene environment is determined according to the scene information, the scene information is obtained based on the entity graph, so that the combination of the displayed effect and the entity graph is ensured, the interactivity of the scene environment is improved, the programming effect can be displayed by combining the actual graph under the condition that the user needs, and the user experience is improved.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1-A is a flowchart illustrating a method for exposing programming code, according to an embodiment of the present invention;
1-B show a programming card illustration of determining a hierarchical relationship of action function instructions in a programming code presentation process provided by an embodiment of the present invention;
1-C illustrate a programming card diagram when determining a hierarchical relationship of action function instructions in a presentation process of another programming code provided by an embodiment of the present invention;
FIG. 1-D illustrates a flowchart of specific steps performed in the presentation of programming code, as provided by an embodiment of the present invention;
FIG. 1-E illustrates a flowchart of specific steps performed in the presentation of another programming code provided by an embodiment of the present invention;
FIG. 1-F is a schematic diagram illustrating determining endpoint distances during program code identification when a program code is presented according to an embodiment of the present invention;
FIG. 1-G is a schematic diagram illustrating a process of determining hierarchical relationships in a process of identifying programming code when programming code is exposed, provided by an embodiment of the present invention;
FIG. 2 is a block diagram showing a programming code display device according to an embodiment of the present invention;
fig. 3 shows a block diagram of an apparatus for presentation of programming code, provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to solve the problem that the display is influenced by excessively depending on intelligent equipment in the current display process of programming codes, the embodiment of the invention provides a display method of the programming codes, as shown in fig. 1-A, which comprises the following steps:
101. Program code information is acquired.
The programming code information is obtained from a programming card group through a preset image acquisition device, the programming card group comprises at least one programming card, and the programming card at least represents one code statement.
When the program code information is acquired in step 101, it can be understood that the user has already performed after the program cards are combined into the program card group, and at this time, image acquisition is performed by a preset image acquisition device, and the program code information is obtained based on the image. The programming code information may be understood as a data set corresponding to the set of programming cards, including at least one code statement corresponding to the programming card.
102. And determining an execution instruction according to the programming code information.
Wherein the execution instruction is determined from the code statement.
Since the programming code information is actually a set of a plurality of code statements, and the code statements actually need to be identified in the subsequent process of displaying the programming code to obtain actual instructions, i.e., the execution instructions can be understood as the execution actions for characterizing the whole target unit in this embodiment. For example, the control target unit makes a 3-step forward and then makes a left turn, and jumps further forward and backward.
103. Scene information is acquired.
Wherein the scene information is obtained based on the entity graph. Since the target unit is required to be controlled to execute the action in the displaying process, and the specific environment where the target unit is located when executing the action is also involved, the scene information needs to be acquired in the step so as to determine the corresponding scene environment based on the scene information later. It should be noted that the scene information described in this embodiment is obtained through the entity graph, that is, the scene information is actually determined based on the actual scene. Therefore, the effect of the subsequent presentation of the programming code can be combined with the actual environment, and the user experience is better.
104. And generating display information according to the execution instruction and the scene information.
Wherein the presentation information includes a control target unit executing the execution instruction in a scene environment determined from the scene information.
After the execution instruction and the scene information are determined, the scene environment can be determined by the scene information, and then the execution is performed according to the execution instruction based on the control target unit, thereby generating the presentation information. Specifically, when to start the presentation can be controlled based on preset buttons during the presentation.
In an alternative embodiment, the determining the execution instruction according to the programming code information in the step 102 may include:
Determining action function instructions and a hierarchical relationship according to the programming code information, wherein the action function instructions are used for representing actions of the target units, the hierarchical relationship is used for representing logic among the action function instructions, the action function instructions are determined based on the programming cards, and the hierarchical relationship is determined based on the positions of the programming cards;
and constructing the execution instruction according to the action function instruction and the hierarchical relationship.
In the process of controlling the target unit to run, the target unit can actually execute different actions or behaviors based on different code sentences, and certain logic exists between the actions, so that in the embodiment, the action function instruction can be determined from the programming code information based on the actions of the target unit, and the hierarchical relationship between the action function instructions can be determined, so that the target unit can sequentially execute each action function instruction based on the hierarchical relationship to form the complete action of the corresponding execution instruction.
In an alternative embodiment, the programming code information in the foregoing embodiment may include at least one code statement, since the programming code information is determined from a set of programming cards, and at least one programming card is included in the set of programming cards, each programming card corresponding to one code statement.
In an implementation, determining the action function instruction and the hierarchical relationship according to the programming code information in the foregoing steps may include:
Determining an action function instruction corresponding to each code statement according to the programming code information and a preset instruction relationship, wherein the preset instruction relationship comprises a relationship between the code statement and the action function instruction.
In this embodiment, a preset instruction relationship may be preset, where the preset instruction relationship may include an action function instruction corresponding to each code statement, so that an effect of querying a corresponding instruction based on a relationship table may be achieved through the preset instruction relationship, and convenience in determining the action function instruction is ensured.
In addition, in practical application, the above-mentioned process of determining the action function instruction includes, but is not limited to, the above-mentioned method may be performed in other manners, for example, the sequence of the code sentences may be determined by programming the arrangement sequence of the cards, and the connected code sentences are grouped based on the front-to-back sequence, so as to obtain the action function instruction, where the grouping process may be divided according to functions, that is, behaviors.
In an alternative embodiment, since the action function instruction may determine the hierarchical relationship of the action function instruction based on the execution order or the nested relationship, determining the action function instruction and the hierarchical relationship according to the programming code information in the foregoing steps may include, when executed:
Determining an instruction position of each action function instruction according to the programming code information, wherein the instruction position is determined based on the position of the code statement;
And determining a hierarchical relationship of the action function instructions according to the instruction positions, wherein the hierarchical relationship is used for representing an execution sequence in the execution process of the action function instructions and/or an instruction nesting relationship among the action function instructions.
Specifically, in the above steps, the execution sequence or the instruction nesting relationship, or both, may be determined based on actual programming code information, where the programming code information is determined by programming cards in the set of programming cards, so that the manner of determining the hierarchical relationship of the action function instructions in this embodiment is also different based on different arrangement forms of the programming cards.
For example, assuming that the vertical direction is the execution direction of the action function instruction, as shown in fig. 1-B, when the program cards in the program card group are arranged in a vertical manner, that is, the action function instruction composed of code statements corresponding to each program card only involves the execution order, and no nested relationship exists, the execution order may be used as a hierarchical relationship in this embodiment. In addition, when the program cards in the program card group are not arranged in a completely vertical manner as shown in fig. 1-C, the arrangement of the program cards in a horizontal manner is also involved, that is, the program cards correspond to the code sentences, which form action function instructions, not only have requirements on execution sequence, but also involve nesting between part of the action function instructions, so that the steps need to adopt the execution sequence and the instruction nesting relationship to determine a hierarchical relationship in the program code display process shown in the figure.
Based on the above steps, since the hierarchical relationship described in this embodiment may determine the hierarchical relationship of the action function instruction based on the execution sequence and the nesting relationship, that is, when the execution instruction is constructed, the instruction nesting relationship is represented by the arrangement of the code statements corresponding to the program cards in the directions perpendicular to each other, for example, when the execution direction is the vertical direction, the instruction nesting relationship is represented by the arrangement of the program cards in the horizontal direction, which ensures that the user can arrange the program cards according to the hierarchical relationship based on the manner of this embodiment, thereby improving the logic thinking capability for use. Meanwhile, when the execution sequence of the code sentences is in a vertical downward direction, programming cards distributed in a horizontal direction often have a nesting effect, so that the scene of the hierarchical relationship among codes or code blocks is determined in the horizontal direction when codes of different levels continue in the vertical direction in the actual programming process is simulated, and therefore, when a user displays the programming codes based on the method in the embodiment, the programming cards are required to be laid out in a nesting mode simulating actual compiling codes for realizing the realization of the code functions, and the cognition and the understanding of the actual code compiling layout are realized while the logic thinking capability of the user is exercised.
In an alternative embodiment, the acquiring the programming code information in the foregoing step 101 may include:
And scanning the programming card group through the preset image acquisition equipment to obtain a first scanning result, and generating the programming code information according to the first scanning result, wherein the programming card group is obtained by a user based on the programming card combination.
The preset image capturing device in the embodiment of the invention may be a camera built in an intelligent device such as a mobile phone or a tablet computer. Of course, a plug-in camera device connected to a device including a computer or the like may be used. Therefore, the identification of programming code information is realized by scanning the programming card group through the preset image acquisition equipment, a user can be ensured to program the card in the programming process without performing programming operation by means of intelligent equipment, and the problem of excessively depending on the intelligent equipment is avoided. Meanwhile, based on the fact that the intelligent equipment is not needed to be reused in the programming process, the situation that vision damage caused by long-time watching of the intelligent equipment is avoided when a user uses a programming card to program is guaranteed, and the intelligent card has a good vision protection effect especially for user groups with poor self-control power such as children.
In an alternative embodiment, the scene information may be acquired by the user by using the image acquisition device when needed, or may be acquired in advance, stored in the cloud and acquired from the cloud when needed, so that the acquiring the scene information in the step 103 may include:
Firstly, determining a target scene according to a user input instruction, wherein the user input instruction is acquired based on a preset image interaction interface, and the image interaction interface comprises at least one scene option; and then, acquiring corresponding scene information from the cloud through the target scene.
The scene information is acquired through the cloud, so that the requirements of selecting different entity scenes according to the input instruction of the user can be met, and the method has good suitability.
On the other hand, scanning an entity graph through the preset image acquisition equipment to obtain a second scanning result, and generating the scene information according to the second scanning result, wherein the entity graph comprises a three-dimensional graph and a two-dimensional image.
The scene information is determined by presetting the entity graph scanned by the image acquisition equipment, so that a user can select a physical scene around in the process of displaying the programming code as a scene during display, the interestingness is ensured, and the interactivity is improved based on the scanning process,
In an alternative embodiment, in order to make the display effect more intuitive and clear, during the real-time operation, the display information may specifically include a display animation;
Based on this, the generating the presentation information according to the execution instruction and the scene information in the step 104 may include:
firstly, determining a route and behavior operation of a target unit in the scene environment according to the execution instruction;
and then, controlling the target unit to act according to the route and executing the behavior operation to obtain the display animation.
The method has the advantages that the operation animation of the control target unit in the scene environment can be realized in the display process, so that a user can intuitively know the actual effect of the programming code, the display process is more intuitive, the user can conveniently know, the requirements of the user such as children can be more adapted based on the animation display form, and the method has better adaptability.
Specifically, after the program code information is obtained and the program code information is identified to obtain the execution instruction, the implementation manner of the method may further include the following steps:
As shown in fig. 1-D, an embodiment of the present invention further provides a process for identifying a programming code, where:
S101, acquiring programming code information.
The programming code information is acquired from a programming card group through a preset image acquisition device, the programming card group comprises at least one programming card, and each programming card at least represents one code statement of a control target unit.
In the embodiment of the invention, the applied scene can be understood as a process of identifying the programming code after the user programs the programming card through the entity. Because the user does not directly input the programming code in the intelligent device when using the programming card to program, the programming data corresponding to the programming card group formed by the programming card, namely the programming code information, needs to be acquired first in the step. Specifically, the acquiring process may be performed based on a preset image acquiring device, where the preset image acquiring device may be a built-in camera in the intelligent device or an external camera device, which is not limited herein, and may be selected based on an actual requirement of a user.
S102, identifying action function instructions and hierarchical relations in programming code information.
The action function instruction is used for representing the action of the target unit, the hierarchical relation is used for representing logic of the action function instruction when the action function instruction is executed, the action function instruction is determined based on code sentences represented by the programming card, and the hierarchical relation is determined based on the position of the programming card.
In the embodiment of the invention, a user needs to control the target unit to run by forming the programming cards into the programming card group and forming a complete execution instruction by the programming card group, wherein each programming card corresponds to a code statement, and the code statement can be a code specifically corresponding to a certain action, such as forward and jump. Meanwhile, since the code sentences include not only sentences corresponding to the actions, but also sentences for performing logic control on the actions, such as circulation, judgment and the like, at least one code sentence forms an action function instruction, and the action function instruction can be understood to include the code sentences corresponding to the actions and the code sentences for performing logic control on the actions, so that a complete action is formed, for example, the action function instruction can represent the meaning of jumping and circulating twice, namely, the action function instruction is formed by the code sentences corresponding to the jumping and the code sentences corresponding to the circulation twice. And the action function instructions form a complete execution instruction according to the logic during execution. Of course, in the identifying process, the code statement for performing logic control on the action can be identified as one action function instruction independently, and the code statement of other actions can be identified as another action function instruction, and the identifying mode of the action function instruction is not particularly limited, and can be set based on the actual requirement of the user.
In the process of programming by a user using a programming card, there are some cases where the programming card needs to be combined according to a certain logic, that is, there is a certain logic at the time of operation between action function instructions formed by code statements corresponding to the programming card. Therefore, in this step, not only the action function instruction in the programming code information but also the logic between the individual action function instructions, that is, the hierarchical relationship needs to be determined. Because the hierarchical relationship is actually determined based on the positions of the programming cards, that is to say, the hierarchical relationship among the programming cards after the user wants to arrange the programming cards is identified, the arrangement positions of the programming cards need to be controlled, so that the determination of the hierarchical relationship of the action function instructions can be realized based on the change of the positions of the programming cards, the situation that the user can purposefully arrange the positions of the programming cards based on the logic and the hierarchy among the action function instructions when using the programming cards is ensured, the user can train programming thinking in the process of using the programming cards, and the cognition effect of the user on the instructions and the programming thinking when compiling codes is improved.
S103, determining an execution instruction according to the action function instruction and the hierarchical relation.
And the execution instruction is used for controlling the target unit to finish action behaviors.
When the action function instruction and the hierarchical relationship are determined, the action and the logic between actions which the user wants to control the target unit are actually determined, and then the instruction of the whole behavior of the final control target unit, namely the execution instruction, can be determined based on the action function instruction and the hierarchical relationship.
For example: the action function instruction A is forward and further, the action function instruction B is left-turn and then jumps, the cycle is twice, and the action function instruction C is forward and further; the hierarchical relationship is: the action function instruction A and the action function instruction C are both of a first level, the action function instruction B is of a second level of a nested sub-level of the action function instruction A, and the obtained execution instruction can be determined based on the method to be: the left turn jumps once after the previous one, then the left turn jumps once again and jumps once again, and finally the two steps are further advanced.
In an alternative embodiment, the acquiring the programming code information in the step S101 may include:
Firstly, collecting card identifications of each programming card through preset image acquisition equipment, wherein the card identifications are determined through card characteristics, and the card characteristics at least comprise one of card shapes, card colors, card identification figures, card identification characters and card identification codes;
Then, determining the code statement corresponding to each programming card according to the card identification and a preset statement relation; the preset sentence relation comprises card identifications and corresponding code sentences.
Since the programming code information described in this embodiment is actually obtained by the physical programming card set, that is, by identifying each programming card in the programming card set. The specific recognition mode can determine the code statement corresponding to each programming card based on the card identification and the preset statement relation. In addition, in the process of collecting the card mark, the card mark can be determined by programming the card characteristics of the card, and specifically, the card characteristics can comprise any one or more of card shape, card color, card identification graph, card identification character and card identification code, wherein the card identification graph can be understood as graph arranged on the card, the card identification code can be understood as a scanning code similar to a two-dimensional code, and the card identification character can be understood as any one or combination of a plurality of numbers, letters, characters or other character strings arranged on the programmed card. Of course, which kind or kinds of card features are specifically adopted as card features to identify the card identifier in practical application can be selected based on the setting mode of the card actually programmed by the user, and the method is not limited herein.
The card mark is determined through the card characteristics, and the code statement corresponding to each programming card is determined based on the card mark and the preset statement relation, so that the effect of identifying the code statement by utilizing the card characteristics of the entity card can be realized, and the effect of acquiring programming code information by utilizing the entity-based programming card is realized.
In an alternative embodiment, since a plurality of programming cards corresponding to the same code statement may be included in one programming card group, in order to ensure the identification effect of the programming cards, a corresponding unique identifier may be set for each programming card to ensure the identification effect, based on which, in the implementation process, the card identification code is a scanning identification code with unique attribute set on the programming card;
in the foregoing step, the card identifier of each programming card is collected by a preset image collecting device, and when the step is executed, the method may include:
Collecting card identification codes of each programming card through the preset image collecting equipment;
and determining the corresponding card identification according to the card identification code.
Because in practical application, the identification program or the identification system of the programming card is compiled through the open-source third party software development kit, due to the defect of the development kit, the problem of code statement loss caused by overlapping identification is likely to occur in the identification process of a plurality of programming cards with the same card characteristics, for example, when the programming card A, the programming card B and the programming card C all represent the previous step and the scanning identification codes are the same, only two code statements of previous step may appear to be acquired when the card identification is acquired, namely, one code statement of previous step is lost. Therefore, in this embodiment, the identifier with the unique attribute is set for each scan identifier, so that it can be ensured that the code statement corresponding to each programming card can be determined in the identifying process, so that the identified code statement is ensured to avoid the problem of statement loss caused by overlapping identification, the identifying accuracy is improved, and the foundation is laid for the accuracy of the determining result of the subsequent integral execution instruction.
In the embodiment of the present invention, as shown in fig. 1-E, the identifying the action function instruction and the hierarchical relationship in the programming code information in the step S102 may specifically include:
s201, code sentences are obtained from programming code information, and the sequence of each code sentence is determined.
The sequence of the code sentences is determined based on the arrangement sequence of the programming cards.
In step S201, the order of determining the code sentences may be actually determined according to the arrangement order of the programming cards scanned by the preset image capturing apparatus. Specifically, when a user performs programming by using a programming card, a layout order is often preset to determine the order of code statements that need to be executed by the programmed execution instruction. Generally, in order to facilitate the cognition and learning of the user on the programming thinking so as to simulate the actual code compiling process, the vertical direction is often set as the arrangement direction of the programming cards, namely, the programming cards are arranged from top to bottom. Of course, in practical application, the arrangement direction of the programming cards may be arranged transversely, that is, from left to right, which is not limited in detail herein, and may be performed according to the actual arrangement rule of the programming cards. In addition, each programming card corresponds to one code sentence, and the arrangement sequence of the programming cards is determined, so that after the code sentence corresponding to each programming card is identified, the sequence among the code sentences is determined.
S202, determining the code type of each code statement according to the code statement.
Since the code statements include not only the code statements of the action but also the code statements that logically control the action, e.g., loop, judge, select, etc. Thus, after determining the code statements, it is also necessary to determine the code category of each code statement in order to subsequently make up the action function instruction based on the code category.
S203, forming the code sentences into action function instructions according to the code types and the sequence.
In this embodiment, the manner of combining the action function instructions may be to combine the action function instructions based on different kinds to form a single action, or the actions may be combined together according to the same kind. For example, the code word a may be an action class, the code word B may be a logic control class that controls the code word a, and the code word C may be an action class, all three of which are sequentially arranged in order. In this embodiment, the code statement a and the code statement B may be formed into one action function instruction, and the code statement C may be formed into another action function instruction alone.
S204, determining the hierarchical relation of the action function instruction according to the endpoint distance of the programming card corresponding to the preset code statement in the action function instruction.
The end point distance is used for representing the offset distance between the programming card and the preset end point of the alignment direction in the programming card group.
Because the user may have a possibility of nesting a plurality of action function instructions in the process of arranging the programming cards to obtain the programming card group, that is, a certain hierarchical relationship exists between the action function instructions, in this embodiment, the endpoint distance of the programming cards may be used as a basis for determining the hierarchical relationship between the action function instructions. The endpoint distance may be understood as a distance from each programmed card to an endpoint in a preset direction when the user arranges the programmed cards, for example, as shown in fig. 1-F, a left dashed line 1000 may be set as a preset endpoint, and the endpoint distance is a distance S from each programmed card to the dashed line 100.
In this way, the end point distance can be used as the basis for representing the hierarchical relation of the action function instruction, so that the user can be ensured to intentionally adjust the end point distance of the programming card in order to realize the hierarchical relation, and the user can train programming thinking in the process of arranging the programming card.
In addition, since the action function instruction may include a plurality of code statements, in order to avoid a situation that the distance between a plurality of endpoints affects the accuracy of determining the hierarchical relationship, in this embodiment, a specific code statement is selected as a preset code statement, and the hierarchical relationship of the action function instruction is determined by using the distance between endpoints of a programming card corresponding to the preset code statement.
In an optional embodiment, in the foregoing step S204, determining the hierarchical relationship of the action function instruction according to the endpoint distance of the programming card corresponding to the preset code statement in the action function instruction may include:
First, determining a first code statement as the preset code statement in the action function instruction, wherein the first code statement is the first instruction in the action function instruction. Since the code sentences are identified based on the programming cards, and the order of arrangement of the programming cards can also be determined when the programming code information is acquired, it is possible to determine which code sentence is the first sentence, i.e., the first code sentence, actually at the time of composing the action function instruction.
And then, determining a corresponding target programming card according to the first code statement, and acquiring the endpoint distance of the target programming card. In the process of composing the action function instruction, the arrangement mode of the programming card is arranged corresponding to the mode of actual code programming, that is to say, the endpoint distance of the programming card can embody the action function instruction hierarchical relation of the corresponding code statement. Therefore, in this step, it is necessary to determine which programming card is the one that is specifically corresponding to the current first code sentence, that is, to determine the target programming card.
And finally, determining the execution level of the action function instruction according to the endpoint distance of the target programming card.
Since the first code statement is the first code statement which is arranged in sequence in the action function instruction to which the first code statement belongs, that is to say, the hierarchical relationship of the code statement can represent the hierarchical relationship of the whole action function instruction, the execution hierarchy of the action function instruction can be determined through the endpoint distance of the target programming card. It should be noted that, when the action function instruction includes only one code statement, the code statement is the first code statement.
Therefore, the hierarchical relation of the action function instruction can be represented by the first code statement, and the target programming card corresponding to the first code statement is actually the first programming card in the sequence according to the arrangement time in the plurality of programming cards corresponding to the action function instruction, so that the endpoint distance of the first programming card corresponding to each action function instruction is ensured to be controlled if the logic of the programming card group can be identified by a user, the position of the programming card can be adjusted as far as possible according to the endpoint distance of the programming card when the user uses the programming card, the arrangement form of the combined programming card group comprises a plurality of target programming cards with different endpoint distances, and the arrangement form of the combined programming card group is more similar to the real code compiling distribution form, so that the user trains the programming logic when using the programming card.
In an alternative embodiment, the end point distance of the programming card is inversely related to the hierarchical relationship of the action function instructions.
In the foregoing step, determining the execution level of the action function instruction according to the endpoint distance of the target programming card includes:
And when the distance between the first end point and the second end point is larger than the distance between the first end point and the second end point, determining the target action function instruction as a sub-level instruction nested by the preamble action function instruction.
The first endpoint distance is the endpoint distance of a programming card corresponding to the first code statement of the target action function instruction, and the second endpoint distance is the endpoint distance of the programming card corresponding to the first code statement of the target action function instruction;
and when the distance between the first end point and the second end point is equal to the distance between the first end point and the second end point, determining the target action function instruction as the same-level instruction of the preamble action function instruction.
And when the first endpoint distance is smaller than the second endpoint distance, determining the target action function instruction as a parent level instruction of the preamble action function instruction.
Since the end point distance of the programming card is inversely related to the hierarchical relationship of the action function instruction, that is, the farther from the preset end point, the lower the hierarchical level representing the action function instruction, the hierarchical relationship can be determined by comparing the action function instruction (target action function instruction) which is currently required to determine the hierarchical relationship with the previous action function instruction (precursor action function instruction) connected with the action function instruction (target action function instruction) in the above manner when determining the hierarchical relationship of the action function instruction.
Specifically, as shown in fig. 1-G, where the action function command a corresponds to the programming card 1, the action function command B corresponds to the programming card 2, and the action function command C corresponds to the programming cards 3, 4, and 5, when the preset end point is the left dashed line 1000, and the sequence is the arrow direction, that is, the vertical downward direction, according to the method described in this embodiment, it can be determined that the end point distance S2 of the action function command B is greater than the end point distance S1 of the action function command a (that is, the first end point distance is greater than the second end point distance), so that the action function command B is a sub-level command in which the action function command a is nested; and the endpoint distance S3 of the action function command C is smaller than the endpoint distance S2 of the action function command B (i.e., the first endpoint distance is smaller than the second endpoint distance), it is indicated that the action function command C is a parent level command of the action function command B.
In an alternative embodiment, to better distinguish the code types of each programming code, in this embodiment, the code types may include behavior codes, logic function codes, and logic function parameter codes.
Wherein the behavior code is used for controlling the action of the target unit; the logic function code is used for controlling the logic of the target unit when executing the action, and the logic function parameter code is used for controlling the logic execution times of the target unit when executing the action.
Since each code statement corresponds to a programming card, i.e. the kind of code is determined based on the kind of said programming card, each code statement actually corresponds to a programming card. Specifically, the behavior codes correspond to behavior cards in the programming cards, the logic function codes correspond to logic cards in the programming cards, and the logic function parameter codes correspond to parameter cards in the programming cards.
Therefore, each programming card can identify the programming code of the corresponding category based on different categories, so that the user can compile the programming code based on the programming card, and meanwhile, the accurate identification of the cards of different categories can be realized based on the category distinction.
In an alternative embodiment, the foregoing step S203 forms the code statement into the action function instruction according to the code type and the sequence, and the action function instruction may be specifically executed:
and grouping the code sentences according to functions according to the code types and the sequences to obtain the action function instructions, wherein each action function instruction at least comprises one action code, and the code sentences in the action function instructions are executed according to the sequences.
When the instructions are grouped according to the code types and sequences, as each action function instruction at least comprises one action code, the action function instructions obtained later are all instructions with actual actions, the problem that the instruction identification is abnormal due to the fact that the logic function codes and the logic function parameter codes are independently formed into the action function instructions is avoided, and the accuracy of the identification effect of the subsequent execution instructions is ensured.
In an alternative embodiment, since the logic function code and the logic function parameter code may be grouped with the behavior code to form an action function instruction, in order to ensure control of the behavior code by the logic function parameter code and the logic function code, accuracy of the entire action function instruction is ensured. In the foregoing step, after grouping the code sentences according to functions according to the code types and the sequences to obtain the action function instruction, the foregoing method may further include:
detecting whether the logic function code exists in the action function instruction;
If yes, acquiring a logic function parameter code corresponding to the logic function code in the action function instruction;
Generating behavior execution logic according to the logic function code and the logic function parameter code;
And acquiring a behavior code corresponding to the execution logic in the action function instruction, and determining the action function instruction according to the execution logic and the behavior code.
In this embodiment, since the logic function parameter code is used as a code for assisting the logic function, for example, the number of cycles corresponding to the cycle code, and the problem that the instruction synthesis abnormality occurs is separately identified, the logic function parameter code and the logic function parameter code are combined and identified in this embodiment, thereby obtaining the corresponding execution logic. Therefore, the problem of abnormality in the synthesis of action function instructions in the identification process is avoided, and the user can learn the formation mode of execution logic by utilizing the combination of the parameter cards and the logic cards when compiling by utilizing the programming cards, so that programming thinking is exercised.
In an alternative embodiment, the logic function code includes at least one of a cyclic code, a judgment code, and a selection code based on a user's demand, where the cyclic code corresponds to a cyclic card of the logic cards, the judgment code corresponds to a judgment card of the logic cards, and the selection code corresponds to a selection card of the logic cards. Therefore, the types of logic function codes identifiable by the method in the embodiment are enriched based on the judgment card, the selection card and the circulation code, the judgment code and the selection code corresponding to the circulation card identification, and the method is beneficial for a user to learn logic among a plurality of different logic cards.
According to the method for displaying the programming codes, disclosed by the embodiment of the invention, for the problem that the displaying of the programming codes is influenced due to the fact that intelligent equipment is too dependent in the existing displaying process of the programming codes, the displaying function of the programming codes is realized by acquiring programming code information, determining an execution instruction according to the programming code information, acquiring scene information, and finally generating display information according to the execution instruction and the scene information. In the scheme, the programming code information is acquired from the programming card group through the preset image acquisition device, and the programming card group comprises at least one programming card, and each programming card at least represents one code statement, so that programming can be performed based on the programming card in the programming process of a user without using an intelligent device in the programming process, the problem that the intelligent device cannot be used in the programming process and then the programming code cannot be programmed is avoided, and then the influence on the programming code display is avoided. Meanwhile, the peeling between the programming process and the display process can be ensured in the display scheme, so that the moment for displaying the programming effect can be selected according to the requirement after the programming of the user is finished, the control of the display time of the programming code is realized, and the display effect of the programming code related by the invention has better controllability. In addition, in the display process, since the display information includes the control target unit to execute the execution instruction in the scene environment, and the scene environment is determined according to the scene information, the scene information is obtained based on the entity graph, so that the combination of the displayed effect and the entity graph is ensured, the interactivity of the scene environment is improved, the programming effect can be displayed by combining the actual graph under the condition that the user needs, and the user experience is improved.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention further provides a device for displaying programming codes, which is configured to implement the method shown in fig. 1. The embodiment of the device corresponds to the embodiment of the method, and for convenience of reading, details of the embodiment of the method are not repeated one by one, but it should be clear that the device in the embodiment can correspondingly realize all the details of the embodiment of the method. As shown in fig. 3, the apparatus includes: a first acquisition unit 21, a determination unit 22, a second acquisition unit 23, and a generation unit 24, wherein
A first obtaining unit 21, configured to obtain programming code information, where the programming code information is obtained from a programming card set through a preset image capturing device, where the programming card set includes at least one programming card, and the programming card at least characterizes one code sentence;
A determining unit 22 operable to determine an execution instruction according to the program code information acquired by the first acquiring unit 21, wherein the execution instruction is determined according to the code statement;
A second obtaining unit 23, configured to obtain scene information, where the scene information is obtained based on an entity graph;
the generating unit 24 may be configured to generate presentation information according to the execution instruction determined by the determining unit 22 and the scene information acquired by the second acquiring unit 23, where the presentation information includes a control target unit that executes the execution instruction in a scene environment determined according to the scene information.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the display method of the programming code capable of being automatically executed can be realized by adjusting the kernel parameters, so that the problem that the conventional display method excessively depends on intelligent equipment can be solved.
The embodiment of the invention provides a storage medium, on which a program is stored, which when executed by a processor, implements a method of exposing the programming code.
The embodiment of the invention provides a processor which is used for running a program, wherein the program executes a display method of programming codes.
The embodiment of the invention provides a device 30, as shown in fig. 3, comprising at least one processor 301, and at least one memory 302 and a bus 303 connected with the processor; wherein, the processor 301 and the memory 302 complete communication with each other through the bus 303; the processor 301 is configured to call the program instructions in the memory to execute the program code presentation method described above.
The smart device herein may be a PC, PAD, cell phone, etc.
The application also provides a computer program product adapted to perform, when executed on a flow management device, a program initialized with the method steps of: acquiring programming code information, wherein the programming code information is acquired from a programming card group through preset image acquisition equipment, the programming card group comprises at least one programming card, and the programming card at least represents one code statement; determining an execution instruction according to the programming code information, wherein the execution instruction is determined according to the code statement; acquiring scene information, wherein the scene information is obtained based on an entity graph; and generating display information according to the execution instruction and the scene information, wherein the display information comprises a control target unit, the execution instruction is executed in a scene environment, and the scene environment is determined according to the scene information.
Further, the determining the execution instruction according to the programming code information includes:
Determining action function instructions and a hierarchical relationship according to the programming code information, wherein the action function instructions are used for representing actions of the target units, the hierarchical relationship is used for representing logic among the action function instructions, the action function instructions are determined based on the programming cards, and the hierarchical relationship is determined based on the positions of the programming cards;
and constructing the execution instruction according to the action function instruction and the hierarchical relationship.
Further, the programming code information includes at least one code statement;
The determining the action function instruction and the hierarchical relation according to the programming code information comprises the following steps:
Determining an action function instruction corresponding to each code statement according to the programming code information and a preset instruction relationship, wherein the preset instruction relationship comprises a relationship between the code statement and the action function instruction.
Further, the determining the action function instruction and the hierarchical relationship according to the programming code information includes:
Determining an instruction position of each action function instruction according to the programming code information, wherein the instruction position is determined based on the position of the code statement;
And determining a hierarchical relationship of the action function instructions according to the instruction positions, wherein the hierarchical relationship is used for representing an execution sequence in the execution process of the action function instructions and/or an instruction nesting relationship among the action function instructions.
Further, the acquiring programming code information includes:
And scanning the programming card group through the preset image acquisition equipment to obtain a first scanning result, and generating the programming code information according to the first scanning result, wherein the programming card group is obtained by a user based on the programming card combination.
Further, the acquiring the scene information includes:
Determining a target scene according to a user input instruction, wherein the user input instruction is acquired based on a preset image interaction interface, and the graphical interaction interface comprises at least one scene option;
acquiring corresponding scene information from a cloud through the target scene;
Or alternatively
And scanning an entity graph through the preset image acquisition equipment to obtain a second scanning result, and generating the scene information according to the second scanning result, wherein the entity graph comprises a three-dimensional graph and a two-dimensional image.
Further, the display information comprises a display animation;
the generating the display information according to the execution instruction and the scene information includes:
determining a route and behavior operation of a target unit in the scene environment according to the execution instruction;
And controlling the target unit to act according to the route and executing the behavior operation to obtain the display animation.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable flow management device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable flow management device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, the device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (7)

1. A method for exposing programming code, comprising:
acquiring programming code information, wherein the programming code information is acquired from a programming card group through preset image acquisition equipment, the programming card group comprises at least one programming card, and the programming card at least represents one code statement;
determining an execution instruction according to the programming code information, wherein the execution instruction is determined according to the code statement;
acquiring scene information, wherein the scene information is obtained based on an entity graph;
generating display information according to the execution instruction and the scene information, wherein the display information comprises a control target unit for executing the execution instruction in a scene environment, and the scene environment is determined according to the scene information;
The determining an execution instruction according to the programming code information includes:
Determining action function instructions and a hierarchical relationship according to the programming code information, wherein the action function instructions are used for representing actions of the target units, the hierarchical relationship is used for representing logic among the action function instructions, the action function instructions are determined based on the programming cards, and the hierarchical relationship is determined based on the positions of the programming cards;
constructing the execution instruction according to the action function instruction and the hierarchical relationship;
the programming code information includes at least one code statement;
The determining the action function instruction and the hierarchical relation according to the programming code information comprises the following steps:
determining an action function instruction corresponding to each code statement according to the programming code information and a preset instruction relationship, wherein the preset instruction relationship comprises a relationship between the code statement and the action function instruction;
The acquiring programming code information includes:
And scanning the programming card group through the preset image acquisition equipment to obtain a first scanning result, and generating the programming code information according to the first scanning result, wherein the programming card group is obtained by a user based on the programming card combination.
2. The method of claim 1, wherein said determining action function instructions and hierarchical relationships from said programming code information comprises:
Determining an instruction position of each action function instruction according to the programming code information, wherein the instruction position is determined based on the position of the code statement;
And determining a hierarchical relationship of the action function instructions according to the instruction positions, wherein the hierarchical relationship is used for representing an execution sequence in the execution process of the action function instructions and/or an instruction nesting relationship among the action function instructions.
3. The method of claim 1, wherein the acquiring scene information comprises:
Determining a target scene according to a user input instruction, wherein the user input instruction is acquired based on a preset image interaction interface, and the graphical interaction interface comprises at least one scene option;
acquiring corresponding scene information from a cloud through the target scene;
Or alternatively
And scanning an entity graph through the preset image acquisition equipment to obtain a second scanning result, and generating the scene information according to the second scanning result, wherein the entity graph comprises a three-dimensional graph and a two-dimensional image.
4. A method according to any one of claims 1-3, wherein the presentation information comprises a presentation animation;
the generating the display information according to the execution instruction and the scene information includes:
determining a route and behavior operation of a target unit in the scene environment according to the execution instruction;
And controlling the target unit to act according to the route and executing the behavior operation to obtain the display animation.
5. A presentation device of programming code, wherein the device comprises the method of any one of claims 1-4:
The first acquisition unit is used for acquiring programming code information, wherein the programming code information is acquired from a programming card group through preset image acquisition equipment, the programming card group comprises at least one programming card, and the programming card at least represents one code statement;
A determining unit configured to determine an execution instruction according to the programming code information, where the execution instruction is determined according to the code statement;
The second acquisition unit is used for acquiring scene information, wherein the scene information is obtained based on the entity graph;
and the generating unit is used for generating display information according to the execution instruction and the scene information, wherein the display information comprises a control target unit for executing the execution instruction in a scene environment, and the scene environment is determined according to the scene information.
6. A storage medium comprising a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the method of exposing programming code of any one of claims 1 to 4.
7. An apparatus comprising at least one processor, and at least one memory, bus coupled to the processor; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke program instructions in the memory to perform the method of exposing programming code according to any of claims 1 to 4.
CN202110387633.2A 2021-04-10 2021-04-10 Program code display method and device Active CN113238758B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110387633.2A CN113238758B (en) 2021-04-10 2021-04-10 Program code display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110387633.2A CN113238758B (en) 2021-04-10 2021-04-10 Program code display method and device

Publications (2)

Publication Number Publication Date
CN113238758A CN113238758A (en) 2021-08-10
CN113238758B true CN113238758B (en) 2024-05-14

Family

ID=77127938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110387633.2A Active CN113238758B (en) 2021-04-10 2021-04-10 Program code display method and device

Country Status (1)

Country Link
CN (1) CN113238758B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5760788A (en) * 1995-07-28 1998-06-02 Microsoft Corporation Graphical programming system and method for enabling a person to learn text-based programming
WO2017066512A1 (en) * 2015-10-14 2017-04-20 Prime Software Systems, Inc. Visualizing the structure and execution of a program
CN108874383A (en) * 2018-05-28 2018-11-23 北京智象物联信息技术有限公司 Graphical programming method and programing system
CN112612463A (en) * 2020-12-30 2021-04-06 深圳市大富网络技术有限公司 Graphical programming control method, system and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10719303B2 (en) * 2015-06-07 2020-07-21 Apple Inc. Graphics engine and environment for encapsulating graphics libraries and hardware
US9679346B2 (en) * 2015-06-07 2017-06-13 Apple Inc. Graphics engine and environment for efficient real time rendering of graphics that are not pre-known

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5760788A (en) * 1995-07-28 1998-06-02 Microsoft Corporation Graphical programming system and method for enabling a person to learn text-based programming
WO2017066512A1 (en) * 2015-10-14 2017-04-20 Prime Software Systems, Inc. Visualizing the structure and execution of a program
CN108874383A (en) * 2018-05-28 2018-11-23 北京智象物联信息技术有限公司 Graphical programming method and programing system
CN112612463A (en) * 2020-12-30 2021-04-06 深圳市大富网络技术有限公司 Graphical programming control method, system and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
英国ScratchMaths课程项目评介;曾静;熊斌;;外国中小学教育(04);全文 *

Also Published As

Publication number Publication date
CN113238758A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
CN105047042B (en) It is a kind of towards children's material object programming method and system
CN105608258B (en) A kind of Model-based diagnosis and information flow visual simulation system and method
CN103092585A (en) Image library configuration design system for integrated supervision software
CN102915242A (en) Method for implementing code programming by graphical operations
KR20170078651A (en) Authoring tools for synthesizing hybrid slide-canvas presentations
CN108205960A (en) Method and apparatus, electron map manufacturing system and the navigation system that a kind of word renders
JP2020166292A (en) Programming learning program
CN103970518A (en) 3D rendering method and device for logic window
Konev et al. Run watchers: Automatic simulation-based decision support in flood management
CN111701246B (en) Decision configuration method and device for game AI
CN105117404B (en) Based on the chart display defect optimization method under subtype and data feature scene
CN106981084B (en) Method and device for drawing contour line
CN113238758B (en) Program code display method and device
CN111820922B (en) Evaluation method for calculating thinking for children
CN108582085B (en) Control command determination method and device and robot
CN113238757B (en) Method and device for identifying programming instruction
US10685470B2 (en) Generating and providing composition effect tutorials for creating and editing digital content
CN109816744B (en) Neural network-based two-dimensional special effect picture generation method and device
CN110321184B (en) Scene mapping method and computer storage medium
CN110347379A (en) Processing method, device and the storage medium of combined crowdsourcing topic
CN110515609A (en) Using generation method, device, equipment and storage medium
CN109949031A (en) A kind of machine learning model training method and device
CN110782525B (en) Method, device and medium for identifying virtual object in virtual environment
CN113391797A (en) Auxiliary programming method and related equipment
CN109799975B (en) Action game making method and system based on neural network

Legal Events

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