Intelligent programming control method and system based on SmartCode
By using SmartCode's intelligent programming control method, combined with graphical programming and modular hardware, the problems of high barriers to entry for programming tools and low hardware integration in STEAM education have been solved. This enables the rapid establishment of connections between programming logic and practical applications, thereby enhancing learning interest and hardware stability.
Patent Information
- Application Number
- CN202511365120.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-12-12
AI Technical Summary
Current STEAM education suffers from high barriers to entry in programming tools, a lack of programming language foundation among students, low hardware integration, complex and unstable wiring, and difficulty in quickly establishing a connection between programming logic and practical applications.
Employing a SmartCode-based intelligent programming control method, this system combines graphical programming with modular hardware design, along with MagicBlock sensor and actuator arrays, to achieve data acquisition, preprocessing, tag processing, and logic matching. This generates a graphical programming software model that supports automatic code generation and online simulation debugging.
It significantly lowers the programming threshold, improves hardware integration and stability, simplifies the teaching process, enhances learning interest and sense of accomplishment, realizes the entire process from programming to hardware demonstration, and supports multi-scenario adaptation and scalability.
Smart Images

Figure CN121122114A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of STEAM education, and particularly relates to an intelligent programming control method and system based on SmartCode. BACKGROUND
[0002] In the current STEAM education field, programming teaching tools have become the core carriers for cultivating the innovative ability and interdisciplinary thinking of teenagers, among which open source hardware platforms such as Arduino and Micro:bit are most widely used. Such platforms rely on the modular design concept and allow users to build simple intelligent systems through external sensors and actuators, for example, connecting temperature and humidity sensors to collect data in environmental monitoring teaching or controlling rudders to complete basic mechanical actions in automation teaching, thereby providing K12 stage students with a programming learning path from theory to practice. At the same time, the development of graphical programming technology (such as programming tools based on the Blockly engine) further promotes the landing of low-code education scenarios, gradually reduces the difficulty of teenagers' programming entry, and forms a "hardware + software" combined STEAM education ecology.
[0003] The existing technology still has some defects, for example, the programming threshold is high, for example, students need to master C / C++ programming language to realize sensor data reading, actuator control and other basic functions based on the Arduino platform, and K12 stage students generally lack programming language foundation, resulting in a long learning period, low interest, and difficulty in quickly establishing the correlation between programming logic and actual application; the hardware integration is low, and the existing platform needs to externally connect various sensors and actuators through Dupont wires, which not only has complex wiring and is prone to contact failure, but also requires students to additionally learn hardware wiring principles, thereby distracting attention from the combination of programming logic and subject knowledge.
[0004] In view of the above technical defects, a solution is proposed. SUMMARY
[0005] The application aims to provide an intelligent programming control method and system based on SmartCode to solve the problems.
[0006] To achieve the above-mentioned purpose, the application provides the following technical scheme: an intelligent programming control method based on SmartCode, comprising the following intelligent programming control method;
[0007] S1, obtaining an original perception parameter of an education scene based on a data acquisition range, and preprocessing the original perception parameter of the education scene, filtering noise data and uniformly processing in a standard format to obtain a standard original perception data set of the education scene;
[0008] S2, obtain a standard education original perception data set, call a pre-stored graphical programming software model, extract corresponding type data in the standard education original perception data set and perform label processing to obtain teaching demonstration key values and labeled education data sets;
[0009] S3, obtain sensor data and actuator control parameters contained in the data acquisition range to construct a mapping model, extract corresponding mapping data in the standard education original perception data set to obtain a data-actuator association table;
[0010] S4, extract student marked data values from the standard education original perception data set, call a graphical programming software model to construct a logic parameter to obtain a logic matching result, combine a threshold to generate a logic matching qualified signal and a programming logic adjustment signal;
[0011] S5, call a logic matching result to match a pre-stored corresponding signal, combine an actuator to jointly generate a signal issue instruction and an education control signal set.
[0012] Further, the processing process of the standard education original perception data set in the S1 step is as follows:
[0013] Intelligent programming control instructions input by MagicCode are obtained, education scene original perception parameters are continuously obtained from the data acquisition range based on the intelligent programming control instruction start time, the education scene original perception parameters are obtained by MagicBlock sensing equipment collection, and the education scene original perception parameters include temperature and humidity , light amount , target object acceleration amount , i is the collection number, a pre-stored moving average method filtering model is called to perform impurity processing on the temperature and humidity , light amount , target object acceleration amount .
[0014] Further, the education scene original perception parameters are obtained, and the formula is , wherein X represents any type of parameter in the education scene original perception parameters, n is a sliding window, the education scene is set to n=5, the balance of real-time and stability is considered, data exceeding the sensor range is removed, and the standardized data is marked as a standard education original perception data set;
[0015] Based on the historical database, the historical old data of the same type and the same time length as the data collection range are extracted, the representative value of the corresponding time node in the historical old data is extracted according to the time length, the time node is divided into several division nodes by equally dividing the starting data collection length of the intelligent programming control instruction, and the division nodes are marked as time nodes. A comparison threshold is constructed, and a pre-stored missing threshold is called. The standard education original perception data set and the comparison threshold are jointly analyzed and compared to obtain the data set integrity. If the data set integrity of the standard education original perception data set and the comparison threshold exists a missing rate < the missing threshold, a two-stage programming label processing instruction is triggered. If the data set integrity of the standard education original perception data set and the comparison threshold exists a missing rate > the missing threshold, a MagicLink sensing device re-sampling intelligent programming control instruction is triggered.
[0016] Further, the processing process of the graphical programming software model in the S2 step is as follows:
[0017] The pre-stored graphical programming software model is called, the built-in STEAM discipline label library is extracted, the standard education original perception data set is obtained and brought into the STEAM discipline label library, and the temperature and humidity quantity , light quantity , target object acceleration quantity are sequentially labeled and processed according to the parameter type, to obtain the temperature and humidity quantity , the label is thermal-state quantity, the light quantity , the label is optical-light intensity parameter, and the target object acceleration quantity , the label is mechanical-motion parameter.
[0018] Further, the thermal-state quantity, the optical-light intensity parameter and the mechanical-motion parameter after obtaining the label are summarized as teaching demonstration key values, the teaching demonstration key values are jointly analyzed based on the MagicCode data association teaching aid database, an association index is generated, the index format is project ID-data type-label, and a labeled education data set is generated;
[0019] The label matching rate during the generation of the label matching threshold is extracted, the pre-stored label matching threshold is called, if the label matching rate ≥ the label matching threshold, the three-stage data mapping processing is entered; if the label matching rate < the label matching threshold, a supplementary label prompt signal is generated.
[0020] Further, the analysis process of the data-actuator association table in the S3 step is as follows:
[0021] The actuator parameters of the MagicBlock sensing device are acquired, the actuator parameters including the PWM range 0-255 of the RGB LED, the steering angle range 0-180°, the standard education original perception data set collected by the MagicBlock sensing device through intelligent programming control instructions is acquired, a mapping model is established with the standard education original perception data set and the actuator parameters, any type of parameter in the standard education original perception data set is extracted, and the correlation coefficient R is obtained by formula The pre-stored correlation threshold is called and compared with the correlation coefficient R: if the correlation coefficient R is less than the correlation threshold, it is confirmed that the correlation is valid, the correlation relationship is stored as a data-actuator correlation table, and is synchronized to the MagicCode master unit; when the number of entries in the correlation table is greater than or equal to the preset class upper limit, the four-stage logic matching process is triggered; if the correlation coefficient R is greater than the correlation threshold, it is confirmed that the correlation is invalid, and a supplementary module needs to be connected.
[0022] Further, the analysis process of the logic matching result in the S4 step is as follows:
[0023] The initial setting parameters of the student on the programming block are extracted from the standard education original perception data set, which are marked as student marked data values, the student marked data values are substituted into the graphical programming software model to link and build the logic parameters, the deviation value of the actual student marked data value and the setting parameter of the graphical programming software model is obtained, and the formula is wherein X represents any type of student marked data value, the pre-stored education scene deviation threshold is called and compared with : if the deviation value is less than or equal to the education scene deviation threshold , it is determined that the logic matching is qualified; if the deviation value is greater than the education scene deviation threshold , it is determined that the logic matching is unqualified, the programming logic needs to be adjusted, a logic matching result table is generated, and the five-stage processing instruction is triggered.
[0024] Further, the deep analysis process of the logic matching result in the S5 step is as follows:
[0025] The logic matching result is acquired, and the pre-stored corresponding actuator control signal is called; when the logic matching qualified record in the logic matching result is extracted, it is matched with the corresponding signal in the corresponding actuator control signal to trigger and generate a demonstration signal; when the logic matching unqualified record in the logic matching result is extracted, it is matched with the corresponding signal in the corresponding actuator control signal to trigger and generate a control signal;
[0026] Further, the MagicBlock sensor device is called to adapt the signal format, the MagicBlock sensor device executor parameters are extracted, the steering engine signal is a PWM pulse, the period is 20 ms, the high level is 0.5-2.5 ms, 0-180 degrees are corresponded, and the signal transmission delay is analyzed The Bluetooth 5.3 rate is set to 2 Mbps, the open environment delay is less than or equal to 10 ms, the pre-stored delay threshold and the transmission delay are called Joint analysis: if the transmission delay is less than or equal to the delay threshold, a generated signal is generated, and if the transmission delay is greater than the delay threshold, the control signal set is educed.
[0027] A SmartCode-based intelligent programming control system comprises the following steps:
[0028] The MagicCode master unit is configured with a unique product identification code and a programmable I / O interface, and is associated with a related database to call pre-stored data;
[0029] The MagicLink wireless communication module is in communication connection with the MagicCode master unit and supports Bluetooth dual-mode transmission;
[0030] The MagicBlock sensor device / executor array interacts with the MagicCode master unit through a standard communication protocol;
[0031] The graphical programming software system runs on an external computing device and is used to generate control logic and issue the control logic to the MagicCode master unit.
[0032] The present application has the following advantages:
[0033] 1. The present application is designed by graphical programming + modular hardware, which significantly reduces the programming threshold of STEAM education, and students can complete the control logic construction by simply dragging the building blocks; at the same time, the software supports code automatic generation and online simulation debugging, helps students gradually understand the corresponding relationship between graphical logic and code, conforms to the cognitive law from concrete to abstract in K12 stage; the whole process from programming to hardware demonstration can be completed in a short time, which greatly improves the learning interest and sense of achievement, reduces the programming education threshold, improves the hardware integration and stability, and simplifies the teaching operation process.
[0034] 2、The present application is through the deep integration of MagicBlock modular sensor / actuator array and MagicCode master unit, solves the problems of complex wiring and poor stability of existing platform, the MagicBlock module ensures the long-term stable operation of temperature and humidity, three-axis acceleration, light intensity and other sensors; it can be extended from education scene to smart home, environmental monitoring, industrial automation simulation and other practical scenes; on the other hand, the MagicCode master unit reserves interface, supports external expansion module, graphical software opens API interface, allows teachers or students to carry out secondary development, strengthens multi-scene adaptation and expansibility, realizes the connection of education and practical application. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, below will briefly introduce the drawings needed to be used in the embodiments or prior art description, obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.
[0036] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application, obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0038] Embodiment one: please refer to Figure 1 The present embodiment is a smart programming control method and system based on SmartCode, including the following smart programming control method;
[0039] S1, obtain the original perception parameters of the education scene based on the data acquisition range, and pretreat the original perception parameters of the education scene, filter noise data and standardize the format, obtain the standard education original perception data set, and the processing process of the standard education original perception data set is as follows:
[0040] Obtain the smart programming control instruction input by MagicCode, continuously obtain the original perception parameters of the education scene from the data acquisition range based on the starting time of the smart programming control instruction, obtain the original perception parameters of the education scene by MagicBlock sensing device, and the original perception parameters of the education scene include temperature and humidity , light quantity target object acceleration amount , i is the number of times of collection, and the pre-stored moving average filtering model is called to filter the temperature and humidity amount , light amount , target object acceleration amount The miscellaneous items are processed.
[0041] The original perception parameters of the education scene are obtained, and the formula is , wherein X represents any type of parameter in the original perception parameters of the education scene, n is a sliding window, and the education scene is set to n=5, is the first, second, …, and n-th collection data of the perception parameter, and is a MagicBlock sensor array, such as a temperature and humidity sensor, a light sensor, and a three-axis acceleration sensor, which continuously collects original data in the education scene. For example, T1 represents the first collection temperature value, and Ax1 represents the first collection X-axis acceleration value. The balance between real-time and stability is achieved by eliminating data that exceeds the sensor range, such as temperature and humidity exceeding -40℃~+85℃ / 0%~100%RH. The standardized data is marked as a standard education original perception data set;
[0042] Based on the historical database, historical old data of the same type and time length as the current data collection range are extracted. The representative value of the corresponding time node in the historical old data is extracted based on the time length. The time node is equally divided by the starting data collection length of the intelligent programming control instruction to obtain a plurality of division nodes, which are marked as time nodes. A comparison threshold is constructed, and a pre-stored missing threshold is called to obtain a standard education original perception data set and a comparison threshold joint analysis comparison data set integrity:
[0043] If the data set integrity of the standard education original perception data set and the comparison threshold has a missing rate < the missing threshold, a two-stage programming label processing instruction is triggered;
[0044] If the data set integrity of the standard education original perception data set and the comparison threshold has a missing rate > the missing threshold, a MagicLink sensing device re-collection intelligent programming control instruction is triggered.
[0045] S2, obtain a standard education original perception data set, call a pre-stored graphical programming software model, extract corresponding type data in the standard education original perception data set and perform label processing to obtain teaching demonstration key values and annotated education data sets;
[0046] The processing process of the graphical programming software model is as follows:
[0047] retrieve the pre-stored graphical programming software model, extract the built-in STEAM discipline tag library, obtain the standard education original perception data set and bring it into the STEAM discipline tag library, and the temperature and humidity quantity , light quantity , target object acceleration quantity According to the parameter type, the label assignment processing is carried out in turn, and the temperature and humidity quantity The label is thermal-state quantity, light quantity The label is optical-light intensity parameter, target object acceleration quantity The label is mechanical-motion parameter.
[0048] After obtaining the thermal-state quantity, optical-light intensity parameter and mechanical-motion parameter, they are summarized as teaching demonstration key values, based on the joint analysis of the teaching aid database and the teaching demonstration key values based on MagicCode data association, the correlation index is generated, the index format is project ID-data type-label, and the labeled education data set is generated;
[0049] Extract the label matching rate during the generation of the label matching threshold value, retrieve the pre-stored label matching threshold value:
[0050] If the label matching rate is greater than or equal to the label matching threshold value, the three-stage data mapping processing is entered;
[0051] If the label matching rate is less than the label matching threshold value, a supplementary label prompt signal is generated, and the teacher's graphical programming software pops up a red prompt box, showing that the light data label is incomplete and needs to be supplemented with detailed labels, and lists the optional labels such as optical-light intensity parameter and optical-spectrum data. The student selects the incomplete light data item in the software label management module and clicks the supplement label button to select the optical-light intensity parameter from the drop-down list. The system recalculates the label matching rate, which is now 100%, indicating that the label supplement is complete and the three-stage data mapping processing can be entered. The student clicks confirm to continue the subsequent process.
[0052] Data storage step: store the processed data of each stage according to the project period-data type classification into the teaching aid database, including the original perception parameters of the education scene, preprocessing, labeling, association and matching results, retrieve the pre-stored SQLite lightweight database, and adapt to the storage of education equipment; set the data retention period, short-term teaching project retention period is 30 days, long-term competition project retention period is 1 year; regularly check the data integrity, retrieve the pre-stored damage threshold, the damage threshold can be taken as 3%:
[0053] If the damage rate < damage threshold, repair, the system automatically calls the real-time backup data of the MagicCode master unit, and the material clearly supports automatic backup of the master unit. In the data repair interface, 2 damaged data are found, and the remaining 1 is being recovered from the backup; teachers can view the repair progress in the software data monitoring module, such as 1 repaired, 1 remaining, and a prompt data repair success after repair is completed, and the damage rate is reduced to 0%; students do not need to manually operate, and the repaired data will be automatically synchronized to the teaching aid database, and the complete data can be directly used in subsequent calls;
[0054] If the damage rate > damage threshold, recover from the master unit backup to ensure that subsequent teaching review can call data.
[0055] S3, get the sensor data and actuator control parameters contained in the data acquisition range, and build a mapping model, extract the corresponding mapping data in the standard education original perception data set, and get the data-actuator association table;
[0056] The analysis process of the data-actuator association table is as follows:
[0057] Get the actuator parameters of the MagicBlock sensing device, including the PWM range 0~255 of RGBLED, the angle range 0~180° of the steering wheel, get the standard education original perception data set collected by the MagicBlock sensing device through intelligent programming control instructions, and establish a mapping model with the standard education original perception data set and the actuator parameters, extract any type of parameter in the standard education original perception data set, and get the correlation coefficient R by the formula , wherein the actual mapping value represents any type of parameter extracted in the standard education original perception data set, and the theoretical mapping value represents the parameter corresponding to the actuator parameter, and the pre-stored correlation threshold is compared with the correlation coefficient R:
[0058] If the correlation coefficient R < correlation threshold, confirm the correlation is valid, store the correlation relationship as a data-actuator association table, and synchronize to the MagicCode master unit. When the number of association table entries ≥ the preset class upper limit, trigger the four-stage logical matching process;
[0059] If the correlation coefficient R > the correlation threshold, the correlation is confirmed to be invalid, and the module connection needs to be supplemented. The graphical programming software will pop up a blue prompt box, indicating that the light-LED correlation is invalid, and there may be a module not connected. Please check the connection status of the MagicBlock actuator and guide the student to the device connection interface. The student opens the MagicLink wireless communication module as prompted. The briefing materials support Bluetooth dual-mode transmission. Find the unpaired RGBLED module in the software device list and click the pairing button. After successful pairing, the software shows that the LED module is connected. The student re-executes the operation of establishing the mapping model. The system recalculates R = 2% < 10%, indicating that the correlation is valid and the data-actuator correlation table has been generated. The student can then enter the fourth-order logic matching.
[0060] After the third-order association, data visualization processing is added: the associated data is transformed into educational charts, such as the target object acceleration measurement. Data was used to plot the motion trajectory as a line graph, along with temperature and humidity measurements. Data is plotted as a status bar chart; chart parameters are adapted for teaching display, and subject-specific terms are labeled on the axes, such as "time / min" and "temperature / ℃"; chart clarity is compared, and a clarity threshold is retrieved, with a possible value of 72 dpi.
[0061] If the resolution is ≥72dpi, it will be synchronized to the programming software interface so that students can observe the data correlation patterns.
[0062] If the resolution is less than 72 dpi, adjust the chart size.
[0063] Example 2
[0064] S4. Extract student labeled data values from the standard educational raw perception dataset, retrieve the logical parameters from the graphical programming software model, obtain the logical matching results, and generate logical matching qualified signals and programming logic adjustment signals based on threshold judgment. The analysis process of the logical matching results is as follows:
[0065] The initial settings parameters for programming blocks by students are extracted from the standard educational raw perception dataset and labeled as student-labeled data values. These student-labeled data values are then substituted into the graphical programming software model to construct the logical parameters, yielding the deviation between the actual student-labeled data values and the parameters set in the graphical programming software model. The formula is as follows: Where X represents any type of student labeled data value, and the pre-stored educational scenario deviation threshold is retrieved. and Comparative analysis:
[0066] If the deviation value ≤Educational Scenarios Deviation Threshold If the deviation value is less than or equal to the threshold value, it is determined that the logic matching is qualified, the system displays a green icon on the logic matching result interface, indicating that the logic matching is qualified, and lists the key data, such as the set threshold value 25℃, the actual temperature 25.5℃, and the deviation 0.5℃≤1℃; the teacher can click the details button to view the programming logic set by the student, such as when the temperature is less than or equal to 25℃, the steering wheel rotates 90°, and the logic is confirmed to be reasonable; the student does not need to perform additional operations, and the system automatically triggers the five-stage processing to generate a demonstration signal of temperature meeting- steering wheel rotating 90°, which is synchronized to the actuator module;
[0067] If the deviation value is greater than the threshold value, it is determined that the logic matching is unqualified, the programming logic needs to be adjusted, a logic matching result table is generated, and a five-stage processing instruction is triggered; the software pops up an orange prompt box, indicating that the logic matching is unqualified, the deviation 4.5℃>1℃, the programming logic needs to be adjusted, and optimization suggestions are provided, such as the current actual temperature 25.5℃, it is suggested to adjust the set threshold value to the interval 24.5-26.5℃; the student finds the temperature threshold value setting block in the programming editing module, modifies the value from 30℃ to 26℃, and clicks the rematch button; >education scene deviation threshold
[0068] In the four-stage matching, the logic matching result is converted into a teaching feedback speech:
[0069] If the qualified speech is: your temperature control logic fits the actual situation!
[0070] The unqualified speech can be: try adjusting the humidity threshold value to make the result more accurate;
[0071] The speech is stored in an education feedback library constructed by a historical database, and the complexity is matched according to the student's grade, with cartoon language for primary school students and subject terminology for junior high school students:
[0072] If the feedback sending success rate is greater than or equal to 95%, the interaction is completed;
[0073] If the feedback sending success rate is less than 95%, the MagicLink is used to resend the feedback, and the teaching guidance is enhanced.
[0074] S5, retrieve the logic matching result matching the corresponding pre-stored signal, combine the actuator to generate signal issuing instructions and education control signal set, and the deep analysis process of the logic matching result is as follows:
[0075] Obtain the logic matching result, and retrieve the pre-stored corresponding actuator control signal; when the logic matching qualified record in the logic matching result is extracted, it is matched with the corresponding signal in the corresponding actuator control signal to trigger the generation of a demonstration signal;
[0076] When the extraction logic matches the logic matching unqualified record, it is matched with the corresponding signal in the corresponding actuator control signal to trigger the generation of the regulation signal;
[0077] The MagicBlock sensing device is called up for signal format adaptation. The MagicBlock sensing device actuator parameters are extracted. The servo signal is a PWM pulse with a period of 20 ms and a high level of 0.5-2.5 ms corresponding to 0-180°. The signal transmission delay is analyzed The Bluetooth 5.3 rate is set to 2 Mbps, and the delay in an open environment is ≤10 ms. The pre-stored delay threshold and the transmission delay are analyzed jointly:
[0078] If the transmission delay ≤ delay threshold, the delivery signal is generated, and the system displays the delivery signal generation in the signal management interface. After completion, it is marked that the signal has been delivered to the RGB LED module, and the actuator state is displayed in real time, such as the LED has received the signal and is switching to white light. Students can observe the light changes of the physical LED module to confirm that the signal delivery is successful, and the white light is on. The teacher end can receive the signal delivery success feedback synchronously, and check the actuator response state of all students in the class management module to ensure that the teaching demonstration proceeds normally.
[0079] If the transmission delay > delay threshold, the education control signal set is generated.
[0080] After the five-stage signal generation, the effect verification is increased: the actuator action feedback data such as the actual angle of the servo and the actual brightness of the LED are obtained.
[0081] The degree of coincidence of the feedback data and the control signal is analyzed where X represents the angle / brightness, the pre-stored coincidence threshold is called up, and the coincidence threshold can be 90%, represents the actual feedback data of the actuator action, represents the actuator control signal parameter generated by the system, i.e. the instruction value delivered to the actuator according to the logic matching result:
[0082] If C≥ coincidence threshold, it is determined that the demonstration is successful, and the RGB LED is green.
[0083] If C< coincidence threshold, the three-stage-five-stage processing is re-executed until the coincidence degree meets the standard, ensuring the education demonstration effect.
[0084] In combination with Embodiment One and Embodiment Two, the present application not only solves the technical pain points of existing programming education tools, but also constructs a complete education closed loop of theoretical teaching-practical operation-actual application. In the teaching dimension, the modular hardware supports interdisciplinary experiments such as physics, chemistry, biology, etc. For example, the germination environment data of seeds can be recorded by a temperature and humidity sensor, and the influence of environmental factors on growth can be analyzed by combining programming logic, realizing the integration of multidisciplinary knowledge. In the application dimension, the system response delay is less than or equal to 50 ms, meeting the needs of most automation control scenarios. The programming projects completed by students in the classroom can be adapted to actual home applications through simple parameter adjustment, truly realizing the application of what is learned.
[0085] The above is only an example and description of the structure of the present application. Those skilled in the art can make various modifications or supplements or use similar ways to replace the described specific embodiments, as long as they do not deviate from the structure of the application or exceed the scope defined by the claims, and they should belong to the protection scope of the present application.
[0086] In the description of the present application, the description of the terms "one embodiment", "example", "specific example" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0087] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The preferred embodiments do not describe all the details and do not limit the present application to the specific embodiments. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is limited only by the claims and their entire scope and equivalents.
Claims
1. A smart programming control method based on SmartCode, characterized in that, Create a project and confirm the data collection scope, including the following intelligent programming control methods; S1. Obtain the original perception parameters of the educational scenario based on the data collection range, preprocess the original perception parameters of the educational scenario, filter noisy data and standardize the format to obtain the standard educational original perception dataset. S2. Obtain the standard educational raw perception dataset, retrieve the pre-stored graphical programming software model, extract the corresponding type of data from the standard educational raw perception dataset and perform label processing to obtain the teaching demonstration key values and labeled educational dataset. S3. Obtain the sensor data and actuator control parameters contained within the data acquisition range, construct a mapping model, extract the corresponding mapping data from the standard education raw perception dataset, and obtain the data-actuator association table. S4. Extract student labeled data values from the standard education raw perception dataset, retrieve the logic parameters of the graphical programming software model, obtain the logic matching results, and generate a logic matching qualified signal and a programming logic adjustment signal by combining the threshold judgment. S5. Retrieve the logic matching result and match the pre-stored corresponding signal. Combine the signal generated by the actuator to issue instructions and educational control signal set.
2. The intelligent programming control method based on SmartCode according to claim 1, characterized in that, The processing procedure for the standard educational raw sensory dataset in step S1 is as follows: The system acquires intelligent programming control commands input via MagicCode. Based on the start time of these commands, it continuously retrieves raw perceptual parameters of the educational scene from the data acquisition range. These raw perceptual parameters, including temperature and humidity, are collected using MagicBlock sensing devices. Light intensity Target object acceleration measurement Retrieve the pre-stored moving average filtering model for temperature and humidity measurements. Light intensity Target object acceleration measurement Perform a filter for impurities.
3. The intelligent programming control method based on SmartCode according to claim 2, characterized in that, Obtain the original perception parameters of the educational scenario The formula is Where X represents any type of parameter in the original perception parameters of the educational scenario, n is the sliding window, and n=5 is set for the educational scenario. To balance real-time performance and stability, data that exceeds the sensor's range is removed, and the standardized data is labeled as the standard educational original perception dataset. Based on historical databases, historical data of the same type and duration as the current data collection scope are extracted. Representative values for corresponding time nodes in the historical data are extracted based on the duration, and a comparison threshold is constructed. A pre-stored missing threshold is retrieved, and the completeness of the standard educational original perception dataset is jointly analyzed and compared with the comparison threshold. If the missing rate of the standard educational original perception dataset and the comparison threshold is less than the missing threshold, a two-stage programming tag processing instruction is triggered. If the missing rate of the standard educational original perception dataset and the comparison threshold is greater than the missing threshold, a MagicLink sensor device re-collection intelligent programming control instruction is triggered.
4. The intelligent programming control method based on SmartCode according to claim 1, characterized in that, The processing procedure for the graphical programming software model in step S2 is as follows: Retrieve the pre-stored graphical programming software model, extract its built-in STEAM subject tag library, obtain the standard educational raw perception dataset and import it into the STEAM subject tag library, then input the temperature and humidity values from the standard educational raw perception dataset. Light intensity Target object acceleration measurement Labels are assigned sequentially according to parameter type to obtain temperature and humidity values. Tags: Thermal-state quantities, Illumination The tags are optical-intensity parameters and target acceleration measurement. The tag is mechanics-kinematic parameters.
5. The intelligent programming control method based on SmartCode according to claim 4, characterized in that, After obtaining the tags, the thermal-state variables, optical-light intensity parameters, and mechanical-motion parameters are summarized into key values for teaching demonstrations. Based on the MagicCode data association, the teaching aid database and the key values for teaching demonstrations are jointly analyzed to generate an association index. The index format is project ID-data type-tag, and an labeled educational dataset is generated. Extract the label matching rate during the label matching threshold generation period, retrieve the pre-stored label matching threshold, and if the label matching rate is greater than or equal to the label matching threshold, proceed to the third-order data mapping process; If the tag matching rate is less than the tag matching threshold, a supplementary tag prompt signal is generated.
6. The intelligent programming control method based on SmartCode according to claim 1, characterized in that, The analysis process of the data-actuator association table in step S3 is as follows: Obtain the actuator parameters of the MagicBlock sensor device, including the PWM range of RGBLED (0~255) and the servo angle range (0~180°). Obtain the standard educational raw sensor dataset acquired by the MagicBlock sensor device through intelligent programming control commands. Establish a mapping model jointly using the standard educational raw sensor dataset and the actuator parameters. Extract any type of parameter from the standard educational raw sensor dataset using the formula... The correlation coefficient R is obtained, and the pre-stored correlation threshold is retrieved and compared with the correlation coefficient R. If the correlation coefficient R < the correlation threshold, the correlation is confirmed to be valid, and the correlation relationship is stored and marked as a data-executor correlation table and synchronized to the MagicCode main control unit. When the number of entries in the correlation table is greater than or equal to the preset upper limit of the number of categories, the four-stage logic matching process is triggered. If the correlation coefficient R > the correlation threshold, the correlation is confirmed to be invalid, and the module connection needs to be supplemented.
7. The intelligent programming control method based on SmartCode according to claim 1, characterized in that, The analysis process of the logical matching results in step S4 is as follows: The initial settings parameters for programming blocks by students are extracted from the standard educational raw perception dataset and labeled as student-labeled data values. These student-labeled data values are then substituted into the graphical programming software model to construct the logical parameters, yielding the deviation between the actual student-labeled data values and the parameters set in the graphical programming software model. The formula is as follows: Where X represents any type of student labeled data value, and the pre-stored educational scenario deviation threshold is retrieved. and Perform comparative analysis: If the deviation value ≤Educational Scenarios Deviation Threshold If the logical match is successful, then the logical match is considered successful; if the deviation value is... >Educational Scenarios Deviation Threshold If the logic match fails, the programming logic needs to be adjusted to generate a logic match result table and trigger the five-stage processing instructions.
8. The intelligent programming control method based on SmartCode according to claim 1, characterized in that, The in-depth analysis process of the logical matching results in step S5 is as follows: Obtain the logic matching result and simultaneously retrieve the pre-stored corresponding actuator control signal. When a record with a valid logic match is extracted from the logic matching result, it is matched and triggered with the corresponding signal in the corresponding actuator control signal to generate a demonstration signal. When a record with a invalid logic match is extracted from the logic matching result, it is matched and triggered with the corresponding signal in the corresponding actuator control signal to generate a control signal.
9. The intelligent programming control method based on SmartCode according to claim 8, characterized in that, The signal format was adapted to the MagicBlock sensor device, and the actuator parameters were extracted. The servo signal is a PWM pulse with a period of 20ms. The high level of 0.5~2.5ms corresponds to 0~180°. The signal transmission delay was analyzed. Bluetooth 5.3 speed set to 2Mbps, latency ≤10ms in open environment, retrieving pre-stored latency thresholds and transmission latency. Joint analysis: If transmission delay If the delay is less than or equal to the threshold, a signal will be generated and transmitted; otherwise, the transmission delay will be less than or equal to the threshold. >Delay threshold, then the set of educational control signals.
10. A SmartCode-based intelligent programming control system, used in the MagicCode-based intelligent programming control method according to any one of claims 1-9, characterized in that, Includes the following steps: The MagicCode main control unit is equipped with a unique product identification code and a programmable I / O interface, and can retrieve pre-stored data by associating with relevant databases. The MagicLink wireless communication module communicates with the MagicCode main control unit and supports Bluetooth dual-mode transmission. MagicBlock sensor / actuator arrays interact with the MagicCode main control unit via standard communication protocols; The graphical programming software system runs on an external computing device and is used to generate control logic and send it to the MagicCode main control unit.