Graphical Real-World Block Programming Monitoring Method and System
By using a graphical, physical block programming monitoring method, errors in children's programming can be monitored and corrected in real time, solving the problem of error correction caused by children's limited comprehension ability and improving the efficiency and interest of programming learning.
Patent Information
- Application Number
- CN202411813791.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Children often make mistakes when doing block programming because of their limited comprehension, but they have poor error correction skills, which leads to learning difficulties.
A graphical real-world block programming monitoring method is adopted. By acquiring the outline features of the blocks and monitoring the programming process in real time, programming errors are identified and adjusted, and abnormal blocks are marked.
It enables real-time monitoring and error correction of children's programming, reduces the number of erroneous blocks, improves children's ability to correct programming errors independently, and maintains their interest in learning.
Smart Images

Figure CN119759333B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of children's programming, specifically to a graphical real block programming monitoring method and system. Background Technology
[0002] Computer programming is typically taught at the university level. Programming requires sophisticated equipment, making it unsuitable for widespread education, especially for children. Furthermore, programming can potentially harm children's eyesight and physical health. MIT, in response, designed the Scratch programming method for children. By abstracting program instructions into building blocks, it reduces the learning curve for children and protects their physical well-being. This method allows children to drag and drop blocks on a computer to create simple programs and run them directly.
[0003] However, due to children's limited comprehension, they are prone to making mistakes when doing block programming. Children have poor error correction ability and find it difficult to correct their mistakes on their own, which can easily cause problems for their learning. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a graphical real-world block programming monitoring method and system. This solution resolves the issue raised in the background that children's limited comprehension makes them prone to errors when programming with blocks, and their poor error correction ability makes it difficult for them to correct these errors themselves, which can easily hinder their learning.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] Graphical physical block programming monitoring methods include:
[0007] Obtain the outline features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks. During programming, combine variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks, and input instructions into the variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks. Variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks are collectively referred to as blocks.
[0008] Obtain at least one basic local structure for block programming, and pre-obtain test data and result data for the basic local structure, wherein the test data is input into the basic local structure to obtain the result data;
[0009] The programming process of block programming is monitored in real time to determine whether the block programming has completed the actual local structure. If not, no processing is performed. If so, the actual local structure completed by the block programming is obtained and the actual local structure is used as the feature local structure.
[0010] Identify the feature local structure, obtain the basic local structure with the same number of blocks as the feature local structure, and use it as the basic local structure to be identified. Calculate the overlap ratio between the feature local structure and the basic local structure to be identified.
[0011] The basic local structure to be identified with the largest overlap ratio is taken as a similar local structure of the feature local structure.
[0012] Obtain test data and result data of similar local structures as similar test data and similar result data;
[0013] Adjust the instructions input to the building blocks in the feature local structure to obtain the target local structure;
[0014] Input similar test data into the target local structure to obtain feature result data;
[0015] Compare the feature result data with similar result data. If they are consistent, the feature local structure is not abnormal; otherwise, the feature local structure is abnormal.
[0016] When an anomaly exists in the feature local structure, obtain the building blocks that are different from the same type of local structure in the feature local structure, mark the building blocks as abnormal building blocks, and send the abnormal building blocks to the user of the building block programming.
[0017] Preferably, obtaining the contour features of the variable block, condition block, loop block, operation block, and logical judgment block includes the following steps:
[0018] Coordinate modeling of the variable block is performed with the center of the variable block, and at least one sampling point is taken at equal intervals on the outline of the variable block;
[0019] Fit the coordinates of at least one sampling point to obtain the contour fitting function of the variable block, which serves as the contour feature of the variable block;
[0020] The same processing steps as for the variable blocks are applied to the condition blocks, loop blocks, operation blocks, and logic judgment blocks in sequence to obtain the outline features of the condition blocks, loop blocks, operation blocks, and logic judgment blocks.
[0021] Preferably, obtaining at least one basic local structure for block programming includes the following steps:
[0022] Obtain at least one programming goal from block programming;
[0023] For at least one programming target, a programming architecture is generated, and instructions are filled into the blocks that constitute the programming architecture to obtain a preliminary basic local structure. The block is one of the following: variable block, condition block, loop block, operation block, and logical judgment block.
[0024] Test the pre-prepared basic local structure to determine if it is functioning correctly. If it is, use the pre-prepared basic local structure as the basic local structure. If not, adjust the instructions of the blocks in the pre-prepared basic local structure until it functions correctly.
[0025] Preferably, the process of pre-acquiring test data and result data of the basic local structure includes the following steps:
[0026] Obtain test data for testing the basic local structure, input the test data into the basic local structure, and obtain the result data;
[0027] The test results are summarized to obtain the test data and result data of the basic local structure.
[0028] Preferably, determining whether the block programming has completed the actual local structure includes the following steps:
[0029] Obtain the starting block and ending block of the actual local structure. The starting block is the first block of the actual local structure, and the ending block is the last block of the actual local structure.
[0030] From at least one basic local structure, obtain at least one preset basic local structure, wherein the type of the starting block of the preset basic local structure is consistent with the type of the starting block of the actual local structure.
[0031] Determine whether the end block of the actual local structure is of the same type as the end block of one of the preset basic local structures. If not, determine that the block programming has not completed the actual local structure. If so, determine that the block programming has completed the actual local structure.
[0032] Preferably, obtaining the actual local structure after block programming includes the following steps:
[0033] Obtain the previous actual local structure after the block programming is completed, and take all blocks after the previous actual local structure as the actual local structure after the block programming is completed.
[0034] Preferably, the calculation of the overlap ratio between the local structure of the feature and the basic local structure to be identified includes the following steps:
[0035] Number the building blocks in the feature local structure sequentially, and number the building blocks of the basic local structure to be identified sequentially.
[0036] Determine whether the feature local structure is consistent with the outline features of the block with the same number in the basic local structure to be identified. If so, increment the feature count by one; otherwise, do not perform any processing. The initial value of the feature count is 0.
[0037] The ratio of the feature count to the total number of blocks in the feature local structure is used as the overlap ratio between the feature local structure and the basic local structure to be identified.
[0038] Preferably, adjusting the instructions input to the building blocks in the feature local structure to obtain the target local structure includes the following steps:
[0039] Number the building blocks in the characteristic local structure, and number the building blocks in the same type of local structure;
[0040] Replace the block instruction with the same number in the feature local structure with the instruction of the block in the same local structure.
[0041] Preferably, the step of obtaining blocks that differ from similar local structures in the feature local structure includes the following steps:
[0042] Compare the contour features of the featured local structure with those of the same numbered blocks in the same type of local structure;
[0043] Blocks with different contour features are considered as blocks that are different from the same type of local structure in the feature local structure.
[0044] A graphical physical block programming monitoring system is used to implement the above-mentioned graphical physical block programming monitoring method, including:
[0045] The contour acquisition module acquires the contour features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks.
[0046] A local structure acquisition module acquires at least one basic local structure of block programming and pre-acquires test data and result data of the basic local structure.
[0047] The real-time monitoring module monitors the programming process of block programming in real time and determines whether the block programming has completed the actual local structure.
[0048] The structure recognition module identifies the feature local structure and calculates the overlap ratio between the feature local structure and the basic local structure to be identified.
[0049] The data acquisition module takes the basic local structure to be identified with the largest overlap ratio as the same type of local structure as the feature local structure, and acquires the test data and result data of the same type of local structure as the same type of test data and result data.
[0050] An instruction adjustment module adjusts the instructions input to the building blocks in the feature local structure to obtain the target local structure;
[0051] An input module, which inputs similar test data into the target local structure to obtain feature result data;
[0052] The comparison module compares whether the feature result data is consistent with similar result data;
[0053] An anomaly marking module, wherein the anomaly marking module marks blocks as anomalies.
[0054] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0055] By setting up a structure recognition module, a data acquisition module, an instruction adjustment module, and a comparison module, the system can monitor the children's block programming process in real time. It performs a check at each partial completion stage of programming, thereby promptly identifying programming errors and marking the blocks with errors. Because the marking is done on blocks at partial completion stages, the number of blocks involved is small, making programming easier to correct. Children can correct programming errors based on the markings on the incorrect blocks, thus achieving self-correction and maintaining their interest in learning. Attached Figure Description
[0056] Figure 1 This is a schematic diagram of the graphical physical block programming monitoring method of the present invention;
[0057] Figure 2 This is a schematic diagram illustrating the outline features of the variable block, condition block, loop block, operation block, and logic judgment block of the present invention.
[0058] Figure 3 This is a schematic diagram of the process for obtaining at least one basic local structure of block programming according to the present invention.
[0059] Figure 4 This is a schematic diagram of the process for obtaining test data and result data of the basic local structure in advance according to the present invention;
[0060] Figure 5 This is a schematic diagram illustrating the process of determining whether the block programming has completed the actual local structure according to the present invention.
[0061] Figure 6 This is a schematic diagram illustrating the overlap ratio between the computational feature local structure and the basic local structure to be identified in this invention.
[0062] Figure 7 To adjust the instructions for inputting building blocks in the feature local structure according to the present invention, a schematic diagram of the target local structure flow is obtained;
[0063] Figure 8 This is a schematic diagram of the process for obtaining building blocks that are different from similar local structures in the feature local structure of the present invention. Detailed Implementation
[0064] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0065] Reference Figure 1 As shown, the graphical real-world block programming monitoring method includes:
[0066] Obtain the outline features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks. During programming, combine variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks, and input instructions into the variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks. Variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks are collectively referred to as blocks.
[0067] Obtain at least one basic local structure for block programming, and pre-obtain test data and result data for the basic local structure, wherein the test data is input into the basic local structure to obtain the result data;
[0068] The programming process of block programming is monitored in real time to determine whether the block programming has completed the actual local structure. If not, no processing is performed. If so, the actual local structure completed by the block programming is obtained and the actual local structure is used as the feature local structure.
[0069] In the process of block programming, actual local structures are continuously generated. After each actual local structure is completed, a new actual local structure is generated. During the generation of new actual local structures, a judgment is made to determine whether the block programming has completed the actual local structure. Since each actual local structure has a small number of blocks, it is easy to correct errors.
[0070] Identify the feature local structure, obtain the basic local structure with the same number of blocks as the feature local structure, and use it as the basic local structure to be identified. Calculate the overlap ratio between the feature local structure and the basic local structure to be identified.
[0071] The basic local structure to be identified with the largest overlap ratio is taken as a similar local structure of the feature local structure.
[0072] Obtain test data and result data of similar local structures as similar test data and similar result data;
[0073] Adjust the instructions input to the building blocks in the feature local structure to obtain the target local structure;
[0074] Input similar test data into the target local structure to obtain feature result data;
[0075] Compare the feature result data with similar result data. If they are consistent, the feature local structure is not abnormal; otherwise, the feature local structure is abnormal.
[0076] When an anomaly exists in the feature local structure, obtain the building blocks that are different from the same type of local structure in the feature local structure, mark the building blocks as abnormal building blocks, and send the abnormal building blocks to the user of the building block programming.
[0077] Reference Figure 2 As shown, obtaining the outline features of variable blocks, condition blocks, loop blocks, operation blocks, and logical judgment blocks includes the following steps:
[0078] Coordinate modeling of the variable block is performed with the center of the variable block, and at least one sampling point is taken at equal intervals on the outline of the variable block;
[0079] Fit the coordinates of at least one sampling point to obtain the contour fitting function of the variable block, which serves as the contour feature of the variable block;
[0080] The same processing steps as for the variable block are applied to the condition block, loop block, operation block, and logic judgment block in sequence to obtain the outline features of the condition block, loop block, operation block, and logic judgment block.
[0081] Using the contour fitting functions of variable blocks, condition blocks, loop blocks, operation blocks, and logical judgment blocks as contour features, the block type can be determined by using the contour fitting functions. The difference between the contour fitting functions of two blocks is calculated and integrated over their domains to obtain the judgment value. When the two blocks are of the same type, their contours are consistent, so the judgment value is 0, and the two blocks are of the same type; otherwise, the two blocks are of different types.
[0082] Reference Figure 3 As shown, obtaining at least one basic local structure in block programming includes the following steps:
[0083] Obtain at least one programming goal from block programming;
[0084] For at least one programming target, a programming architecture is generated, and instructions are filled into the blocks that constitute the programming architecture to obtain a preliminary basic local structure. The block is one of the following: variable block, condition block, loop block, operation block, and logical judgment block.
[0085] Test the pre-prepared basic local structure to determine if it is functioning correctly. If it is, use the pre-prepared basic local structure as the basic local structure. If not, adjust the instructions of the blocks in the pre-prepared basic local structure until it functions correctly.
[0086] Since it is children's programming, it uses basic programming languages, and the programming objectives that can be achieved are limited to a few. Therefore, its programming architecture can be composed of at least one basic local structure, and the actual local structure in the programming process is one of at least one basic local structure.
[0087] Reference Figure 4 As shown, the steps for obtaining test data and result data of the basic local structure in advance include:
[0088] Obtain test data for testing the basic local structure, input the test data into the basic local structure, and obtain the result data;
[0089] Summarize the test results to obtain the test data and result data of the basic local structure;
[0090] Test data and result data of basic local structures are used to test whether the characteristic local structures are abnormal.
[0091] Reference Figure 5 As shown, determining whether block programming has completed the actual local structure includes the following steps:
[0092] Obtain the starting block and ending block of the actual local structure. The starting block is the first block of the actual local structure, and the ending block is the last block of the actual local structure.
[0093] From at least one basic local structure, obtain at least one preset basic local structure, wherein the type of the starting block of the preset basic local structure is consistent with the type of the starting block of the actual local structure.
[0094] Determine whether the end block of the actual local structure is consistent with the type of the end block of one of the preset basic local structures. If not, determine that the block programming has not completed the actual local structure. If so, determine that the block programming has completed the actual local structure.
[0095] Since there are only a limited number of beginning and end blocks of the basic local structure, the actual local structure can be considered to have completed programming when the end block of the actual local structure matches the end block of one of the preset basic local structures.
[0096] Obtaining the actual local structure of the completed block programming involves the following steps:
[0097] Obtain the previous actual local structure after the block programming is completed, and take all blocks after the previous actual local structure as the actual local structure after the block programming is completed.
[0098] Reference Figure 6 As shown, calculating the overlap ratio between the feature local structure and the basic local structure to be identified includes the following steps:
[0099] Number the building blocks in the feature local structure sequentially, and number the building blocks of the basic local structure to be identified sequentially.
[0100] Determine whether the feature local structure is consistent with the outline features of the block with the same number in the basic local structure to be identified. If so, increment the feature count by one; otherwise, do not perform any processing. The initial value of the feature count is 0.
[0101] The ratio of the feature count to the total number of blocks in the feature local structure is taken as the overlap ratio between the feature local structure and the basic local structure to be identified.
[0102] Because the feature local structure may contain errors, its overlap ratio with the basic local structure to be identified may not be consistent. Therefore, the basic local structure to be identified with the largest overlap ratio is calculated and obtained as a local structure of the same type as the feature local structure.
[0103] Reference Figure 7 As shown, adjusting the instructions input into the building blocks of the feature local structure to obtain the target local structure includes the following steps:
[0104] Number the building blocks in the characteristic local structure, and number the building blocks in the same type of local structure;
[0105] Replace the block instruction with the same number in the feature local structure with the instruction of the block in the same local structure.
[0106] The structure of a feature local structure is consistent with that of a similar local structure, meaning that the types and order of the building blocks used are the same. However, the instructions input into the building blocks may be different. For example, when performing addition, inputting 1+1 or 1+2 is different. These instructions will affect the anomaly detection of the feature local structure. Therefore, all instructions in the feature local structure are converted into instructions at the corresponding positions in the similar local structure. In this way, test data and result data of the similar local structure can be used to test whether the feature local structure is abnormal.
[0107] Reference Figure 8 As shown, obtaining building blocks that differ from similar local structures in a feature local structure includes the following steps:
[0108] Compare the contour features of the featured local structure with those of the same numbered blocks in the same type of local structure;
[0109] Blocks with different contour features are considered as blocks that are different from the same type of local structure in the feature local structure;
[0110] Blocks that differ from similar local structures in a feature's local structure are considered abnormal blocks, and users need to adjust these abnormal blocks.
[0111] A graphical physical block programming monitoring system is used to implement the above-mentioned graphical physical block programming monitoring method, including:
[0112] The contour acquisition module acquires the contour features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks.
[0113] A local structure acquisition module acquires at least one basic local structure of block programming and pre-acquires test data and result data of the basic local structure.
[0114] The real-time monitoring module monitors the programming process of block programming in real time and determines whether the block programming has completed the actual local structure.
[0115] The structure recognition module identifies the feature local structure and calculates the overlap ratio between the feature local structure and the basic local structure to be identified.
[0116] The data acquisition module takes the basic local structure to be identified with the largest overlap ratio as the same type of local structure as the feature local structure, and acquires the test data and result data of the same type of local structure as the same type of test data and result data.
[0117] An instruction adjustment module adjusts the instructions input to the building blocks in the feature local structure to obtain the target local structure;
[0118] An input module, which inputs similar test data into the target local structure to obtain feature result data;
[0119] The comparison module compares whether the feature result data is consistent with similar result data;
[0120] An anomaly marking module, wherein the anomaly marking module marks blocks as anomalies.
[0121] The working process of the above-mentioned graphical physical block programming monitoring system is as follows:
[0122] Step 1: The contour acquisition module acquires the contour features of the variable block, condition block, loop block, operation block, and logic judgment block;
[0123] Step 2: The local structure acquisition module acquires at least one basic local structure for block programming, and pre-acquires test data and result data of the basic local structure;
[0124] Step 3: The real-time monitoring module monitors the programming process of block programming in real time and determines whether the block programming has completed the actual local structure. If not, no processing is performed. If so, the actual local structure completed by the block programming is obtained and used as the feature local structure.
[0125] Step 4: The structure recognition module identifies the feature local structure and obtains the basic local structure with the same number of blocks as the feature local structure as the basic local structure to be identified. The structure recognition module calculates the overlap ratio between the feature local structure and the basic local structure to be identified.
[0126] Step 5: The data acquisition module selects the basic local structure to be identified with the largest overlap ratio as the same type of local structure as the feature local structure;
[0127] Step Six: The data acquisition module acquires test data and result data of similar local structures, which are used as similar test data and similar result data;
[0128] Step 7: The instruction adjustment module adjusts the instructions input into the building blocks of the feature local structure to obtain the target local structure;
[0129] Step 8: The input module inputs similar test data into the target local structure to obtain feature result data;
[0130] Step 9: The comparison module compares the feature result data with similar result data. If they are consistent, the feature local structure is not abnormal; otherwise, the feature local structure is abnormal.
[0131] Step 10: When there is an anomaly in the feature local structure, the anomaly marking module obtains the building blocks in the feature local structure that are different from the same type of local structure, marks the building blocks as an anomaly building block, and sends the anomaly building block to the user of the building block programming.
[0132] Furthermore, this solution also proposes a storage medium on which a computer-readable program is stored, which, when invoked, executes the aforementioned graphical physical block programming monitoring method.
[0133] It is understandable that the storage medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; an optical medium, such as a DVD; or a semiconductor medium, such as a solid-state drive (SSD).
[0134] In summary, the advantages of this invention are as follows: by setting up a structure recognition module, a data acquisition module, an instruction adjustment module, and a comparison module, real-time monitoring can be performed during the children's block programming process. A check is performed at each partial completion stage of programming, thereby promptly identifying programming errors and marking the blocks with errors. Because the marking is done on blocks at partial completion stages, the number of blocks involved is small, making error correction easier. Children can correct programming errors based on the markings of the incorrect blocks, thus achieving self-correction and maintaining their interest in learning.
[0135] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A graphical method for monitoring and programming physical blocks, characterized in that, include: Obtain the outline features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks. During programming, combine variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks, and input instructions into the variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks. Variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks are collectively referred to as blocks. Obtain at least one basic local structure for block programming, and pre-obtain test data and result data for the basic local structure, wherein the test data is input into the basic local structure to obtain the result data; The programming process of block programming is monitored in real time to determine whether the block programming has completed the actual local structure. If not, no processing is performed. If so, the actual local structure completed by the block programming is obtained and the actual local structure is used as the feature local structure. Identify the feature local structure, obtain the basic local structure with the same number of blocks as the feature local structure, and use it as the basic local structure to be identified. Calculate the overlap ratio between the feature local structure and the basic local structure to be identified. The basic local structure to be identified with the largest overlap ratio is taken as a similar local structure of the feature local structure. Obtain test data and result data of similar local structures as similar test data and similar result data; Adjust the instructions input to the building blocks in the feature local structure to obtain the target local structure; Input similar test data into the target local structure to obtain feature result data; Compare the feature result data with similar result data. If they are consistent, the feature local structure is not abnormal; otherwise, the feature local structure is abnormal. When an anomaly exists in the feature local structure, obtain the building blocks that are different from the same type of local structure in the feature local structure, mark the building blocks as abnormal building blocks, and send the abnormal building blocks to the user of the building block programming.
2. The graphical physical block programming monitoring method according to claim 1, characterized in that, The steps to obtain the outline features of the variable block, condition block, loop block, operation block, and logical judgment block include the following: Coordinate modeling of the variable block is performed with the center of the variable block, and at least one sampling point is taken at equal intervals on the outline of the variable block; Fit the coordinates of at least one sampling point to obtain the contour fitting function of the variable block, which serves as the contour feature of the variable block; The same processing steps as for the variable blocks are applied to the condition blocks, loop blocks, operation blocks, and logic judgment blocks in sequence to obtain the outline features of the condition blocks, loop blocks, operation blocks, and logic judgment blocks.
3. The graphical physical block programming monitoring method according to claim 2, characterized in that, The process of obtaining at least one basic local structure for block programming includes the following steps: Obtain at least one programming goal from block programming; For at least one programming target, a programming architecture is generated, and instructions are filled into the blocks that constitute the programming architecture to obtain a preliminary basic local structure. The block is one of the following: variable block, condition block, loop block, operation block, and logical judgment block. Test the pre-prepared basic local structure to determine if it is functioning correctly. If it is, use the pre-prepared basic local structure as the basic local structure. If not, adjust the instructions of the blocks in the pre-prepared basic local structure until it functions correctly.
4. The graphical physical block programming monitoring method according to claim 3, characterized in that, The process of pre-acquiring test data and result data of the basic local structure includes the following steps: Obtain test data for testing the basic local structure, input the test data into the basic local structure, and obtain the result data; The test results are summarized to obtain the test data and result data of the basic local structure.
5. The graphical physical block programming monitoring method according to claim 4, characterized in that, The process of determining whether block programming has completed the actual local structure includes the following steps: Obtain the starting block and ending block of the actual local structure. The starting block is the first block of the actual local structure, and the ending block is the last block of the actual local structure. From at least one basic local structure, obtain at least one preset basic local structure, wherein the type of the starting block of the preset basic local structure is consistent with the type of the starting block of the actual local structure. Determine whether the end block of the actual local structure is of the same type as the end block of one of the preset basic local structures. If not, determine that the block programming has not completed the actual local structure. If so, determine that the block programming has completed the actual local structure.
6. The graphical physical block programming monitoring method according to claim 5, characterized in that, The process of obtaining the actual local structure after block programming includes the following steps: Obtain the previous actual local structure after the block programming is completed, and take all blocks after the previous actual local structure as the actual local structure after the block programming is completed.
7. The graphical physical block programming monitoring method according to claim 6, characterized in that, The calculation of the overlap ratio between the local structure of the feature and the basic local structure to be identified includes the following steps: Number the building blocks in the feature local structure sequentially, and number the building blocks of the basic local structure to be identified sequentially. Determine whether the feature local structure is consistent with the outline features of the block with the same number in the basic local structure to be identified. If so, increment the feature count by one; otherwise, do not perform any processing. The initial value of the feature count is 0. The ratio of the feature count to the total number of blocks in the feature local structure is used as the overlap ratio between the feature local structure and the basic local structure to be identified.
8. The graphical physical block programming monitoring method according to claim 7, characterized in that, The process of adjusting the instructions input to the building blocks in the feature local structure to obtain the target local structure includes the following steps: Number the building blocks in the characteristic local structure, and number the building blocks in the same type of local structure; Replace the block instruction with the same number in the feature local structure with the instruction of the block in the same local structure.
9. The graphical physical block programming monitoring method according to claim 8, characterized in that, The process of obtaining building blocks that differ from similar local structures in the feature local structure includes the following steps: Compare the contour features of the featured local structure with those of the same numbered blocks in the same type of local structure; Blocks with different contour features are considered as blocks that are different from the same type of local structure in the feature local structure.
10. A graphical solid block programming monitoring system, used to implement the graphical solid block programming monitoring method as described in any one of claims 1-9, characterized in that, include: The contour acquisition module acquires the contour features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks. A local structure acquisition module acquires at least one basic local structure of block programming and pre-acquires test data and result data of the basic local structure. The real-time monitoring module monitors the programming process of block programming in real time and determines whether the block programming has completed the actual local structure. The structure recognition module identifies the feature local structure and calculates the overlap ratio between the feature local structure and the basic local structure to be identified. The data acquisition module takes the basic local structure to be identified with the largest overlap ratio as the same type of local structure as the feature local structure, and acquires the test data and result data of the same type of local structure as the same type of test data and result data. An instruction adjustment module adjusts the instructions input to the building blocks in the feature local structure to obtain the target local structure; An input module, which inputs similar test data into the target local structure to obtain feature result data; The comparison module compares whether the feature result data is consistent with similar result data; An anomaly marking module, wherein the anomaly marking module marks blocks as anomalies.
Citation Information
Patent Citations
Graphical programming system and graphical programming method
CN105893060A
Method and device for assisting children in intelligent programming and computer storage medium
CN116824466A