Bubble sorting algorithm demonstration teaching aid

By designing bubble sorting algorithm demonstration teaching aids, using the grabbing mechanism, machine vision system and driving mechanism, the physical demonstration of the bubble sorting algorithm is realized, solving the problem that students find it difficult to intuitively understand the algorithm and improving the teaching effect.

CN222784955UActive Publication Date: 2025-04-22陈绍友
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420931033.7
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-04-22
Estimated Expiration
2034-04-30

AI Technical Summary

Technical Problem

In the process of computer algorithm teaching, there is a lack of physical teaching aids to automatically demonstrate the bubble sorting algorithm, which makes it difficult for students to intuitively understand the specific process of the algorithm.

Method used

A bubble sorting algorithm demonstration teaching aid was designed, including a seat body, a grab mechanism, a driving mechanism and a machine vision system. The teaching aid captures the sphere through the grabbing mechanism, the machine vision system recognizes the numerical markings, and sorts it according to the bubble sorting steps through the drive mechanism, real demonstration of the bubble sorting algorithm is realized.

Benefits of technology

An intuitive physical demonstration of the bubble sorting algorithm is realized, helping students to understand the specific process and working principle of the algorithm more clearly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222784955U_ABST
    Figure CN222784955U_ABST
Patent Text Reader

Abstract

The utility model discloses a bubble sorting algorithm demonstration teaching aid, which can grab balls to be sorted on one or two seat bodies through a grabbing mechanism, identify digital labels on the two grabbed balls through a machine vision system and compare the sizes of the digital labels. The controller of the machine vision system controls the driving mechanism and the grabbing mechanism to be matched, the balls are sorted according to the bubble sorting step and the size of the digital labels, the bubble sorting step is demonstrated, and therefore real object demonstration of the bubble sorting algorithm is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of computer teaching aids, in particular to a bubble sorting algorithm demonstration teaching aid. Background Art

[0002] Bubble Sort is a simple sorting algorithm that repeatedly traverses the sequence to be sorted, compares two elements at a time, and swaps them if they are in the wrong order. In each traversal, the largest element will "float" to the top of the sequence like a bubble, hence the name.

[0003] The basic steps of bubble sort are as follows:

[0004] 1. Compare adjacent elements. If the first is greater than the second, swap them.

[0005] 2. Do the same for each pair of adjacent elements, starting from the first pair at the beginning and ending with the last pair at the end.

[0006] 3. Repeat the above steps for all elements except the last one.

[0007] 4. Continue repeating the above steps for fewer and fewer elements each time, until there are no pairs of numbers that need to be compared.

[0008] The time complexity of bubble sort is O(n^2) in both the worst and average cases, where n is the length of the list. In the worst case, when the input array is completely reversed, n(n-1) / 2 comparisons and swaps are required. In the best case, when the input array is already completely ordered, bubble sort only needs n-1 comparisons and no swaps are required.

[0009] At present, in the process of teaching computer algorithms, there are no physical teaching aids to automatically demonstrate the process of bubble sort to students, resulting in students not being able to intuitively understand the specific process of the bubble sort. Utility Model Content

[0010] In view of the defects in the prior art, the utility model provides a bubble sort algorithm demonstration teaching aid to solve the technical problems raised in the background technology.

[0011] Bubble sort algorithm demonstration teaching aids, including:

[0012] A seat body, the seat body having a plurality of horizontally spaced receiving grooves, each receiving groove correspondingly and movably placing a ball, and each ball surface having a different numerical label;

[0013] A gripping mechanism, the gripping mechanism comprising a mounting seat and two vacuum suction assemblies mounted on the mounting seat at intervals, wherein the distance between the two vacuum suction assemblies is equal to the distance between the centers of the two spheres;

[0014] A driving mechanism, wherein the driving mechanism is arranged on the seat body, the mounting seat is mounted on the driving mechanism, and the driving mechanism drives the mounting seat to reciprocate along the distribution direction of the spheres; and

[0015] A machine vision system, the machine vision system comprising a controller and an industrial camera, the industrial camera being connected to the controller by electrical signals, the industrial camera being mounted on one side of the mounting seat, the lens of the industrial camera being arranged toward the vacuum suction component, and the industrial camera being arranged between two of the vacuum suction components;

[0016] The driving mechanism and the vacuum suction component are both connected to the controller by electrical signals.

[0017] Further, the vacuum suction assembly includes an electric cylinder and a vacuum suction nozzle installed on the telescopic rod of the electric cylinder, the vacuum suction nozzle is connected to an external negative pressure device through a pipeline, the pipeline is connected to a solenoid valve, the solenoid valve is fixedly installed on the upper surface of the mounting seat, and the solenoid valve is connected to the controller by electrical signals;

[0018] The electric cylinder is vertically fixed on the mounting seat, and the electric cylinder is connected to the controller by electrical signals.

[0019] Furthermore, the negative pressure equipment is a vacuum generator.

