Monitoring method and device of electronic equipment, storage medium and electronic equipment
1. An electronic device based monitoring method, the method comprising:
acquiring at least two pieces of distance information of the face of a user from the electronic equipment according to a preset time interval;
marking the at least two pieces of distance information as regular distance information or irregular distance information through a preset marking rule, wherein the marking rule is a preset marking formula, and the marking formula is as follows:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j-th central point corresponding to the i-th distance information sample when the conversion value isAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueWhen the distance is smaller than or equal to the threshold value X, marking as conventional distance information;
and if the irregular distance information of the first quantity is continuously generated, generating a first monitoring result, wherein the first monitoring result is used for controlling the electronic equipment to enter an alarm state.
2. The method according to claim 1, wherein the obtaining at least two pieces of distance information of the face of the user from the electronic device according to a preset time interval specifically comprises:
acquiring the frequency variation of an alternating magnetic field between the electronic equipment and the face of the user according to a preset time interval, wherein the alternating magnetic field is a magnetic field generated by the electronic equipment;
and acquiring the at least two pieces of distance information through the frequency variation.
3. The method according to claim 1, wherein the obtaining at least two pieces of distance information of the face of the user from the electronic device according to a preset time interval specifically comprises:
acquiring at least two detection images according to a preset time interval, wherein the at least two detection images comprise face images of the user;
and acquiring the at least two pieces of distance information according to the ratio of the face image of the user to the detection image.
4. The method according to claim 1, wherein the marking the at least two pieces of distance information as regular distance information or irregular distance information by a pre-configured marking rule specifically comprises:
judging whether the distance information falls into a preset threshold interval or not;
if so, marking the distance information as irregular distance information;
and if not, marking the distance information as the conventional distance information.
5. The method according to claim 4, wherein the threshold intervals are set to be at least two in number, and at least two of the threshold intervals respectively correspond to different alarm states;
if the irregular distance information of the first number is continuously generated, a first monitoring result is generated, wherein the first monitoring result is used for controlling the electronic device to enter the warning state, and the method specifically includes:
determining the threshold interval into which the last distance information in time sequence falls when a first number of irregular distance information is continuously generated;
and determining the warning state according to the threshold interval in which the last distance information falls in the time sequence.
6. The method of claim 5, wherein at least two of the threshold intervals comprise: a first threshold interval, a second threshold interval and a third threshold interval; the numerical values contained in the first threshold interval, the second threshold interval and the third threshold interval are continuously and sequentially reduced;
the warning state corresponding to the first threshold interval is as follows: displaying prompt information;
the warning state corresponding to the second threshold interval is as follows: sending out a prompt tone;
the warning state corresponding to the third threshold interval is as follows: and displaying the prompt information and sending a prompt tone.
7. The method of claim 1, wherein if the first amount of irregular distance information is continuously generated, generating a first monitoring result, wherein the first monitoring result is used for controlling the electronic device to enter an alert state, and the method further comprises:
if a second amount of irregular distance information is continuously generated, controlling the electronic equipment to reduce the brightness;
and if the third amount of irregular distance information is continuously generated, controlling the electronic equipment to screen-turn.
8. An electronic device based monitoring apparatus, the apparatus comprising:
the acquisition module is used for acquiring at least two pieces of distance information of the face of the user from the electronic equipment according to a preset time interval;
a marking module, configured to mark the at least two pieces of distance information as regular distance information or irregular distance information according to a preconfigured marking rule, where the marking rule is a preconfigured marking formula, and the marking formula is:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j-th central point corresponding to the i-th distance information sample when the conversion value isAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueWhen the distance is smaller than or equal to the threshold value X, marking as conventional distance information;
the generating module is used for generating a first monitoring result if a first amount of irregular distance information is continuously generated, wherein the first monitoring result is used for controlling the electronic equipment to enter a warning state.
9. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out an electronic device-based monitoring method according to any one of claims 1 to 7.
10. An electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements an electronic device based monitoring method according to any one of claims 1 to 7 when executing the computer program.
Background
With the development of computer technology, people can purchase various electronic devices with displays to perform work or life entertainment, that is, various electronic devices with multimedia display and data processing functions are widely applied in daily life. When the electronic device is used, the distance between the display screen of the electronic device and the face of the user is too small, that is, when the user is too close to the face of the electronic device, the electronic device may cause certain damage to the body of the user, such as myopia or radiation.
In a traditional use situation, a monitoring method for the electronic device is urgently needed to solve the technical problem that a user body is injured due to the fact that a face of the user is too close to a screen of the electronic device.
Disclosure of Invention
The embodiment of the application provides a monitoring method and device based on electronic equipment, a storage medium and the electronic equipment, and aims to solve the technical problem that the traditional electronic equipment cannot monitor the improper use behavior that a user is too close to the electronic equipment, so that the physical injury is caused.
A first aspect of an embodiment of the present application provides a monitoring method based on an electronic device, where the method includes:
acquiring at least two pieces of distance information of the face of a user from the electronic equipment according to a preset time interval;
marking the at least two pieces of distance information as regular distance information or irregular distance information through a preset marking rule, wherein the marking rule is a preset marking formula, and the marking formula is as follows:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j-th central point corresponding to the i-th distance information sample when the conversion value isAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueWhen the distance is smaller than or equal to the threshold value X, marking as conventional distance information;
and if the irregular distance information of the first quantity is continuously generated, generating a first monitoring result, wherein the first monitoring result is used for controlling the electronic equipment to enter an alarm state.
Optionally, the obtaining at least two pieces of distance information of the face of the user from the electronic device according to a preset time interval specifically includes:
acquiring the frequency variation of an alternating magnetic field between the electronic equipment and the face of the user according to a preset time interval, wherein the alternating magnetic field is a magnetic field generated by the electronic equipment;
and acquiring the at least two pieces of distance information through the frequency variation.
Optionally, the obtaining at least two pieces of distance information of the face of the user from the electronic device according to a preset time interval specifically includes:
acquiring at least two detection images according to a preset time interval, wherein the at least two detection images comprise face images of the user;
and acquiring the at least two pieces of distance information according to the ratio of the face image of the user to the detection image.
Optionally, the marking the at least two pieces of distance information as regular distance information or irregular distance information by a pre-configured marking rule specifically includes:
judging whether the distance information falls into a preset threshold interval or not;
if so, marking the distance information as irregular distance information;
and if not, marking the distance information as the conventional distance information.
Optionally, the number of the threshold intervals is at least two, and the at least two threshold intervals correspond to different warning states respectively;
if the irregular distance information of the first number is continuously generated, a first monitoring result is generated, wherein the first monitoring result is used for controlling the electronic device to enter the warning state, and the method specifically includes:
determining the threshold interval into which the last distance information in time sequence falls when a first number of irregular distance information is continuously generated;
and determining the warning state according to the threshold interval in which the last distance information falls in the time sequence.
Optionally, at least two of the threshold intervals comprise: a first threshold interval, a second threshold interval and a third threshold interval; the numerical values contained in the first threshold interval, the second threshold interval and the third threshold interval are continuously and sequentially reduced;
the warning state corresponding to the first threshold interval is as follows: displaying prompt information;
the warning state corresponding to the second threshold interval is as follows: sending out a prompt tone;
the warning state corresponding to the third threshold interval is as follows: and displaying the prompt information and sending a prompt tone.
Optionally, if a first amount of irregular distance information is continuously generated, a first monitoring result is generated, where the first monitoring result is used to control the electronic device to enter an alert state, and the method further includes:
if a second amount of irregular distance information is continuously generated, controlling the electronic equipment to reduce the brightness;
and if the third amount of irregular distance information is continuously generated, controlling the electronic equipment to screen-turn.
A second aspect of the embodiments of the present application provides an electronic device-based monitoring apparatus, including:
the acquisition module is used for acquiring at least two pieces of distance information of the face of the user from the electronic equipment according to a preset time interval;
a marking module, configured to mark the at least two pieces of distance information as regular distance information or irregular distance information according to a preconfigured marking rule, where the marking rule is a preconfigured marking formula, and the marking formula is:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j-th central point corresponding to the i-th distance information sample when the conversion value isAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueWhen the distance is smaller than or equal to the threshold value X, marking as conventional distance information;
the generating module is used for generating a first monitoring result if a first amount of irregular distance information is continuously generated, wherein the first monitoring result is used for controlling the electronic equipment to enter a warning state.
A third aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the foregoing monitoring method based on the electronic device.
A fourth aspect of the present embodiments provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the monitoring method based on electronic equipment as described above.
A fifth aspect of embodiments of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the monitoring method based on an electronic device provided in the first aspect of embodiments of the present application.
Compared with the prior art, the implementation mode of the invention has the following beneficial effects: firstly, acquiring at least two pieces of distance information of a face of a user from the electronic equipment according to a preset time interval, and then marking the at least two pieces of distance information as regular distance information or irregular distance information according to a preset marking rule, wherein the marking rule is a preset marking formula:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j central point corresponding to the i distance information sample is used as theConverted valueAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueAnd when the distance is smaller than or equal to the threshold value X, marking the distance as conventional distance information, and finally, if a first number of pieces of irregular distance information are continuously generated, generating a first monitoring result, wherein the first monitoring result is used for controlling the electronic equipment to enter a warning state. Through right distance information between user and the electronic equipment monitors to confirm whether electronic equipment gets into the warning state, with indicate and correct the user action, with solved traditional electronic equipment because of the user too presses close to this technical problem of user's health injury is caused to electronic equipment's screen, and then improves electronic equipment's user experience and the great technological effect who satisfies the market demand.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
Fig. 1 is a schematic flowchart of a first implementation process of a monitoring method based on an electronic device according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a second implementation process of a monitoring method based on an electronic device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device based monitoring apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the order of writing each step in this embodiment does not mean the order of execution, and the order of execution of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of this embodiment.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to explain the technical means described in the present application, the following description will be given by way of specific embodiments.
Referring to fig. 1, it is a flowchart of a first implementation procedure of a monitoring method based on an electronic device according to an embodiment of the present application, and for convenience of description, only a part related to the embodiment of the present application is shown.
First, one or more embodiments of the present specification provide an electronic device based monitoring method.
The method of this embodiment may be executed by any single electronic device having a multimedia display function and a data processing function, that is, each step included in the method of this embodiment may be executed by the same electronic device. In addition, the method of the embodiment can also be completed by mutually matching a plurality of electronic devices. In such a distributed scenario, one of the devices may perform only one or more steps of the method of one or more embodiments of the present disclosure, and the devices may interact with each other to complete the method.
As an optional application scenario, the electronic device is a student terminal with an electronic textbook and a teaching interaction function, and a user of the electronic device is a student. When the monitoring method is implemented by a single electronic device, the monitoring method based on the electronic device is executed by the student terminal. When the interactive implementation is carried out through a plurality of electronic devices, besides the student terminals, the interactive implementation also comprises a teacher terminal used for controlling the student terminals, and users of the teacher terminal are teachers, and can carry out data interaction with the student terminals through the teacher terminal and control the student terminals; correspondingly, the using prompting method of the electronic equipment comprises the step that the student terminal and the teacher terminal respectively execute partial steps. In the following embodiments, the application scenarios related to the teaching are all described as examples. It can be understood that the application scenario related to the teaching is not limited to the application scenario of the method of this embodiment, and based on the content and effect of the present disclosure, a person skilled in the art may apply the technical solution of the present disclosure to any other suitable application scenario, such as a scenario where a user works through a PC, or a scenario where a user uses a mobile phone daily.
A preferred embodiment of the present disclosure may be that, the monitoring method based on the electronic device includes:
and S101, acquiring at least two pieces of distance information of the face of the user from the electronic equipment according to a preset time interval.
In this embodiment, the electronic device performs at least two consecutive detections to obtain at least two pieces of distance information reflecting a distance from the face of the user to the electronic device, where the at least two pieces of distance information are used to jointly determine a usage state of the electronic device by the user in a subsequent step.
Wherein the detection is performed at least twice consecutively based on a predetermined time interval. The time intervals may be equal and flexibly set according to specific needs, such as 5 seconds, 10 seconds, 30 seconds, etc. In addition, the time intervals may also be set to be unequal; the time interval between two adjacent detections gradually decreases as the number of detections increases; alternatively, different time intervals may be set according to different time periods, for example, in the morning, when students are energetic, a relatively long time interval may be set, for example, 20 seconds, and in the afternoon, when students are apt to be tired and to be distracted from controlling the distance from the face to the student terminal, a relatively short time interval may be set, for example, 10 seconds.
In some possibly implemented embodiments, the obtaining at least two pieces of distance information of the face of the user from the electronic device according to a preset time interval specifically includes:
s201: and acquiring the frequency variation of an alternating magnetic field between the electronic equipment and the face of the user according to a preset time interval, wherein the alternating magnetic field is a magnetic field generated by the electronic equipment.
As can be seen from the related electromagnetic field principle, when a person or other conductor approaches an alternating magnetic field generated by an oscillating circuit with an inductance diagram, an induced current (eddy current) is generated on the surface of a human body, and the induced current generates a reverse magnetic field to hinder a magnetic field generated by the inductance, so that the equivalent impedance of a load is lowered, the voltage of the load is lowered, and the generated frequency is lowered. The induced current is related to the resistivity of the measured object, the permeability of the measured object, the distance of the measured object from the coil, and the frequency of the current through the coil. When the resistivity of the object to be measured, the permeability of the object to be measured and the frequency of the current passing through the coil are all unchanged, the induced current is only related to the distance between the object to be measured and the coil, and the load voltage variation and the frequency variation are functions related to the distance between the object to be measured and the coil.
S202: and acquiring the at least two pieces of distance information through the frequency variation.
Wherein, based on the above principle, an oscillation circuit with an inductance diagram is provided on the electronic device to generate an alternating magnetic field in the vicinity of the electronic device, and a frequency change of the alternating magnetic field is continuously detected by a detection device at predetermined time intervals to obtain at least two frequency change amounts; and for each frequency variation, calculating the distance information according to a preset functional relation after amplifying and filtering the frequency variation. Similarly, the variation of the load voltage in the oscillating circuit may be detected, and the distance information may be calculated according to a preset functional relationship.
In some other possibly implemented embodiments, the obtaining at least two pieces of distance information of the face of the user from the electronic device according to the preset time interval specifically includes:
acquiring at least two detection images according to a preset time interval, wherein the at least two detection images comprise face images of the user;
and acquiring the at least two pieces of distance information according to the ratio of the face image of the user to the detection image.
The detection image comprising the face image of the student is collected through a camera which is carried by the student terminal or is installed outside the student terminal. Under the image acquisition mode, when the face of the student is close to the student terminal, the area percentage occupied by the face image of the student in the detection image is larger; when the face of the student is far away from the student terminal, the area percentage occupied by the face image of the student in the detection image is smaller. That is, the area percentage of the student face image in the detection image has a certain functional relationship with the distance from the student face to the student terminal; the functional relation can be summarized through using data of a large number of students to the student terminals. Furthermore, the area percentage of the student face image in each detection image is determined according to at least two detection images acquired at a preset time interval, and the distance information can be calculated according to the obtained functional relation.
Of course, the distance information may be obtained in other ways than the two embodiments described above. The distance information, such as by way of infrared ranging; or the distance information is obtained by collecting images including student terminals used by students and analyzing and processing the images in an artificial intelligence mode.
It should be noted that, an existing face image set may be used to perform corresponding preprocessing, in an embodiment of the present invention, taking WIDER FACE data set as an example, a WIDER FACE data set is a benchmark data set for face detection, and includes 32203 images and 393703 annotated faces, where 158989 annotated faces are located in a training set, and 39496 annotated faces are located in a verification set. Each subset contains 3 levels of detection difficulty: easy, Medium, Hard. The FACEs have a large variation range in scale, posture, illumination, expression and occlusion, WIDER FACE selected images mainly come from a public data set WIDER, WIDER FACE is divided into 61 categories, and 40%, 10% and 50% of each category are randomly selected as training, verification and test sets.
In addition, the WIDER FACE data set was preprocessed: the pretreatment comprises the following steps: and carrying out random cutting, color disturbance, random overturning and scaling to a fixed size on the original image in the data set. Selecting a random proportion for the shortest side in the image, and randomly cutting a square area in the image according to the length; randomly adjusting the contrast and saturation of the image obtained after the clipping in the range of (0.5-1.5); then, randomly overturning the image; and the processed images are uniformly scaled to 640 multiplied by 640, so that the subsequent training in the convolutional neural network is facilitated.
S102: marking the at least two pieces of distance information as regular distance information or irregular distance information through a preset marking rule, wherein the marking rule is a preset marking formula, and the marking formula is as follows:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j-th central point corresponding to the i-th distance information sample when the conversion value isAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueAnd when the distance is smaller than or equal to the threshold value X, marking as the conventional distance information.
In this embodiment, at least two pieces of distance information obtained in the foregoing steps are respectively corresponding to a normal state or an abnormal state. It should be noted that the classification and labeling of the distance information are performed according to the distance information and a preconfigured labeling rule, and the preconfigured labeling rule may be a commonly used algorithm model.
In some possibly implemented embodiments, the marking, by a pre-configured marking rule, the at least two pieces of distance information as regular distance information or irregular distance information specifically includes:
judging whether the distance information falls into a preset threshold interval or not;
if so, marking the distance information as irregular distance information;
and if not, marking the distance information as the conventional distance information.
In this embodiment, the threshold interval may be preset according to a distance that should be maintained under a normal condition without significantly affecting the eyesight when the user uses the electronic device. The threshold interval can be set correspondingly according to the size of the electronic equipment; in general, if the student terminal is a handheld device or a desktop PC, the threshold interval may be set to 0-30 cm; in other application scenarios, when the electronic device is large in size, such as a large display screen and an electronic whiteboard, the threshold interval may be set to 0-150 cm. The endpoint values specifically related to the threshold interval are only examples, and can be flexibly set according to implementation needs in a specific implementation process.
The preconfigured marking rule is a preconfigured statistical model, the statistical model is a preconfigured model that can detect whether each piece of position information included in the time series is abnormal through a set statistical determination method, and the statistical determination method in this embodiment may be various determination methods based on a statistical analysis principle, such as a normal distribution method based on a 3sigma principle, and Tukey's test based on graph-based detection. The unsupervised learning model is a pre-constructed model capable of detecting whether distance information included in at least two pieces of distance information is abnormal or not through a set unsupervised learning method, and the unsupervised learning method judges whether the distance information is abnormal or not through exciting a behavior with a correct detection result. The marking rule is not further limited in the scheme, and the marking rule can be a general type in the market.
It should be noted that, when the electronic device acquires the distance information, the distance information is input to the statistical model for classification and marking, and whether the distance information falls into a preset threshold interval is determined; if so, marking the distance information as irregular distance information; and if not, marking the distance information as the conventional distance information.
In addition, the distance information is compared with a threshold interval, if the distance information falls into the threshold interval, the distance information is corresponding to unconventional distance information, and the fact that the distance between the face of the student and the student terminal is short at the detection time corresponding to the distance information is shown, and the distance information possibly needs to be prompted; and if the distance information does not fall into the threshold interval, the distance information is corresponding to the conventional distance information, and the fact that the distance between the face of the student and the student terminal is normal at the moment of detection corresponding to the distance information is shown without prompting.
S103: and if the irregular distance information of the first quantity is continuously generated, generating a first monitoring result, wherein the first monitoring result is used for controlling the electronic equipment to enter an alarm state.
In some possible implementations, the determination of whether a prompt is needed is based on irregular distance information. Specifically, when the distance information temporarily corresponds to the irregular distance information, it indicates that the face of the user is closer to the electronic device at the detection time corresponding to the distance information, but may not need to be prompted immediately. This is because the student only carelessly lowers his head or temporarily approaches the student terminal to watch the contents carefully, and the student does not maintain the above-described posture but restores the normal posture for a short time.
In view of the above situation, in this step, statistics is performed on states corresponding to a plurality of consecutive distance information, and a prompt is given when a first number of consecutive irregular distance information is obtained. The distance information is continuously acquired at preset time intervals, if the first preset number of continuous distance information corresponds to irregular distance information, it is indicated that the user is always in a state that the distance from the face to the electronic equipment is short within a continuous period of time, and it is determined that prompt needs to be performed on the user at the moment, and a first monitoring result is generated.
In some possible embodiments, the number of the threshold intervals is at least two, and at least two of the threshold intervals respectively correspond to different warning states;
if the irregular distance information of the first number is continuously generated, a first monitoring result is generated, wherein the first monitoring result is used for controlling the electronic device to enter the warning state, and the method specifically includes:
determining the threshold interval into which the last distance information in time sequence falls when a first number of irregular distance information is continuously generated;
and determining the warning state according to the threshold interval in which the last distance information falls in the time sequence.
At least two threshold intervals are arranged, and different threshold intervals correspond to different distances from the face of the student to the student terminal. That is, in this embodiment, under the nearer condition of distance of student's face to student's terminal, further consider different proximity, to the corresponding different suggestion strategies that set up of different proximity, and then realize according to different proximity, carry out the technological effect of the suggestion of degree.
In some other possible embodiments, at least two of the threshold intervals include: a first threshold interval, a second threshold interval and a third threshold interval; the numerical values contained in the first threshold interval, the second threshold interval and the third threshold interval are continuously and sequentially reduced;
the warning state corresponding to the first threshold interval is as follows: displaying prompt information;
the warning state corresponding to the second threshold interval is as follows: sending out a prompt tone;
the warning state corresponding to the third threshold interval is as follows: and displaying the prompt information and sending a prompt tone.
In some other possible implementations, in case that the first amount of irregular distance information is continuously generated, generating a first monitoring result, where the first monitoring result is used to control the electronic device to enter an alert state, the method further includes:
if a second amount of irregular distance information is continuously generated, controlling the electronic equipment to reduce the brightness;
and if the third amount of irregular distance information is continuously generated, controlling the electronic equipment to screen-turn.
Compared with the prior art, the implementation mode of the invention has the following beneficial effects: firstly, acquiring at least two pieces of distance information of a face of a user from the electronic equipment according to a preset time interval, and then marking the at least two pieces of distance information as regular distance information or irregular distance information according to a preset marking rule, wherein the marking rule is a preset marking formula:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j-th central point corresponding to the i-th distance information sample when the conversion value isAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueAnd when the distance is smaller than or equal to the threshold value X, marking the distance as conventional distance information, and finally, if a first number of pieces of irregular distance information are continuously generated, generating a first monitoring result, wherein the first monitoring result is used for controlling the electronic equipment to enter a warning state. Through right distance information between user and the electronic equipment monitors to confirm whether electronic equipment gets into the warning state, with indicate and correct the user action, with solved traditional electronic equipment because of the user too presses close to this technical problem of user's health injury is caused to electronic equipment's screen, and then improves electronic equipment's user experience and the great technological effect who satisfies the market demand.
Corresponding to the monitoring apparatus based on electronic device in the foregoing embodiment of the monitoring method based on electronic device, fig. 3 shows a structural block diagram of a monitoring apparatus based on electronic device according to an embodiment of the present application, and for convenience of description, only the relevant parts of the embodiment of the present application are shown.
Referring to fig. 3, an electronic device based monitoring apparatus 300, the apparatus 300 comprising:
an obtaining module 301, configured to obtain at least two pieces of distance information between a face of a user and the electronic device according to a preset time interval;
a marking module 302, configured to mark the at least two pieces of distance information as regular distance information or irregular distance information according to a preconfigured marking rule, where the marking rule is a preconfigured marking formula, and the marking formula is:saidFor the converted value, f is a mark constant,for the ith sample of range information,the j-th central point corresponding to the i-th distance information sample when the conversion value isAbove a threshold value X, the distance is marked as irregular distance information, the conversion valueWhen the distance is smaller than or equal to the threshold value X, marking as conventional distance information;
the generating module 303 is configured to generate a first monitoring result if a first amount of irregular distance information is continuously generated, where the first monitoring result is used to control the electronic device to enter an alert state.
Optionally, the obtaining module 301 is specifically configured to:
acquiring the frequency variation of an alternating magnetic field between the electronic equipment and the face of the user according to a preset time interval, wherein the alternating magnetic field is a magnetic field generated by the electronic equipment;
and acquiring the at least two pieces of distance information through the frequency variation.
Optionally, the obtaining module 301 is specifically configured to:
acquiring at least two detection images according to a preset time interval, wherein the at least two detection images comprise face images of the user;
and acquiring the at least two pieces of distance information according to the ratio of the face image of the user to the detection image.
Optionally, the marking module 302 is specifically configured to:
judging whether the distance information falls into a preset threshold interval or not;
if so, marking the distance information as irregular distance information;
and if not, marking the distance information as the conventional distance information.
Optionally, the number of the threshold intervals is at least two, and the at least two threshold intervals correspond to different warning states respectively; the generating module 303 is specifically configured to:
determining the threshold interval into which the last distance information in time sequence falls when a first number of irregular distance information is continuously generated;
and determining the warning state according to the threshold interval in which the last distance information falls in the time sequence.
Optionally, at least two of the threshold intervals comprise: a first threshold interval, a second threshold interval and a third threshold interval; the numerical values contained in the first threshold interval, the second threshold interval and the third threshold interval are continuously and sequentially reduced;
the warning state corresponding to the first threshold interval is as follows: displaying prompt information;
the warning state corresponding to the second threshold interval is as follows: sending out a prompt tone;
the warning state corresponding to the third threshold interval is as follows: and displaying the prompt information and sending a prompt tone.
Optionally, the apparatus 300 further comprises:
the first control module is used for controlling the electronic equipment to reduce the brightness if a second amount of irregular distance information is continuously generated;
and the second control module controls the electronic equipment to screen-up if the third amount of irregular distance information is continuously generated.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/modules, the specific functions and technical effects of the embodiment of the monitoring method based on the electronic device are based on the same concept, and specific reference may be made to the section of the embodiment of the monitoring method based on the electronic device, which is not described herein again.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the above-mentioned division of the functional modules is merely used as an example, and in practical applications, the above-mentioned function distribution may be performed by different functional modules according to needs, that is, the internal structure of the monitoring method based on the electronic device is divided into different functional modules to perform all or part of the above-mentioned functions. Each functional module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional modules are only used for distinguishing one functional module from another, and are not used for limiting the protection scope of the application. For the specific working process of each functional module, reference may be made to the corresponding process in the foregoing embodiment of the monitoring method based on the electronic device, and details are not described here again.
Fig. 4 is a schematic structural diagram of an electronic device 400 according to a third embodiment of the present application. As shown in fig. 4, the electronic device 400 includes: a processor 402, a memory 401, and a computer program 403 stored in the memory 401 and executable on the processor 402. The number of the processors 402 is at least one, and fig. 4 takes one as an example. The processor 402, when executing the computer program 403, implements the implementation steps of one of the above-described electronic device based monitoring methods, i.e., the steps shown in fig. 1 or fig. 2.
The specific implementation process of the electronic device 400 can be referred to the above embodiment of the monitoring method based on the electronic device.
Illustratively, the computer program 403 may be partitioned into one or more modules/units that are stored in the memory 401 and executed by the processor 402 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 403 in the terminal device 400.
The electronic device 400 may be a desktop computer, a notebook, a palm computer, a main control device, or other computing devices, or may be a camera, a mobile phone, or other devices having an image acquisition function and a data processing function, or may be a touch display device. The electronic device 400 may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that fig. 4 is merely an example of an electronic device 400 and does not constitute a limitation of electronic device 400 and may include more or fewer components than shown, or combine certain components, or different components, e.g., electronic device 400 may also include input-output devices, network access devices, buses, etc.
The Processor 402 may be a CPU (Central Processing Unit), other general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 401 may be an internal storage unit of the electronic device 400, such as a hard disk or a memory. The memory 401 may also be an external storage device of the terminal device 400, such as a plug-in hard disk, SMC (Smart Media Card), SD (Secure Digital Card), Flash Card, or the like provided on the electronic device 400. Further, the memory 401 may also include both an internal storage unit and an external storage device of the electronic device 400. The memory 401 is used for storing an operating system, application programs, a boot loader, data, and other programs, such as program codes of the computer program 403. The memory 401 may also be used to temporarily store data that has been output or is to be output.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the embodiment of the monitoring method based on an electronic device may be implemented.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the embodiment of the monitoring method based on the electronic device described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the embodiment of the monitoring method based on the electronic device described above can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, ROM (Read-Only Memory), RAM (Random Access Memory), electrical carrier wave signal, telecommunication signal, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.