Home safety protection and joint training method and device
By using video equipment and image recognition technology to identify protective objects and sources of danger in the home environment, and combining it with the smart home system to assess risks and take protective measures, the problem of safety hazards for young children in the home environment is solved, and intelligent safety protection and privacy protection are achieved.
Patent Information
- Application Number
- CN202511013772.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, it is difficult to effectively identify and protect the safety hazards of dangerous sources in the home environment to young children, and there is a lack of intelligent safety protection measures.
The target area is imaged by video equipment, and image recognition technology is used to identify the protected objects and danger sources, and their distance is calculated. The smart home system is then combined to conduct safety risk assessment and risk blocking measures.
It realizes the safety risk assessment and timely protection of the protected objects in the home environment, reduces the occurrence of dangerous accidents, protects privacy and improves safety.
Smart Images

Figure CN120673045A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to smart home, optoelectronic computing, machine learning, and the Internet of Things, and more particularly to home security protection and joint training methods and devices. Background Art
[0002] Home is the primary place for children to grow up, but it also hides many safety hazards. Currently, children's home safety is a widely concerned issue. Many different types of hazards in the home environment may cause harm to children. Summary of the Invention
[0003] The present disclosure provides a home safety protection and combined training method and apparatus.
[0004] A home safety protection method, comprising: Capturing the target area to obtain a target image; Image recognition is performed on the target image to obtain the following recognition results: whether there is a protective object in the target area, whether there is a dangerous source in the target area, and when the protective object and the dangerous source exist at the same time, the first distance between each protective object and each dangerous source, the first distance is used to determine whether there is a safety risk for each protective object.
[0005] A home safety protection method, comprising: Obtaining an identification result from the home safety protection device, wherein the identification result is an identification result obtained according to the above method; In response to determining that the recognition result includes the first distance, whether each protected object has a safety risk is determined according to the first distance.
[0006] A joint training method, comprising: Obtaining a training sample, wherein the training sample includes: a sample image and a corresponding recognition result; The training samples are used to jointly train the configuration parameters of the camera device and the model parameters of the protection model; wherein, the camera device is used to capture images of the target area to obtain a target image, and the protection model is used to perform image recognition on the target image to obtain the following recognition results: whether there is a protection object in the target area, whether there is a danger source in the target area, and when the protection object and the danger source exist at the same time, the first distance between each protection object and each danger source, and the first distance is used to determine whether each protection object has a safety risk.
[0007] A home safety protection device, comprising: a camera device and a processing device; The camera device is used to capture an image of the target area to obtain a target image; The processing device is used to perform image recognition on the target image to obtain the following recognition results: whether there is a protective object in the target area, whether there is a dangerous source in the target area, and when the protective object and the dangerous source exist at the same time, the first distance between each protective object and each dangerous source, respectively, the first distance is used to determine whether there is a safety risk for each protective object.
[0008] A smart home system, comprising: a result acquisition module and a safety protection module; The result acquisition module is used to obtain the recognition result from the above-mentioned home safety protection device; The security protection module is configured to, in response to determining that the recognition result includes the first distance, determine whether each protected object has a security risk based on the first distance.
[0009] A joint training device includes: a sample acquisition module and a parameter updating module; The sample acquisition module is used to acquire training samples, wherein the training samples include: sample images and corresponding recognition results; The parameter update module is used to use the training samples to jointly train the configuration parameters of the camera device and the model parameters of the protection model; wherein, the camera device is used to capture images of the target area to obtain target images, and the protection model is used to perform image recognition on the target images to obtain the following recognition results: whether there is a protection object in the target area, whether there is a danger source in the target area, and when the protection object and the danger source exist at the same time, the first distance between each protection object and each danger source, and the first distance is used to determine whether there is a safety risk for each protection object.
[0010] An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0011] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method as described above.
[0012] A computer program product comprises a computer program / instruction, which implements the above method when executed by a processor.
[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure. Figure 1 This is a flow chart of the first embodiment of the home safety protection method disclosed in the present invention; Figure 2 Schematic diagram of the structure of the optical module disclosed in the present invention; Figure 3 is a schematic diagram of the target area described in the present disclosure; Figure 4 This is a flow chart of a second embodiment of the home safety protection method disclosed herein; Figure 5 This is a flowchart of an embodiment of the joint training method disclosed herein; Figure 6 This is a schematic diagram of the structure of an embodiment of the home safety protection device disclosed in the present invention; Figure 7 A schematic diagram of the structure of an embodiment of the smart home system disclosed herein; Figure 8 This is a schematic diagram of the structure of an embodiment of the combined training device disclosed herein; Figure 9 A schematic block diagram of an electronic device that can be used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0015] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0016] Furthermore, it should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " as used herein generally indicates that the associated objects are in an "or" relationship.
[0017] Figure 1 This is a flow chart of the first embodiment of the home security protection method disclosed in this disclosure. Figure 1As shown, the following specific implementation methods are included.
[0018] In step 101, an image of a target area is captured to obtain a target image.
[0019] In step 102, image recognition is performed on the target image to obtain the following recognition results: whether there is a protective object in the target area, whether there is a dangerous source in the target area, and when there are protective objects and dangerous sources at the same time, the first distance between each protective object and each dangerous source, respectively, the first distance is used to determine whether there is a safety risk for each protective object.
[0020] The protection objects may be children or other people who need safety protection. Figure 1 The execution subject of the illustrated embodiment may be a home safety protection device.
[0021] It can be seen that by adopting the solution described in the above method embodiment, the target image can be obtained by capturing the target area, and the target image can be analyzed to determine whether there is a safety risk for the protected object in the target image, thereby improving the safety of the protected object and reducing the occurrence of dangerous accidents in the home environment.
[0022] In some embodiments of the present disclosure, the target image may include a privacy-protected image in which facial features of a person cannot be identified.
[0023] Facial features can include texture features, geometric features, depth features, and biometric features. Texture features refer to the local pixel patterns or statistical characteristics of facial skin; geometric features refer to quantifiable spatial relationship features such as the relative position, distance, and angle of key facial points; depth features refer to high-dimensional abstract features extracted based on neural network models; and biometric features refer to features related to an individual's physiological uniqueness. Unrecognizable can mean an inability to identify through an algorithm, such as the inability to detect facial features using a face detection model, or an inability to judge through human vision, such as having multiple human observers attempt to identify faces in an image, or having forensic or facial recognition experts evaluate faces in an image to ensure that they cannot be associated with an individual based on the image.
[0024] A camera device can be used to capture an image of the target area to obtain a target image. The camera device can be configured so that the image it captures is a privacy-protected image, that is, based on the privacy-protected image, the facial features of the people in the image cannot be identified, thereby preventing the risk of privacy leakage.
[0025] An optical module may be provided in the camera device, and each optical module may include at least one metasurface optical element and a photosensitive element. When the optical module includes multiple metasurface optical elements, the multiple metasurface optical elements may have the same or different parameters. Figure 2 Schematic diagram of the structure of the optical module disclosed in this disclosure. Figure 2 As shown, it is assumed that the optical module includes only one metasurface optical element. A metasurface optical element is an artificial layered material with a size less than or approximately equal to the wavelength, which can be regarded as the two-dimensional counterpart of a metamaterial. The metasurface optical element can achieve regulation of the polarization, phase, amplitude, frequency, propagation mode and other characteristics of electromagnetic waves through surface sub-wavelength super-structure units, thereby achieving beam shaping, beam deflection, super-lens, super-holography, optical rotation, anti-reflection and anti-reflection, and other characteristics. In the scheme described in the present disclosure, by designing a metasurface optical element with a nanoscale structure, the propagation, focusing or encoding of light can be directly controlled at the physical level, thereby achieving selective collection or information hiding during the imaging process, avoiding the recording of sensitive content, and realizing privacy protection shooting.
[0026] Alternatively, the camera device may be a binocular camera, a stereoscopic imaging system that mimics human binocular vision. It uses two cameras to capture a scene from different perspectives and uses parallax to estimate depth information, thereby detecting the distance between two objects based on the captured images. A binocular camera may include two optical modules.
[0027] After acquiring the target image, image recognition can be performed on it to obtain the following recognition results: whether there is a protective object in the target area, whether there is a dangerous source in the target area, and when there are protective objects and dangerous sources at the same time, the first distance between each protective object and each dangerous source.
[0028] Figure 3 Schematic diagram of the target area described in this disclosure. Figure 3 As shown, through the target image, it can be identified that there is a power socket and a child in the target area (that is, the detection area of the camera device), the power socket is the danger source, and the first distance between the child and the power socket can be identified.
[0029] In real life, hazardous sources can include sharp objects, items that pose a risk of electric shock, chemicals, small items, and other items that pose safety hazards in the home. Sharp objects can include utility knives, scissors, and glassware; items that pose a risk of electric shock can include power sockets, heaters, and robot vacuums; chemicals can include laundry detergents, cleaning agents, and essential oil diffusers; and small items can include button batteries, magnetic beads, coins, and small toy parts.
[0030] There may be multiple protected objects and multiple hazardous sources in the target image. In this case, the first distance between each protected object and each hazardous source can be identified separately. For example, assuming that two protected objects are identified, which are referred to as protected object a and protected object b for ease of description, and assuming that two hazardous sources are identified, which are referred to as hazardous source c and hazardous source d for ease of description, then the first distance between protected object a and hazardous source c, the first distance between protected object a and hazardous source d, the first distance between protected object b and hazardous source c, and the first distance between protected object b and hazardous source d can be further identified. Then, based on the four first distances, it can be determined whether each protected object poses a safety risk.
[0031] In some embodiments of the present disclosure, capturing images of a target area may refer to: periodically capturing images of the target area according to a first cycle duration; and further, in response to obtaining a duration adjustment instruction sent by the smart home system, periodically capturing images of the target area according to a second cycle duration, where the second cycle duration is less than the first cycle duration.
[0032] For example, if the first cycle is 10 seconds long and the smart home system determines that there is a greater security risk, the cycle length can be reduced, such as to 2 seconds, thereby increasing the image capture frequency of the camera equipment and further improving the safety of the protected object.
[0033] In addition, in actual applications, it is not limited to the above-mentioned image capture method. For example, if necessary, video capture can also be performed, and then a frame of image is extracted from the captured video every L frames, where L is a positive integer and the specific value can be determined according to actual needs.
[0034] Figure 4 This is a flow chart of the second embodiment of the home security protection method disclosed in this disclosure. Figure 4 As shown, the following specific implementation methods are included.
[0035] In step 401, the identification result from the home security protection device is obtained. Figure 1 The recognition result obtained by the method in the illustrated embodiment.
[0036] In step 402, in response to determining that the recognition result includes a first distance, it is determined whether each protected object has a security risk based on the first distance.
[0037] In practical applications, Figure 4 The execution subject of the illustrated embodiment may be a smart home system.
[0038] After obtaining the identification result sent by the home safety protection device, if it is determined that the identification result includes the first distance, it can be determined whether each protection object has a safety risk based on the first distance.
[0039] In some embodiments of the present disclosure, for any protected object, in response to determining that all first distances corresponding to the protected object are greater than or equal to the first safety distance, it can be determined that there is no safety risk for the protected object; in response to determining that at least one first distance corresponding to the protected object is less than or equal to the second safety distance, it can be determined that there is a safety risk for the protected object and the first safety distance is greater than the second safety distance.
[0040] Taking the aforementioned protected object a as an example, if it is determined that its two corresponding first distances (the first distance between the protected object a and the hazard source c and the first distance between the protected object a and the hazard source d) are both greater than or equal to the first safety distance, then it can be determined that there is no safety risk for the protected object a. If it is determined that the first distance between the protected object a and the hazard source c is greater than or equal to the first safety distance, but the first distance between the protected object a and the hazard source d is less than or equal to the second safety distance, then it can be determined that there is a safety risk for the protected object a.
[0041] The specific values of the first safety distance and the second safety distance can be determined according to actual needs. For example, the first safety distance can be less than or equal to 100 cm, such as 100 cm, 90 cm, 70 cm, 50 cm, 40 cm. The second safety distance can be greater than or equal to 20 cm, such as 70 cm, 50 cm, 30 cm, 20 cm, etc.
[0042] In some embodiments of the present disclosure, for any protected object, in response to determining that the protected object has a security risk, predetermined risk blocking measures may be taken for the protected object.
[0043] For example, if it is determined that there is a safety risk to the protected object a, and the source of danger causing the safety risk is determined to be an object with a risk of electric shock, then the object can be powered off or controlled to enter an anti-electric shock mode to avoid causing harm to the protected object a.
[0044] In addition, in some embodiments of the present disclosure, for any protected object, in response to determining that each first distance corresponding to the protected object is greater than the second safety distance, and determining that at least one first distance corresponding to the protected object is less than the first safety distance, one or all of the following can be executed: providing a safety prompt in a predetermined manner, sending a duration adjustment instruction to the home safety protection device, instructing the home safety protection device to adjust the first shooting mode to the second shooting mode, the first shooting mode is to periodically capture images of the target area according to the first cycle duration, and the second shooting mode is to periodically capture images of the target area according to the second cycle duration, and the second cycle duration is less than the first cycle duration.
[0045] For example, if it is determined that the two first distances corresponding to the protected object a (the first distance between it and the hazard source c and the first distance between it and the hazard source d) are both greater than the second safety distance, and the first distance between the protected object a and the hazard source c is greater than the first safety distance, but the first distance between the protected object a and the hazard source d is less than the first safety distance, then it can be considered that there is a safety hazard. Accordingly, safety prompts can be given in a predetermined manner, such as issuing a predetermined alarm sound, etc. In addition, the image shooting frequency of the camera equipment can also be adjusted to timely discover the safety risks of the protected object and take predetermined risk blocking measures.
[0046] Figure 5 Flowchart of the embodiment of the joint training method described in this disclosure. Figure 5 As shown, the following specific implementation methods are included.
[0047] In step 501, a training sample is obtained, wherein the training sample includes: a sample image and a corresponding recognition result.
[0048] In step 502, the configuration parameters of the camera device and the model parameters of the protection model are jointly trained using training samples; wherein the camera device is used to capture images of the target area to obtain target images, and the protection model is used to perform image recognition on the target images to obtain the following recognition results: whether there is a protection object in the target area, whether there is a danger source in the target area, and when there are protection objects and danger sources at the same time, the first distance between each protection object and each danger source, and the first distance is used to determine whether there is a safety risk for each protection object.
[0049] As a possible implementation method, a home safety protection device may include a camera device and a processing device equipped with a protection model. The camera device and the processing device are connected. The camera device can capture an image of the target area to obtain a target image. The processing device can use the protection model to perform image recognition on the target image to obtain the recognition result.
[0050] The camera configuration parameters and the protection model parameters can be determined through joint training, or, if necessary, independently. Furthermore, the protection model can be implemented using a convolutional neural network (CNN)-based model or a transformer-based model.
[0051] The configuration parameters of the camera equipment mainly include the shape, size, arrangement period and rotation angle of the nanostructures arranged on the metasurface optical element.
[0052] In one embodiment of the present disclosure, the target image may include a privacy-protected image in which facial features of a person cannot be identified, so as to avoid the risk of privacy leakage.
[0053] In some embodiments of the present disclosure, during the training process, in response to determining that an intermediate image generated by a camera based on a sample image meets privacy protection requirements, the intermediate image may be sent to a protection model. In response to determining that the intermediate image does not meet privacy protection requirements, the configuration parameters of the camera may be updated until an intermediate image that meets privacy protection requirements is generated, and the intermediate image may be sent to the protection model. The privacy requirements of the sample image may not be imposed; for example, the sample image may be a non-privacy-protected image.
[0054] In addition, the sample images may include clear sample images without children (such as no one or only adults), without danger sources, with one or more danger sources, with one or more children, etc., so that the camera device obtains a privacy protection image based on the clear sample image (which can be achieved through simulation or directly captured by the camera device, wherein the camera device can use a reconfigurable metasurface that actively changes the physical properties of its micro-nano structure through external stimulation). The protection model further identifies the children, danger sources, and the first distance between the children and the danger sources based on the privacy protection image, and can update the configuration parameters and model parameters respectively based on the mixed loss of the detection task (identifying children, danger sources) and the distance task until final convergence.
[0055] During training, before the camera sends the privacy-preserving image (intermediate image) to the protection model, it can also judge whether the privacy-preserving image meets the privacy protection requirements. That is, based on the privacy-preserving image, the facial features of the person in the image cannot be recognized. If so, the privacy-preserving image can be sent to the protection model. If not, the camera configuration parameters can be updated until an intermediate image that meets the privacy protection requirements is generated and sent to the protection model. This process can improve the quality of the privacy-preserving image and correspondingly improve training efficiency and effectiveness.
[0056] After the joint training is completed, the camera equipment can be prepared according to the determined configuration parameters, and the protection model can be built according to the determined model parameters.
[0057] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure. In addition, for parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0058] The above is an introduction to the method embodiment. The following is a further explanation of the solution disclosed in the present disclosure through an apparatus embodiment.
[0059] Figure 6 FIG. 6 is a schematic diagram of the structure of the home safety protection device embodiment 600 described in the present disclosure. Figure 6 As shown, it includes: a camera device 601 and a processing device 602.
[0060] The camera device 601 is used to capture an image of a target area to obtain a target image.
[0061] Processing device 602 is used to perform image recognition on the target image to obtain the following recognition results: whether there is a protective object in the target area, whether there is a dangerous source in the target area, and when there are protective objects and dangerous sources at the same time, the first distance between each protective object and each dangerous source, the first distance is used to determine whether there is a safety risk for each protective object.
[0062] In some embodiments of the present disclosure, the target image may include a privacy-protected image in which facial features of a person cannot be identified.
[0063] In addition, in some embodiments of the present disclosure, the camera device 601 can adjust the first shooting mode to the second shooting mode in response to obtaining the duration adjustment instruction sent by the smart home system. The first shooting mode is to periodically capture images of the target area according to the first cycle duration, and the second shooting mode is to periodically capture images of the target area according to the second cycle duration, and the second cycle duration is less than the first cycle duration.
[0064] Home security devices can be installed anywhere in the home environment.
[0065] Figure 7 FIG. 7 is a schematic diagram of the structure of the smart home system embodiment 700 described in the present disclosure. Figure 7 As shown, it includes: a result acquisition module 701 and a security protection module 702.
[0066] The result acquisition module 701 is used to obtain the Figure 6 The identification results of the home safety protection device shown.
[0067] The security protection module 702 is configured to, in response to determining that the recognition result includes the first distance, determine whether each protection object has a security risk based on the first distance.
[0068] In some embodiments of the present disclosure, for any protected object, the security protection module 702 can determine that there is no security risk for the protected object in response to determining that all first distances corresponding to the protected object are greater than or equal to the first safety distance. In response to determining that at least one first distance corresponding to the protected object is less than or equal to the second safety distance, it can be determined that there is a security risk for the protected object and the first safety distance is greater than the second safety distance.
[0069] In some embodiments of the present disclosure, in response to determining that a security risk exists in the protected object, the security protection module 702 may take predetermined risk blocking measures for the protected object.
[0070] In addition, in some embodiments of the present disclosure, the safety protection module 702, in response to determining that each first distance corresponding to the protection object is greater than the second safety distance, and determining that at least one first distance corresponding to the protection object is less than the first safety distance, may perform one or all of the following: provide a safety prompt in a predetermined manner; send a duration adjustment instruction to the home safety protection device to instruct the home safety protection device to adjust the first shooting mode to the second shooting mode, the first shooting mode is to periodically capture images of the target area according to the first cycle duration, and the second shooting mode is to periodically capture images of the target area according to the second cycle duration, and the second cycle duration is less than the first cycle duration.
[0071] Figure 8 FIG. 8 is a schematic diagram of the structure of the combined training device embodiment 800 of the present disclosure. Figure 8 As shown, it includes: a sample acquisition module 801 and a parameter updating module 802.
[0072] The sample acquisition module 801 is used to acquire training samples, where the training samples include: sample images and corresponding recognition results.
[0073] The parameter updating module 802 is used to jointly train the configuration parameters of the camera device and the model parameters of the protection model using training samples; wherein the camera device is used to capture images of the target area to obtain the target image, and the protection model is used to perform image recognition on the target image to obtain the following recognition results: whether there is a protection object in the target area, whether there is a danger source in the target area, and when there are protection objects and danger sources at the same time, the first distance between each protection object and each danger source, and the first distance is used to determine whether there is a safety risk for each protection object.
[0074] In some embodiments of the present disclosure, the target image may include a privacy-protected image in which facial features of a person cannot be identified.
[0075] In addition, in some embodiments of the present disclosure, during the training process, the parameter update module 802 may send the intermediate image to the protection model in response to determining that the intermediate image generated by the camera device based on the sample image meets the privacy protection requirements. In response to determining that the intermediate image does not meet the privacy protection requirements, the configuration parameters of the camera device may be updated until an intermediate image that meets the privacy protection requirements is generated, and the intermediate image may be sent to the protection model.
[0076] The specific working processes of the above-mentioned device embodiments can refer to the relevant descriptions in the above-mentioned method embodiments and will not be repeated here.
[0077] In summary, by adopting the solution described in the present disclosure, while protecting home privacy, safety reminders can be given or predetermined risk blocking measures can be taken according to the distance between the protected object and the danger source, thereby reducing the occurrence of dangerous accidents involving the protected object in the home environment and providing a data basis for smart home control.
[0078] The images and recognition results in the embodiments described in this disclosure are not targeted at any specific user and are not intended to reflect the personal information of any specific user. The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in the technical solutions of this disclosure comply with relevant laws and regulations and do not violate public order and good morals.
[0079] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0080] Figure 9 A schematic block diagram of an electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0081] like Figure 9As shown, electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of electronic device 900. Computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to bus 904.
[0082] Multiple components in the electronic device 900 are connected to the I / O interface 905, including an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0083] The computing unit 901 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the methods described herein. For example, in some embodiments, the methods described herein may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the methods described herein may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the method described in the present disclosure in any other appropriate manner (for example, by means of firmware).
[0084] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0085] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0086] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0087] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0088] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0089] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0090] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0091] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A home safety protection method, characterized in that: include: Capturing the target area to obtain a target image; Image recognition is performed on the target image to obtain the following recognition results: whether there is a protective object in the target area, whether there is a dangerous source in the target area, and when the protective object and the dangerous source exist at the same time, the first distance between each protective object and each dangerous source, the first distance is used to determine whether there is a safety risk for each protective object.
2. The method according to claim 1, characterized in that The target image includes a privacy-protected image in which facial features of a person cannot be identified.
3. The method according to claim 1, characterized in that The capturing of the target area includes: periodically capturing the target area according to a first period; The method further includes: in response to obtaining a duration adjustment instruction sent by the smart home system, periodically capturing images of the target area according to a second cycle duration, where the second cycle duration is shorter than the first cycle duration.
4. A home safety protection method, characterized in that: include: Obtaining an identification result from the home safety protection device, wherein the identification result is an identification result obtained according to any one of the methods of claims 1 to 3; In response to determining that the recognition result includes the first distance, whether each protected object has a safety risk is determined according to the first distance.
5. The method according to claim 4, characterized in that Determining whether each protected object has a security risk according to the first distance includes: For any protected object, in response to determining that each first distance corresponding to the protected object is greater than or equal to the first safety distance, determining that there is no safety risk for the protected object; In response to determining that at least one first distance corresponding to the protected object is less than or equal to a second safety distance, it is determined that there is a safety risk for the protected object, and the first safety distance is greater than the second safety distance.
6. The method according to claim 5, characterized in that The method further comprises: In response to determining that the protected object has a security risk, a predetermined risk blocking measure is taken for the protected object.
7. The method according to claim 5, characterized in that The method further comprises: In response to determining that each first distance corresponding to the protected object is greater than the second safety distance, and determining that at least one first distance corresponding to the protected object is less than the first safety distance, performing one or all of the following: Provide safety reminders in the scheduled manner; A duration adjustment instruction is sent to the home safety protection device to instruct the home safety protection device to adjust the first shooting mode to the second shooting mode, where the first shooting mode is to periodically capture images of the target area according to a first cycle duration, and the second shooting mode is to periodically capture images of the target area according to a second cycle duration, and the second cycle duration is less than the first cycle duration.
8. A joint training method, characterized in that: include: Obtaining a training sample, wherein the training sample includes: a sample image and a corresponding recognition result; The training samples are used to jointly train the configuration parameters of the camera device and the model parameters of the protection model; wherein, the camera device is used to capture images of the target area to obtain a target image, and the protection model is used to perform image recognition on the target image to obtain the following recognition results: whether there is a protection object in the target area, whether there is a danger source in the target area, and when the protection object and the danger source exist at the same time, the first distance between each protection object and each danger source, and the first distance is used to determine whether each protection object has a safety risk.
9. The method according to claim 8, characterized in that The target image includes a privacy-protected image in which facial features of a person cannot be identified.
10. The method according to claim 9, characterized in that The method also includes: during the training process, in response to determining that the intermediate image generated by the camera device based on the sample image meets the privacy protection requirements, sending the intermediate image to the protection model; in response to determining that the intermediate image does not meet the privacy protection requirements, updating the configuration parameters of the camera device until the intermediate image that meets the privacy protection requirements is generated, and sending the intermediate image to the protection model.
11. A home safety protection device, characterized in that: include: Camera and processing equipment; The camera device is used to capture an image of the target area to obtain a target image; The processing device is used to perform image recognition on the target image to obtain the following recognition results: whether there is a protective object in the target area, whether there is a dangerous source in the target area, and when the protective object and the dangerous source exist at the same time, the first distance between each protective object and each dangerous source, respectively, the first distance is used to determine whether there is a safety risk for each protective object.
12. The device according to claim 11, characterized in that The target image includes a privacy-protected image in which facial features of a person cannot be identified.
13. The device according to claim 11, characterized in that The camera device is further used to adjust the first shooting mode to a second shooting mode in response to obtaining a duration adjustment instruction sent by the smart home system, wherein the first shooting mode is to periodically capture images of the target area according to a first cycle duration, and the second shooting mode is to periodically capture images of the target area according to a second cycle duration, and the second cycle duration is less than the first cycle duration.
14. A smart home system, characterized in that: include: Result acquisition module and security protection module; The result acquisition module is used to obtain the recognition result of the home safety protection device according to any one of claims 11 to 13; The security protection module is configured to, in response to determining that the recognition result includes the first distance, determine whether each protected object has a security risk based on the first distance.
15. A joint training device, characterized in that: include: Sample acquisition module and parameter update module; The sample acquisition module is used to acquire training samples, wherein the training samples include: sample images and corresponding recognition results; The parameter update module is used to use the training samples to jointly train the configuration parameters of the camera device and the model parameters of the protection model; wherein, the camera device is used to capture images of the target area to obtain target images, and the protection model is used to perform image recognition on the target images to obtain the following recognition results: whether there is a protection object in the target area, whether there is a danger source in the target area, and when the protection object and the danger source exist at the same time, the first distance between each protection object and each danger source, and the first distance is used to determine whether there is a safety risk for each protection object.
16. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.
17. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 10.
18. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 10 when executed by a processor.