[0020] Furthermore, the driving mechanism includes a lead screw and a motor, both ends of the lead screw are rotatably mounted on the seat body through a bearing seat, the motor is transmission-connected to the lead screw, and the motor is fixedly mounted on the seat body;

[0021] The mounting seat is mounted on the lead screw via a lead screw slider;

[0022] The motor is connected to the controller by electrical signals.

[0023] Furthermore, the motor is a servo motor.

[0024] Furthermore, two light sources are spaced apart at the bottom of the mounting seat, and the distance between the two light sources is equal to the distance between the centers of the two spheres.

[0025] Furthermore, the light source is an LED lamp.

[0026] Furthermore, the sphere is a table tennis ball.

[0027] The beneficial effects of the utility model are embodied in:

[0028] The bubble sorting algorithm demonstration teaching aid provided by the utility model can grab the balls to be sorted on one or two bases through a grabbing mechanism, then identify the digital numbers on the two grabbed balls through a machine vision system and compare the sizes of the digital numbers, and the controller of the machine vision system controls the driving mechanism and the grabbing mechanism to cooperate, sort the balls according to the sizes of the digital numbers according to the bubble sorting steps, so as to demonstrate the bubble sorting steps, thereby realizing a physical demonstration of the bubble sorting algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.

[0030] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. For ordinary technicians in this field, other accompanying drawings can also be obtained based on these accompanying drawings without paying creative labor.

[0031] Figure 1 A front view of a bubble sort algorithm demonstration teaching aid provided by an embodiment of the utility model;

[0032] Figure 2 A left view of a bubble sort algorithm demonstration teaching aid provided by an embodiment of the utility model;

[0033] Figure 3 A schematic diagram of a photo taken by an industrial camera provided in an embodiment of the utility model;

[0034] The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings have shown clear embodiments of this application, which will be described in more detail later. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0035] The following embodiments of the technical solution of the present invention are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and are therefore only used as examples, and cannot be used to limit the protection scope of the present invention.

[0036] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by those skilled in the art to which the present invention belongs.

[0037] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0038] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the present invention, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.

[0039] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0040] In the present application, unless otherwise clearly specified and limited, a first feature being “above” or “below” a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being “above”, “above”, and “above” a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being “below”, “below”, and “below” a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0041] like Figure 1-Figure 2As shown, the utility model provides a bubble sort algorithm demonstration teaching aid, including a base 1, a grasping mechanism, a driving mechanism and a machine vision system. The base 1 has a plurality of horizontally spaced receiving slots 2, each of which has a corresponding sphere 3 movably placed in each receiving slot 2, and each sphere 3 has a different digital label on its surface. In this embodiment, the sphere 3 can be a ping-pong ball, and each ping-pong ball has a digital label attached thereto, for example, there are 10 ping-pong balls, and the digital labels on the 10 ping-pong balls are 0-9 respectively.

[0042] The gripping mechanism includes a mounting seat 4 and two vacuum suction components installed on the mounting seat 4 at intervals, and the distance between the two vacuum suction components is equal to the distance between the centers of the two spheres 3. Specifically, the vacuum suction component includes an electric cylinder 11 and a vacuum suction nozzle 6 installed on the telescopic rod of the electric cylinder 11. The vacuum suction nozzle 6 is connected to an external negative pressure device through a pipeline, and a solenoid valve 7 is connected to the pipeline. The solenoid valve 7 is fixedly installed on the upper surface of the mounting seat 4, and the solenoid valve 7 is connected to the controller of the machine vision system by electrical signals.

[0043] The electric cylinder 11 is vertically fixed on the mounting base 4, and the electric cylinder 11 is also connected to the controller of the machine vision system by electrical signals. In this embodiment, the controller and the power supply can be set in the base 1. The vacuum suction component is arranged above the sphere 3. After the electric cylinder 11 of the vacuum suction component extends downward, the vacuum suction nozzle 6 is close to the surface of the sphere 3. In this way, when the solenoid valve 7 is opened, the vacuum suction nozzle 6 is connected to the negative pressure device, and the vacuum suction nozzle 6 can absorb the sphere 3 facing below. When the electric cylinder 11 retracts, the corresponding sphere 3 can be grabbed and lifted.

[0044] In this embodiment, the negative pressure device may be a vacuum generator.

[0045] The driving mechanism is arranged on the seat body 1, the mounting seat 4 is mounted on the driving mechanism, and the driving mechanism drives the mounting seat 4 to reciprocate along the distribution direction of the spheres 3. Specifically, the driving mechanism includes a lead screw 8 and a motor 9, both ends of the lead screw 8 are rotatably mounted on the seat body 1 through a bearing seat, the motor 9 is connected to the lead screw 8 by transmission, and the motor 9 is fixedly mounted on the seat body 1; the mounting seat 4 is mounted on the lead screw 8 through a lead screw slider; the motor 9 is connected to the controller of the machine vision system by electrical signals.

