Image entity building block programming monitoring method and system
Through the imaged solid block programming monitoring method, real-time monitoring and identification of abnormalities in children's programming and labeling error building blocks, the problem of children's programming error correction is solved, and the ease of use and learning interest of programming is improved.
Patent Information
- Application Number
- CN202411813791.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Children are prone to errors due to their limited understanding ability when programming building blocks, but their error correction ability is poor, which leads to learning difficulties.
Through the imaged solid block programming monitoring method, we can monitor and identify abnormalities in the programming process in real time, mark error blocks, provide error correction guidance, and help children to make independent corrections.
Effectively discover and correct programming errors, reduce the number of error-corrected building blocks, and improve the ease of programming and interest in learning.
Smart Images

Figure CN119759333A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of children's programming, and in particular to a method and system for monitoring graphical physical building block programming. Background Art
[0002] Computer programming is generally taught and learned at the university level. Programming learning has high requirements for equipment and is not suitable for popular programming education. Programming learning is especially difficult for children to accept. At the same time, programming learning is also likely to cause damage to children's eyesight and body. The Massachusetts Institute of Technology in the United States has designed the Scratch programming method for children's programming. By abstracting program instructions into building blocks, the cost of children's learning can be reduced and their physical health can be protected. This method allows children to drag building blocks on the computer to write simple programs and run them directly.
[0003] However, due to children's limited understanding ability, mistakes are easy to occur when doing building block programming. However, children have poor error correction ability and it is difficult for them to correct them by themselves, which can easily cause trouble for their learning. Summary of the invention
[0004] In order to solve the above technical problems, a graphical physical building block programming monitoring method and system are provided. This technical solution solves the problem raised in the above background technology that due to children's limited understanding ability, errors are prone to occur when performing building block programming, but children have poor error correction ability and it is difficult for them to correct them by themselves, which easily causes trouble to their learning.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0006] The graphical physical building block programming monitoring method includes:
[0007] Obtaining the outline features of variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks; combining the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks during programming; and inputting instructions into the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks, wherein the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks are collectively referred to as blocks;
[0008] Acquire at least one basic local structure of building block programming, and pre-acquire test data and result data of 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 the building block programming is monitored in real time to determine whether the building block programming has completed the actual local structure. If not, no processing is performed. If yes, the actual local structure completed by the building block programming is obtained and the actual local structure is used as the characteristic local structure.
[0010] Identify the characteristic local structure, obtain a basic local structure with the same number of building blocks as the characteristic local structure as the basic local structure to be identified, and calculate the overlap ratio between the characteristic local structure and the basic local structure to be identified;
[0011] The basic local structure to be identified with the largest overlap ratio is regarded as the local structure of the same type as the characteristic local structure;
[0012] Acquire test data and result data of similar local structures as similar test data and similar result data;
[0013] Adjust the instructions of the building blocks input in the characteristic local structure to obtain the target local structure;
[0014] Input similar test data into the target local structure to obtain characteristic result data;
[0015] Compare the characteristic result data with similar result data to see if they are consistent. If so, there is no abnormality in the characteristic local structure. If not, there is an abnormality in the characteristic local structure.
[0016] When an abnormality exists in a characteristic local structure, a building block different from a similar local structure in the characteristic local structure is obtained, the building block is marked as an abnormal building block, and the abnormal building block is transmitted to a user of building block programming.
[0017] Preferably, the step of obtaining the outline features of the variable building block, the conditional building block, the loop building block, the operation building block and the logic judgment building block comprises the following steps:
[0018] Coordinate modeling of the variable block is performed based on 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] Fitting the coordinates of at least one sampling point to obtain a contour fitting function of the variable building block as a contour feature of the variable building block;
[0020] The same processing steps as the variable blocks are sequentially taken for the conditional blocks, loop blocks, operation blocks and logic judgment blocks to obtain the contour features of the conditional blocks, the contour features of the loop blocks, the contour features of the operation blocks and the contour features of the logic judgment blocks.
[0021] Preferably, the step of obtaining at least one basic local structure of building block programming comprises the following steps:
[0022] Obtain at least one programming goal of building block programming;
[0023] Generate a programming framework for at least one programming target, and fill instructions into building blocks constituting the programming framework to obtain a preliminary basic local structure, wherein the building block is one of a variable building block, a condition building block, a loop building block, an operation building block, and a logic judgment building block;
[0024] The prepared basic local structure is tested to determine whether the prepared basic local structure operates normally. If so, the prepared basic local structure is used as the basic local structure. If not, the instructions of the building blocks in the prepared basic local structure are adjusted until the prepared basic local structure operates normally.
[0025] Preferably, the step of pre-acquiring the test data and result data of the basic local structure comprises the following steps:
[0026] Acquire test data for testing the basic local structure, input the test data into the basic local structure, and obtain result data;
[0027] Summarize the test results to obtain the test data and result data of the basic local structure.
[0028] Preferably, the step of determining whether the block programming has completed the actual local structure comprises the following steps:
[0029] Obtain the start block and the end block of the actual local structure, where the start block is the first block of the actual local structure and the end block is the last block of the actual local structure;
[0030] Acquire at least one preset basic local structure from at least one basic local structure, wherein a starting building block of the preset basic local structure is consistent with a starting building block type of the actual local structure;
[0031] It is determined 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, it is determined that the block programming has not completed the actual local structure. If so, it is determined that the block programming has completed the actual local structure.
[0032] Preferably, the step of obtaining the actual local structure completed by the building block programming comprises the following steps:
[0033] The last actual local structure completed by building block programming is obtained, and all building blocks after the last actual local structure are used as the actual local structure completed by building block programming.
[0034] Preferably, the calculation of the overlap ratio between the characteristic local structure and the basic local structure to be identified comprises the following steps:
[0035] The building blocks in the characteristic local structure are numbered sequentially, and the building blocks of the basic local structure to be identified are numbered sequentially;
[0036] Determine whether the feature local structure is consistent with the contour features of the building blocks with the same number in the basic local structure to be identified. If so, the feature count is increased by one. If not, no processing is performed, wherein the initial value of the feature count is 0;
[0037] The ratio of the feature count to the total number of building blocks in the feature local structure is taken as the overlap ratio of the feature local structure to the basic local structure to be identified.
[0038] Preferably, the step of adjusting the input instructions of the building blocks in the characteristic local structure to obtain the target local structure comprises the following steps:
[0039] Number the building blocks in the characteristic local structure, and number the building blocks in the same local structure;
[0040] Replace the instructions of the building blocks with the same number in the characteristic local structure with the instructions of the building blocks in the same local structure.
[0041] Preferably, the step of obtaining building blocks in the characteristic local structure that are different from similar local structures comprises the following steps:
[0042] Compare the contour features of the characteristic local structure with the building blocks with the same number in the same local structure;
[0043] The blocks with different contour features are regarded as blocks different from the same local structures in the characteristic local structure.
[0044] The graphical real-life building block programming monitoring system is used to implement the graphical real-life building block programming monitoring method, including:
[0045] A contour acquisition module, wherein the contour acquisition module acquires contour features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks;
[0046] A local structure acquisition module, the local structure acquisition module acquires at least one basic local structure of building block programming, and acquires test data and result data of the basic local structure in advance;
[0047] A real-time monitoring module, which monitors the programming process of the building block programming in real time to determine whether the building block programming has completed the actual local structure;
[0048] A structure recognition module, wherein the structure recognition module recognizes the characteristic local structure and calculates the overlap ratio between the characteristic local structure and the basic local structure to be recognized;
[0049] A data acquisition module, wherein the data acquisition module uses the basic local structure to be identified with the largest overlap ratio as a local structure of the same type as the characteristic local structure, and acquires test data and result data of the local structure of the same type as test data and result data of the same type;
[0050] An instruction adjustment module, which adjusts the instructions input by the building blocks in the characteristic local structure to obtain a target local structure;
[0051] An input module, wherein the input module inputs similar test data into the target local structure to obtain characteristic result data;
[0052] A comparison module, wherein the comparison module compares the characteristic result data with similar result data to see whether they are consistent;
[0053] An abnormal marking module, wherein the abnormal marking module marks a building block as an abnormal building block.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] By setting up a structure recognition module, a data acquisition module, an instruction adjustment module and a comparison module, the process of children's building block programming can be monitored in real time, and a detection can be completed in each partial completion stage of programming, so as to timely discover programming errors in children's programming and mark the building blocks with programming errors. Since the building blocks in the partial completion stage are marked, the number of building blocks involved is small, and programming errors are easy to correct. Children can correct programming errors according to the marks of the erroneous building blocks, thereby completing autonomous correction and ensuring their interest in learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of the method for monitoring the programming of the image-based physical building blocks of the present invention;
[0057] Figure 2 A schematic diagram of the outline feature flow of obtaining variable blocks, condition blocks, loop blocks, operation blocks and logic judgment blocks of the present invention;
[0058] Figure 3 A schematic diagram of at least one basic local structure flow chart for acquiring building block programming of the present invention;
[0059] Figure 4 A schematic diagram of a flow chart of pre-acquiring test data and result data of a basic local structure according to the present invention;
[0060] Figure 5 It is a schematic diagram of the actual local structure flow of judging whether the block programming of the present invention has completed;
[0061] Figure 6 It is a schematic diagram of a flow chart of calculating the overlap ratio of a characteristic local structure and a basic local structure to be identified according to the present invention;
[0062] Figure 7 The present invention adjusts the instructions inputted to the building blocks in the characteristic local structure to obtain a flow chart of the target local structure;
[0063] Figure 8 It is a schematic diagram of a flow chart of obtaining building blocks that are different from similar local structures in a characteristic local structure of the present invention. DETAILED DESCRIPTION
[0064] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0065] Reference Figure 1 As shown, the graphical physical building block programming monitoring method includes:
[0066] Obtaining the outline features of variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks; combining the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks during programming; and inputting instructions into the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks, wherein the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks are collectively referred to as blocks;
[0067] Acquire at least one basic local structure of building block programming, and pre-acquire test data and result data of 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 the building block programming is monitored in real time to determine whether the building block programming has completed the actual local structure. If not, no processing is performed. If yes, the actual local structure completed by the building block programming is obtained and the actual local structure is used as the characteristic 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 thereafter. In the process of generating the new actual local structure, it is judged whether the block programming has completed the actual local structure. The number of blocks in each actual local structure is small, and it is easy to correct errors.
[0070] Identify the characteristic local structure, obtain a basic local structure with the same number of building blocks as the characteristic local structure as the basic local structure to be identified, and calculate the overlap ratio between the characteristic local structure and the basic local structure to be identified;
[0071] The basic local structure to be identified with the largest overlap ratio is regarded as the local structure of the same type as the characteristic local structure;
[0072] Acquire test data and result data of similar local structures as similar test data and similar result data;
[0073] Adjust the instructions of the building blocks input in the characteristic local structure to obtain the target local structure;
[0074] Input similar test data into the target local structure to obtain characteristic result data;
[0075] Compare the characteristic result data with similar result data to see if they are consistent. If so, there is no abnormality in the characteristic local structure. If not, there is an abnormality in the characteristic local structure.
[0076] When an abnormality exists in a characteristic local structure, a building block different from a similar local structure in the characteristic local structure is obtained, the building block is marked as an abnormal building block, and the abnormal building block is transmitted to a user of building block programming.
[0077] Reference Figure 2 As shown, obtaining the outline features of the variable building block, the conditional building block, the loop building block, the operation building block and the logic judgment building block includes the following steps:
[0078] Coordinate modeling of the variable block is performed based on 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] Fitting the coordinates of at least one sampling point to obtain a contour fitting function of the variable building block as a contour feature of the variable building block;
[0080] The same processing steps as those of the variable blocks are sequentially taken for the conditional blocks, loop blocks, operation blocks and logic judgment blocks to obtain the contour features of the conditional blocks, the contour features of the loop blocks, the contour features of the operation blocks and the contour features of the logic judgment blocks;
[0081] The contour fitting functions of variable blocks, conditional blocks, loop blocks, operation blocks and logic judgment blocks are used as contour features. The contour fitting functions can be used to judge the type of blocks. The contour fitting functions of two blocks are subtracted and integrated on their definition domains to obtain a judgment value. When two blocks are of the same type, their contours are consistent. Therefore, if the judgment value is 0, 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 of building block programming includes the following steps:
[0083] Obtain at least one programming goal of building block programming;
[0084] Generate a programming framework for at least one programming target, and fill instructions into building blocks constituting the programming framework to obtain a preliminary basic local structure, wherein the building block is one of a variable building block, a condition building block, a loop building block, an operation building block, and a logic judgment building block;
[0085] Testing the prepared basic local structure to determine whether the prepared basic local structure operates normally, if yes, using the prepared basic local structure as the basic local structure, if no, adjusting the instructions of the building blocks in the prepared basic local structure until the prepared basic local structure operates normally;
[0086] Since it is children's programming, basic programming languages are used and the programming purposes that can be achieved are limited. Therefore, its programming architecture can be composed of at least one basic local structure combination, and the actual local structure in the programming process is one of the at least one basic local structures.
[0087] Reference Figure 4 As shown, pre-acquiring test data and result data of the basic local structure includes the following steps:
[0088] Acquire test data for testing the basic local structure, input the test data into the basic local structure, and obtain result data;
[0089] Summarize the test results to obtain the test data and result data of the basic local structure;
[0090] The test data and result data of the basic local structure are used to test whether the characteristic local structure is abnormal or not.
[0091] Reference Figure 5 As shown, judging whether the actual local structure of the building block programming is completed includes the following steps:
[0092] Obtain the start block and the end block of the actual local structure, where the start block is the first block of the actual local structure and the end block is the last block of the actual local structure;
[0093] Acquire at least one preset basic local structure from at least one basic local structure, wherein a starting building block of the preset basic local structure is consistent with a starting building block type 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 the number of the starting blocks and the ending blocks of the basic local structure is limited, when the ending block of the actual local structure is consistent with the ending block of one of the preset basic local structures, it can be indicated that the actual local structure has completed programming.
[0096] Obtaining the actual local structure of the block programming includes the following steps:
[0097] The last actual local structure completed by building block programming is obtained, and all building blocks after the last actual local structure are used as the actual local structure completed by building block programming.
[0098] Reference Figure 6 As shown, calculating the overlap ratio between the characteristic local structure and the basic local structure to be identified includes the following steps:
[0099] The building blocks in the characteristic local structure are numbered sequentially, and the building blocks of the basic local structure to be identified are numbered sequentially;
[0100] Determine whether the feature local structure is consistent with the contour features of the building blocks with the same number in the basic local structure to be identified. If so, the feature count is increased by one. If not, no processing is performed, wherein the initial value of the feature count is 0;
[0101] The ratio of the feature count to the total number of building 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 characteristic local structure may have 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 the local structure of the same type as the characteristic local structure.
[0103] Reference Figure 7 As shown, adjusting the instructions of the building block input in the characteristic 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 local structure;
[0105] Replace the instructions of the building blocks with the same number in the characteristic local structure with the instructions of the building blocks in the same local structure;
[0106] The structure of the characteristic local structure is consistent with that of the similar local structure, that is, the types and order of the building blocks used are the same, but the instructions entered in the building blocks may be different. For example, for addition, inputting 1+1 or inputting 1+2 are different, and the instructions will affect the abnormal judgment of the characteristic local structure. Therefore, all the instructions in the characteristic local structure are converted into instructions in the corresponding positions in the similar local structure. Thus, the test data and result data of the similar local structure can be used to test whether the characteristic local structure is abnormal.
[0107] Reference Figure 8 As shown, obtaining building blocks in a characteristic local structure that are different from similar local structures includes the following steps:
[0108] Compare the contour features of the characteristic local structure with the building blocks with the same number in the same local structure;
[0109] The blocks with different contour features are regarded as blocks different from the same local structures in the characteristic local structure;
[0110] The blocks in the characteristic local structure that are different from the similar local structures are abnormal blocks, and the user needs to adjust the abnormal blocks.
[0111] The graphical real-life building block programming monitoring system is used to implement the graphical real-life building block programming monitoring method, including:
[0112] A contour acquisition module, wherein the contour acquisition module acquires contour features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks;
[0113] A local structure acquisition module, the local structure acquisition module acquires at least one basic local structure of building block programming, and acquires test data and result data of the basic local structure in advance;
[0114] A real-time monitoring module, which monitors the programming process of the building block programming in real time to determine whether the building block programming has completed the actual local structure;
[0115] A structure recognition module, wherein the structure recognition module recognizes the characteristic local structure and calculates the overlap ratio between the characteristic local structure and the basic local structure to be recognized;
[0116] A data acquisition module, wherein the data acquisition module uses the basic local structure to be identified with the largest overlap ratio as a local structure of the same type as the characteristic local structure, and acquires test data and result data of the local structure of the same type as test data and result data of the same type;
[0117] An instruction adjustment module, which adjusts the instructions input by the building blocks in the characteristic local structure to obtain a target local structure;
[0118] An input module, wherein the input module inputs similar test data into the target local structure to obtain characteristic result data;
[0119] A comparison module, wherein the comparison module compares the characteristic result data with similar result data to see whether they are consistent;
[0120] An abnormal marking module, wherein the abnormal marking module marks a building block as an abnormal building block.
[0121] The working process of the above-mentioned graphical physical building block programming monitoring system is as follows:
[0122] Step 1: The contour acquisition module acquires contour features of variable blocks, condition blocks, loop blocks, operation blocks and logic judgment blocks;
[0123] Step 2: The local structure acquisition module acquires at least one basic local structure of the building block programming, and acquires test data and result data of the basic local structure in advance;
[0124] Step 3: The real-time monitoring module monitors the programming process of the building block programming in real time to determine whether the building block programming has completed the actual local structure. If not, no processing is performed. If yes, the actual local structure completed by the building block programming is obtained and the actual local structure is used as the characteristic local structure.
[0125] Step 4: The structure recognition module recognizes the characteristic local structure, obtains the basic local structure with the same number of building blocks as the basic local structure to be recognized, and calculates the overlap ratio between the characteristic local structure and the basic local structure to be recognized;
[0126] Step 5: The data acquisition module uses the basic local structure to be identified with the largest overlap ratio as the local structure of the same type as the characteristic local structure;
[0127] Step 6: The data acquisition module acquires the test data and result data of the same type of local structure as the same type of test data and the same type of result data;
[0128] Step 7: The instruction adjustment module adjusts the instructions input by the building blocks in the characteristic 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 characteristic result data;
[0130] Step 9: The comparison module compares the characteristic result data with the similar result data to see whether they are consistent. If so, there is no abnormality in the characteristic local structure. If not, there is an abnormality in the characteristic local structure.
[0131] Step 10: When an abnormality exists in the characteristic local structure, the abnormal marking module obtains the building blocks in the characteristic local structure that are different from the similar local structures, marks the building blocks as abnormal building blocks, and transmits the abnormal building blocks to the user of the building block programming.
[0132] Furthermore, the present solution also proposes a storage medium on which a computer-readable program is stored. When the computer-readable program is called, the above-mentioned graphical physical building block programming monitoring method is executed.
[0133] It is understandable that the storage medium may be a magnetic medium, such as a floppy disk, a hard disk, or a 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 the present invention are: by setting a structure recognition module, a data acquisition module, an instruction adjustment module and a comparison module, the process of children's building block programming can be monitored in real time, and a detection is completed at each partial completion stage of programming, so as to timely discover programming errors in children's programming, and mark the building blocks with programming errors. Since the building blocks in the partial completion stage are marked, the number of building blocks involved is small, and programming errors are easy to correct. Children can correct programming errors according to the marks of the erroneous building blocks, thereby completing autonomous correction and ensuring their interest in learning.
[0135] The above shows and describes 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 above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for monitoring programming of a graphical physical building block, characterized in that: include: Obtaining the outline features of variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks; combining the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks during programming; and inputting instructions into the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks, wherein the variable blocks, conditional blocks, loop blocks, operation blocks, and logic judgment blocks are collectively referred to as blocks; Acquire at least one basic local structure of building block programming, and pre-acquire test data and result data of the basic local structure, wherein the test data is input into the basic local structure to obtain the result data; The programming process of the building block programming is monitored in real time to determine whether the building block programming has completed the actual local structure. If not, no processing is performed. If yes, the actual local structure completed by the building block programming is obtained and the actual local structure is used as the characteristic local structure. Identify the characteristic local structure, obtain a basic local structure with the same number of building blocks as the characteristic local structure as the basic local structure to be identified, and calculate the overlap ratio between the characteristic local structure and the basic local structure to be identified; The basic local structure to be identified with the largest overlap ratio is regarded as the local structure of the same type as the characteristic local structure; Acquire test data and result data of similar local structures as similar test data and similar result data; Adjust the instructions of the building blocks input in the characteristic local structure to obtain the target local structure; Input similar test data into the target local structure to obtain characteristic result data; Compare the characteristic result data with similar result data to see if they are consistent. If so, there is no abnormality in the characteristic local structure. If not, there is an abnormality in the characteristic local structure. When an abnormality exists in a characteristic local structure, a building block different from a similar local structure in the characteristic local structure is obtained, the building block is marked as an abnormal building block, and the abnormal building block is transmitted to a user of building block programming.
2. The method for monitoring programming of a graphical physical building block according to claim 1, characterized in that: The step of obtaining the outline features of the variable building block, the conditional building block, the loop building block, the operation building block and the logic judgment building block comprises the following steps: Coordinate modeling of the variable block is performed based on the center of the variable block, and at least one sampling point is taken at equal intervals on the outline of the variable block; Fitting the coordinates of at least one sampling point to obtain a contour fitting function of the variable building block as a contour feature of the variable building block; The same processing steps as the variable blocks are sequentially taken for the conditional blocks, loop blocks, operation blocks and logic judgment blocks to obtain the contour features of the conditional blocks, the contour features of the loop blocks, the contour features of the operation blocks and the contour features of the logic judgment blocks.
3. The method for monitoring programming of a graphical physical building block according to claim 2, characterized in that: The obtaining of at least one basic local structure of building block programming comprises the following steps: Obtain at least one programming goal of building block programming; Generate a programming framework for at least one programming target, and fill instructions into building blocks constituting the programming framework to obtain a preliminary basic local structure, wherein the building block is one of a variable building block, a condition building block, a loop building block, an operation building block, and a logic judgment building block; The prepared basic local structure is tested to determine whether the prepared basic local structure operates normally. If so, the prepared basic local structure is used as the basic local structure. If not, the instructions of the building blocks in the prepared basic local structure are adjusted until the prepared basic local structure operates normally.
4. The method for monitoring programming of a graphical physical building block according to claim 3, characterized in that: The method of pre-acquiring the test data and result data of the basic local structure comprises the following steps: Acquire test data for testing the basic local structure, input the test data into the basic local structure, and obtain result data; Summarize the test results to obtain the test data and result data of the basic local structure.
5. The method for monitoring programming of a graphical physical building block according to claim 4, characterized in that: The method of judging whether the block programming has completed the actual local structure comprises the following steps: Obtain the start block and the end block of the actual local structure, where the start block is the first block of the actual local structure and the end block is the last block of the actual local structure; Acquire at least one preset basic local structure from at least one basic local structure, wherein a starting building block of the preset basic local structure is consistent with a starting building block type of the actual local structure; It is determined 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, it is determined that the block programming has not completed the actual local structure. If so, it is determined that the block programming has completed the actual local structure.
6. The method for monitoring programming of a graphical physical building block according to claim 5, characterized in that: The method of obtaining the actual local structure of the building block programming comprises the following steps: The last actual local structure completed by building block programming is obtained, and all building blocks after the last actual local structure are used as the actual local structure completed by building block programming.
7. The method for monitoring programming of a graphical physical building block according to claim 6, characterized in that: The calculation of the overlap ratio between the characteristic local structure and the basic local structure to be identified comprises the following steps: The building blocks in the characteristic local structure are numbered sequentially, and the building blocks of the basic local structure to be identified are numbered sequentially; Determine whether the feature local structure is consistent with the contour features of the building blocks with the same number in the basic local structure to be identified. If so, the feature count is increased by one. If not, no processing is performed, wherein the initial value of the feature count is 0; The ratio of the feature count to the total number of building blocks in the feature local structure is taken as the overlap ratio of the feature local structure to the basic local structure to be identified.
8. The method for monitoring programming of a graphical physical building block according to claim 7, characterized in that: The step of adjusting the input instructions of the building blocks in the characteristic local structure to obtain the target local structure comprises the following steps: Number the building blocks in the characteristic local structure, and number the building blocks in the same local structure; Replace the instructions of the building blocks with the same number in the characteristic local structure with the instructions of the building blocks in the same local structure.
9. The method for monitoring programming of a graphical physical building block according to claim 8, characterized in that: The method of obtaining building blocks in the characteristic local structure that are different from the same local structure comprises the following steps: Compare the contour features of the characteristic local structure with the building blocks with the same number in the same local structure; The blocks with different contour features are regarded as blocks different from the same local structures in the characteristic local structure.
10. A graphical real-life building block programming monitoring system, used to implement the graphical real-life building block programming monitoring method according to any one of claims 1 to 9, characterized in that: include: A contour acquisition module, wherein the contour acquisition module acquires contour features of variable blocks, condition blocks, loop blocks, operation blocks, and logic judgment blocks; A local structure acquisition module, the local structure acquisition module acquires at least one basic local structure of building block programming, and acquires test data and result data of the basic local structure in advance; A real-time monitoring module, which monitors the programming process of the building block programming in real time to determine whether the building block programming has completed the actual local structure; A structure recognition module, wherein the structure recognition module recognizes the characteristic local structure and calculates the overlap ratio between the characteristic local structure and the basic local structure to be recognized; A data acquisition module, wherein the data acquisition module uses the basic local structure to be identified with the largest overlap ratio as a local structure of the same type as the characteristic local structure, and acquires test data and result data of the local structure of the same type as test data and result data of the same type; An instruction adjustment module, which adjusts the instructions input by the building blocks in the characteristic local structure to obtain a target local structure; An input module, wherein the input module inputs similar test data into the target local structure to obtain characteristic result data; A comparison module, wherein the comparison module compares the characteristic result data with similar result data to see whether they are consistent; An abnormal marking module, wherein the abnormal marking module marks a building block as an abnormal building block.
Citation Information
Patent Citations
Graphical programming system and graphical programming method
CN105893060A
Instruction array analysis method and system suitable for entity building block programming and toy
CN114020260A
Method and device for assisting children in intelligent programming and computer storage medium
CN116824466A
Method and system for determining physical block programming information, and toy
WO2023088360A1
Cited By
Intelligent auxiliary building method based on solid tenon-and-mortise building blocks and mobile terminal
CN120747306A