Disclosure of Invention
The invention aims to provide a computer allowance detection method for a multimedia classroom, which can identify a computer through a color code sensor in a camera and send a signal to a PLC (programmable logic controller), and if the number of computer faults exceeds a set value, the PLC can send a notification signal to a worker.
The technical purpose is realized by the following technical scheme: a multimedia classroom computer residual amount detection method comprises the following steps: 1) the teacher end controls the student end to start up; 2) the method comprises the following steps that a camera near a student end is started, whether a computer is started or not is identified through a color code sensor, and corresponding signals are fed back to a PLC controller respectively; 3) The PLC carries out margin statistics according to the feedback signal to obtain a margin statistic value x; 4) the PLC compares the residual quantity statistic value x with a set residual quantity, and if the residual quantity statistic value x is larger than the set residual quantity, a notification signal is automatically sent out; 5) shutting down the camera and normally giving lessons; 6) after the course is finished, the teacher end controls the student end to shut down, and the PLC resets.
By adopting the technical scheme, the PLC can carry out margin statistics according to the feedback signal and obtain a margin statistic value x, the margin statistic value x is compared with the set margin, if the margin statistic value x is larger than the set margin, the PCL automatically sends out a notification signal to notify a worker to prepare for maintenance; if the set margin is not exceeded, the notice signal is not sent out, and the class is normally attended.
Further setting the following steps: the color mark sensor is used for detecting the edge of the computer display screen, wherein the distribution of the edge is represented by a gradient, and for a two-dimensional function f (x, y), the two-dimensional function can be defined in the form of a vector, and the following steps are provided:
the gradient magnitude of the vector can be approximated by an absolute value:
and x and y are the acquisition coordinate points of the color scale sensor respectively.
By adopting the technical scheme, the color mark sensor can calculate the gradient amplitude G (x, y) of the vector and feed back the gradient amplitude G (x, y) to the PLC, the algorithm can improve the accuracy by changing the gradient amplitude G (x, y) of a large number of vectors collected by the collection coordinate point of the color mark sensor, and meanwhile, the approximate calculation can ensure the accuracy of the result and correspondingly reduce the calculation amount.
Further setting the following steps: and the PLC carries out margin statistics according to the gradient amplitudes G (x, y) of the received vectors to obtain a feedback signal 1 and a feedback signal 0, wherein the margin statistic value x is the number of the feedback signals 0.
By adopting the technical scheme, the PLC controller obtains the feedback signal 1 if the student-side computer is normally started up and obtains the feedback signal 0 if the student-side computer cannot be normally started up through processing, and the feedback signals are distinguished.
Further setting the following steps: the set allowance =2/3 (a-B), wherein a is the total number of computers at the student end in the classroom, B is the number of students in class, and the PLC controller starts the notification signal when the allowance statistic value x is larger than the set allowance.
By adopting the technical scheme, the set allowance is set and compared with the statistical allowance value x, if the statistical allowance value x is larger than the set allowance, the number of the computers indicating faults is too large, the PLC controller can send out a notification signal to a worker, and the worker is notified to prepare for maintenance.
Further setting the following steps: the teacher end controls the student end to start up, and the camera is started after 2 minutes of delay.
By adopting the technical scheme, the computer at the student end can be started within 2 minutes, and then the camera is started for identification, so that the accuracy of the feedback signal of the camera is improved.
The invention also aims to provide a computer allowance detection device for a multimedia classroom, wherein a color code sensor is arranged on a camera to collect a computer screen and feed the collected computer screen back to a PLC (programmable logic controller), and if the computer fails, the computer is rotated by 90 degrees by virtue of a rotating platform, so that the computer is indicated to fail.
The technical purpose is realized by the following technical scheme: the utility model provides a multimedia classroom computer surplus detection device, includes teacher's end and a plurality of students ' end of being connected with the teacher's end, still includes the PLC controller, the student end includes display and camera, the picture that the display screen just can be caught to the oblique side that the camera is located the display screen, the camera is provided with color mark sensor and can carries out the colour difference discernment, according to colour difference discernment result feedback signal to PLC controller.
Through adopting above-mentioned technical scheme, the teacher end is connected the student and can control opening and closing of student end computer, and the camera is provided with the color mark sensor, can detect the colour difference of screen through the color mark sensor to judge whether the computer has started and feedback signal to the PLC controller.
Further setting the following steps: the student end still includes the revolving stage, display fixed connection is in the top of revolving stage, be provided with actuating mechanism on the revolving stage, this actuating mechanism controls through the PLC controller.
Through adopting above-mentioned technical scheme, the rotation of PLC controller can be through the revolving stage of actuating mechanism control, revolving stage and display fixed connection, can drive the display and rotate together when the revolving stage rotates, and the angle of rotation is preferred 90 degrees, through observing, just can distinguish very easily that has rotated and not pivoted display.
In conclusion, the invention has the following beneficial effects: the computer display screen is detected through the camera internal color mark sensor, and signals are fed back to the PLC. The computer that breaks down rotates 90 degrees, convenient differentiation, and PLC controller carries out the surplus statistics according to feedback signal simultaneously, if the computer that breaks down surpasss the settlement quantity, the PLC controller can send the notice signal and maintain for the staff, has realized automatic computer fault management flow, does not need the staff real-time detection computer whether breaks down, also can avoid the student to go to class the not enough condition of computer.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
Referring to fig. 1, the device for detecting the computer surplus in the multimedia classroom comprises a teacher end and a plurality of student ends connected with the teacher end, wherein the teacher end can control the on and off of a computer in the student ends, and the device further comprises a control end PLC (programmable logic controller), and the PLC is connected with the teacher end and the student ends and can control devices in the teacher end and the student ends. The student end includes computer, display, revolving stage and camera, and wherein the camera is located the oblique side of display screen and can catches the picture of display screen, and the camera is provided with the color mark sensor and can carries out the colour difference discernment to the screen of display, feeds back signal to the PLC controller according to the result of colour difference discernment. The principle of color difference identification is as follows: the periphery of the screen of the display is provided with a black frame respectively, when the screen is in a black screen state, color difference cannot be generated between the screen and the black frame, and at the moment, the color scale sensor does not recognize the color difference; when the screen of the display is normally bright, the picture appears in the screen and generates obvious color difference with the surrounding black frame, and at the moment, the color scale sensor can identify the color difference. Specifically, the method comprises the following steps: the color mark sensor is used for detecting the edge of the computer display screen, wherein the distribution of the edge is represented by a gradient, and for a two-dimensional function f (x, y), the two-dimensional function can be defined in the form of a vector, and the following steps are provided:
the gradient magnitude of the vector can be approximated by an absolute value:
and x and y are the acquisition coordinate points of the color scale sensor respectively. The collection coordinate point in the color scale sensor can move along a set track, wherein the gradient amplitude G1 (x, y) of the vector of the black frame part around the display is collected in advance, the gradient amplitude G (x, y) of the corresponding coordinate vector can be detected through the movement of the collection point, if the two values are equal through comparison, the coordinate is represented as a black screen state, an invalid signal is sent to the PLC, if the two values are not equal, the coordinate color is represented as other colors except black, and an effective signal is sent to the PLC for control. The number of the coordinate acquisition points is 800 × 600, and based on a large number of coordinate acquisition points, very accurate data can be obtained through the PLC. Comparing the effective signals with the ineffective signals, considering that the desktop of the display can have black color, setting a threshold value N, wherein the threshold value N is 800 x 600 x 1%, if the number of the effective signals is greater than or equal to the threshold value N, indicating that the screen of the display is normally lightened, and controlling by the PLC to obtain a feedback signal 1; if the number of the effective signals is smaller than the threshold value N, the PLC obtains a feedback signal 0, which indicates that the display fails to start.
In addition, the display is located the top of revolving stage and with revolving stage fixed connection, and the revolving stage can carry out circumferential direction through the pivot, can drive the display and rotate together when the revolving stage rotates, and the rotation of revolving stage can be controlled to the PLC controller. The multimedia classroom is polar electronic software, a teacher end in the multimedia classroom controls a student end through teaching software of the wave multimedia teaching, the PLC controller is a Siemens 6ES7314-6CH04-0AB0 programmable PLC controller, and the color code sensor is KT 6W-2.
Referring to fig. 1 and 2, first, after the teacher end point clicks the command of the student end to start up, the computer in the student end is started up, and then the camera is turned on. In order to ensure that the computer in the student end is started before the camera is started, the camera is started after the computer in the student end receives a starting command and the starting time is delayed for 2 minutes, the computer is not started for 2 minutes, the computer fails to start normally, and the color difference identification is carried out by the color mark sensor in the camera, so that the accuracy of the collected color difference can be ensured. If the display cannot be normally started, the PLC controller can obtain a feedback signal 0 after processing the effective signal and the invalid signal fed back by the color mark sensor; if the display can be normally started, the PLC controller can obtain a feedback signal 1 after processing the effective signal and the invalid signal fed back by the color mark sensor; and then the PLC receives the feedback signals and then carries out margin statistics, the feedback signals 0 are accumulated, the feedback signals 1 are not accumulated, the feedback signals of all the student-end inner color mark sensors are processed one by one, and finally a margin statistic value x is accumulated. In addition, when the computer in this student end breaks down, PLC controller can make the revolving stage rotatory certain angle through the actuating mechanism in the revolving stage this moment, and the computer that is located the revolving stage top is connected with revolving stage fixed, consequently also can follow the revolving stage and rotate together, signals this computer and breaks down unable normal use. The drive mechanism is a motor, and the PLC controller controls the rotation of the rotary table by the motor, and the rotation angle is set to 90 degrees for direct observation.
The balance statistic x is then compared to the set balance, where set balance =2/3 (total number of student ends in classroom-number of students) and must be taken along at a point. For example, if the total number of students in classroom a is 60 and the number of students in classroom a is 50, the margin =2/3 (60-50) is set, and the result is 7 by one digit after the decimal point. If the margin statistic value x is larger than 7, the number of the computer faults is larger than the specified number, the PLC sends a notification signal to a worker, and the worker is ready to maintain before; if the margin statistic value x is less than or equal to 7 at the moment, the number of the computer faults is within a fixed number, and the PLC does not perform corresponding processing.
After the PLC controller carries out the surplus comparison, the PLC controller sends the shutdown command to the camera in all student's ends and controls all cameras to shut down, and the shutdown of camera can prevent that factors such as personnel's motion from bringing the maloperation, influences the collection degree of accuracy of the color mark sensor in the camera. And then, the student normally carries out the class, and after the teacher end point clicks the shutdown command of the student end after the class is finished, the computer in the student end is shut down. The PLC controller resets after receiving teacher's end shutdown command, and surplus statistics is clear 0, and PLC controller also can "reset" according to the control revolving stage simultaneously, and the revolving stage that has rotated 90 degrees is just changeed along former route promptly to control, resumes to original position. The total computer number of each classroom in the allowance setting value is fixed, the number of students in class is input by a teacher at a computer of a teacher end before class, then the set allowance is automatically calculated after the teacher end controls a starting command of the student end, and if the teacher does not input the allowance, the default value of the set allowance is 7.
The present embodiment is only for explaining the present invention, and it is not limited to the present invention, and those skilled in the art can make modifications of the present embodiment without inventive contribution as needed after reading the present specification, but all of them are protected by patent law within the scope of the claims of the present invention.