[0046] In order to accurately control the speed of the motor 9 and the displacement of the mounting seat 4, the motor 9 adopts a servo motor. The motor 9 drives the lead screw 8 to rotate forward or reversely through the coupling, so as to control the displacement of the mounting seat 4 along the lead screw 8, thereby controlling the vacuum suction component on the mounting seat 4 to face the corresponding ball 3.

[0047] The machine vision system includes a controller and an industrial camera 5, and the industrial camera 5 is connected to the controller by electrical signals. The industrial camera 5 is mounted on one side of the mounting base 4, and the lens of the industrial camera 5 is set toward the vacuum suction component. The industrial camera 5 is set between two vacuum suction components. The industrial camera 5 takes pictures of two or three spheres 3 within a preset size viewing angle, such as Figure 3 As shown, one ball 3 in the photo is adsorbed on the vacuum nozzle 6, and the other or two balls 3 are placed on the base 1, and the photographed photo is sent to the controller, which recognizes the digital labels on the two or three balls 3 through the existing machine vision technology and compares the size of the digital labels. Then, the controller controls the driving mechanism and the grasping mechanism to cooperate according to the bubble sorting algorithm, and sorts the balls 3 according to the size of the digital labels according to the bubble sorting steps to demonstrate the bubble sorting steps, thereby realizing a physical demonstration of the bubble sorting algorithm.

[0048] To make the photographs clearer, two light sources 10 are spaced apart at the bottom of the mounting base 4, and the distance between the two light sources 10 is equal to the distance between the centers of the two spheres 3, so as to provide supplementary light to the surface of the spheres 3. In this embodiment, the light source 10 is an LED lamp.

[0049] Finally, it should be noted that the various technical features of the technical solution of the present application can be combined arbitrarily. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.

[0050] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the scope of the claims and specification of the present invention.

Claims

1. The bubble sort algorithm demonstration teaching aid is characterized by: include: A seat body (1), the seat body (1) having a plurality of horizontally spaced receiving grooves (2), each receiving groove (2) correspondingly and movably placing a sphere (3), and each sphere (3) having a different numerical label on its surface; A gripping mechanism, the gripping mechanism comprising a mounting seat (4) and two vacuum suction components mounted on the mounting seat (4) at intervals, the spacing between the two vacuum suction components being equal to the spacing between the centers of the two spheres (3); a driving mechanism, the driving mechanism being arranged on the seat body (1), the mounting seat (4) being mounted on the driving mechanism, the driving mechanism driving the mounting seat (4) to reciprocate along the distribution direction of the spheres (3); and A machine vision system, the machine vision system comprising a controller and an industrial camera (5), the industrial camera (5) being electrically connected to the controller, the industrial camera (5) being mounted on one side of the mounting seat (4), the lens of the industrial camera (5) being arranged toward the vacuum suction component, and the industrial camera (5) being arranged between two of the vacuum suction components; The driving mechanism and the vacuum suction component are both connected to the controller by electrical signals.

2. The bubble sort algorithm demonstration teaching aid according to claim 1, characterized in that: The vacuum suction assembly comprises an electric cylinder (11) and a vacuum suction nozzle (6) mounted on a telescopic rod of the electric cylinder (11); the vacuum suction nozzle (6) is connected to an external negative pressure device via a pipeline; the pipeline is connected to a solenoid valve (7); the solenoid valve (7) is fixedly mounted on the upper surface of the mounting seat (4); and the solenoid valve (7) is connected to an electrical signal of the controller; The electric cylinder (11) is vertically fixedly mounted on the mounting seat (4), and the electric cylinder (11) is connected to the controller via an electrical signal.

3. The bubble sort algorithm demonstration teaching aid according to claim 2, characterized in that: The negative pressure device is a vacuum generator.

4. The bubble sort algorithm demonstration teaching aid according to claim 1, characterized in that: The driving mechanism comprises a lead screw (8) and a motor (9), the two ends of the lead screw (8) are rotatably mounted on the base body (1) via bearing seats, the motor (9) is transmission-connected to the lead screw (8), and the motor (9) is fixedly mounted on the base body (1); The mounting seat (4) is mounted on the lead screw (8) via a lead screw slider; The motor (9) is connected to the controller via electrical signals.

5. The bubble sort algorithm demonstration teaching aid according to claim 4, characterized in that: The motor (9) is a servo motor.

6. The bubble sort algorithm demonstration teaching aid according to claim 1, characterized in that: Two light sources (10) are also arranged at intervals at the bottom of the mounting seat (4), and the distance between the two light sources (10) is equal to the distance between the centers of the two spheres (3).

7. The bubble sort algorithm demonstration teaching aid according to claim 6, characterized in that: The light source (10) is an LED lamp.

8. The bubble sort algorithm demonstration teaching aid according to claim 1, characterized in that: The sphere (3) is a table tennis ball.