Security protection method and device, electronic equipment and storage medium
By receiving and analyzing the monitoring data packets of the target door and window opening and closing video streams of the target camera, the door and window opening and closing doors and windows are controlled to close the doors and windows to prevent infants or pets from entering the dangerous area, solving the safety hazards in the prior art that can only be alerted but cannot be prevented, and effectively protecting the protective objects are achieved.
Patent Information
- Application Number
- CN202311184200.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to effectively prevent infants or pets from entering dangerous areas when they are alone at home. They can only issue alarms but cannot be stopped, resulting in safety hazards.
By receiving the monitoring data packets of the target door and window opening and closing device, we judge whether the target moving object is within the dangerous range, and determine whether the object is the object to be protected through the video stream collected by the target camera. If so, the door and window opening and closing device are controlled to close the door and window to achieve safety protection.
It effectively avoids hindering the normal activities of non-protected objects, reduces frequent and useless alarms, and can truly prevent the objects to be protected from entering dangerous areas, reducing safety hazards.
Smart Images

Figure CN119616330A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home, and in particular to a security protection method, device, electronic device and storage medium. Background Art
[0002] In recent years, safety accidents caused by infants or pets entering dangerous areas in the home when left alone at home have occurred frequently. In order to prevent and warn of the above incidents, a variety of implementation solutions have emerged in the industry.
[0003] In the related technologies, infrared sensors or surveillance cameras can be used to monitor whether there are objects entering dangerous areas in the home and issue alarms. However, these solutions may have problems with false alarms and missed alarms, and can only issue alarms, but cannot truly prevent infants or pets from entering dangerous areas, and cannot truly avoid risks. Summary of the invention
[0004] The present application provides a safety protection method, device, electronic device and storage medium, which can ensure the safety of infants and pets living alone at home. The technical solution is as follows:
[0005] In one aspect, a security protection method is provided, the method comprising:
[0006] Receiving a monitoring data packet sent by a target door and window opener, the monitoring data packet carrying a target monitoring distance, the target monitoring distance being the distance between a target moving object located around the target door and window opener and the target door and window opener, the target door and window opener being installed on the target door and window;
[0007] If it is determined based on the target monitoring distance that the target moving object is within the target danger range and the distance between the target moving object and the target door and window opener is gradually reduced, then obtaining a target video stream captured by a target camera associated with the target door and window opener, wherein the video picture of the target video stream covers the surrounding area of the target door and window;
[0008] If the target moving object is determined to be an object to be protected based on the target video stream, the target door and window openers are controlled to close the target doors and windows to achieve safety protection for the target moving object.
[0009] Optionally, determining the target moving object as an object to be protected based on the target video stream includes:
[0010] Performing video analysis on the target video stream to obtain features of the target moving object;
[0011] If the feature of the target moving object matches the feature of the reference object, and the matching degree between the feature of the target moving object and the feature of the reference object is greater than the matching degree threshold within a continuous first time period, then the target moving object is determined to be an object to be protected;
[0012] The reference object characteristics refer to the characteristics of the object to be protected.
[0013] Optionally, the target camera is a camera with a pan / tilt function; the monitoring data packet also carries an identifier of the target camera and an identifier of a target preset position, and the target preset position is associated with the position of the target door or window;
[0014] The step of obtaining a target video stream collected by a target camera associated with the target door and window opener includes:
[0015] Based on the identification of the target camera and the identification of the target preset position, controlling the target camera to rotate to the position of the target door or window;
[0016] The target video stream is obtained by acquiring the video stream captured after the target camera moves to the position of the target door and window, and obtaining the target video stream.
[0017] Optionally, the target camera is a camera with a pan / tilt function; the monitoring data packet also carries an identifier of the target door and window opener;
[0018] The step of obtaining a target video stream collected by a target camera associated with the target door and window opener includes:
[0019] Based on the identification of the target door and window opener, acquiring the identification of the target camera and the identification of the target preset position, wherein the target preset position is associated with the position of the target door and window;
[0020] Based on the identification of the target camera and the identification of the target preset position, controlling the target camera to rotate to the position of the target door or window;
[0021] The target video stream is obtained by acquiring the video stream captured after the target camera moves to the position of the target door and window, and obtaining the target video stream.
[0022] Optionally, controlling the target door and window opener to close the target door and window includes:
[0023] Determining a target closing speed of the target door and window;
[0024] The target door and window opener is controlled to close the target door and window according to the target closing speed.
[0025] Optionally, the method further comprises:
[0026] In the process of closing the target door and window, if the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold, a target pinching probability is determined based on the target video stream and the closing speed of the target door and window, wherein the target pinching probability refers to the probability that the target moving object is pinched by the target door and window;
[0027] If the target clamping probability is greater than a probability threshold, the closing speed of the target door or window is reduced.
[0028] Optionally, determining the target clamping probability based on the target video stream and the closing speed of the target door and window includes:
[0029] Performing video analysis on the target video stream to obtain the closing direction of the target door and window, the moving direction of the target moving object, and the moving speed of the target moving object;
[0030] If there is an intersection between the closing direction of the target door or window and the moving direction of the target moving object, determining a first distance between the target door or window and the intersection, and a second distance between the target moving object and the intersection;
[0031] Determine a first time required for the target door or window to reach the intersection based on the closing speed of the target door or window and the first distance, and determine a second time required for the target moving object to reach the intersection based on the moving speed of the target moving object and the second distance;
[0032] If the time difference between the first time and the second time is less than a time threshold, the target clamping probability is determined based on the time difference and the time threshold.
[0033] Optionally, the method further comprises:
[0034] If the probability that the target moving object is clamped by the target door or window is greater than the probability threshold for a continuous second time period, the target door or window opener is controlled to stop closing the target door or window.
[0035] In another aspect, a safety protection device is provided, the device comprising:
[0036] A receiving module, configured to receive a monitoring data packet sent by a target door and window opener, wherein the monitoring data packet carries a target monitoring distance, wherein the target monitoring distance refers to a distance between a target moving object located around the target door and window opener and the target door and window opener, wherein the target door and window opener is installed on the target door and window;
[0037] an acquisition module, configured to acquire a target video stream captured by a target camera associated with the target door and window opener if it is determined based on the target monitoring distance that the target moving object is within a target danger range and the distance between the target moving object and the target door and window opener gradually decreases, wherein the video picture of the target video stream covers the surrounding area of the target door and window;
[0038] The first control module is used to control the target door and window openers to close the target doors and windows if it is determined that the target moving object is an object to be protected based on the target video stream, so as to achieve safety protection for the target moving object.
[0039] On the other hand, an electronic device is provided, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of the security protection method described above.
[0040] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned security protection method are implemented.
[0041] On the other hand, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the security protection method described above.
[0042] The technical solution provided by this application can at least bring the following beneficial effects:
[0043] After the target moving object is determined to be within the target danger range based on the target monitoring distance and the distance between the target moving object and the target door and window opener is gradually reduced, the target door and window opener is controlled to close the target door and window only when the target moving object is determined to be the object to be protected based on the target video stream. In this way, it is possible to avoid obstruction to the normal activities of non-objects to be protected, and to avoid frequent and useless alarms when the object to be protected only passes through the target danger range. At the same time, after determining that the target moving object is the object to be protected, controlling the target door and window opener to close the target door and window can truly prevent the safety hazards of the object to be protected caused by the target door and window, compared with only issuing an alarm sound. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0046] Figure 2 is a flow chart of a security protection method provided by an embodiment of the present application;
[0047] Figure 3 It is a flowchart of a method for determining whether to acquire or stop acquiring a target video stream based on a target monitoring distance provided by an embodiment of the present application;
[0048] Figure 4 is a flow chart of a method for obtaining a target video stream provided by an embodiment of the present application;
[0049] Figure 5 is a flowchart of another method for obtaining a target video stream provided by an embodiment of the present application;
[0050] Figure 6 is a flow chart of a method for determining target clamping probability provided by an embodiment of the present application;
[0051] Figure 7 is a flow chart of another security protection method provided by an embodiment of the present application;
[0052] Figure 8 It is a structural schematic diagram of a safety protection device provided in an embodiment of the present application;
[0053] Fig. 9 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0054] Fig.10 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0056] Before explaining in detail the security protection method provided by the embodiment of the present application, the application scenarios and implementation environment involved in the embodiment of the present application are first introduced.
[0057] In recent years, there have been frequent safety accidents caused by infants or pets entering dangerous areas at home when they are alone at home. For example, when no one is at home, infants or pets left at home climb to the window and fall accidentally; or when they enter the kitchen and open the refrigerator or oven, they may get frostbite or burns. In order to prevent and warn of the above incidents, the industry currently provides a variety of solutions.
[0058] However, the existing solutions have relatively simple usage scenarios and functions. For example, some solutions install infrared distance sensors and buzzers on doors and windows, and sound an alarm when an object is detected entering a certain range. However, when infants or pets are indoors and pass through doors and windows equipped with infrared distance sensors, an alarm will also be generated. For another example, some solutions use surveillance cameras in the home to analyze whether there are objects entering the dangerous area. However, most surveillance cameras used in the home are wide-angle lenses, and the images will be distorted to a certain extent. When analyzing the video or photos taken, the infant or pet may have entered the dangerous area, but the distance may be inaccurate due to the distortion of the image, and it may be mistakenly believed that the infant or pet has not entered the dangerous area, which will result in missed reports. In addition, although the above method can generate an alarm, it cannot prevent infants or pets from entering the dangerous area and cannot truly avoid risks.
[0059] Based on this, the embodiment of the present application uses multiple methods to jointly judge the intrusion into the dangerous area, and controls the automatic closure of the doors and windows in the dangerous area according to the judgment results, which can effectively prevent the occurrence of dangerous situations and ensure the safety of infants, young children and pets waiting to be protected.
[0060] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of an implementation environment according to an exemplary embodiment. The implementation environment includes a door and window opener 101, a camera 102 and an electronic device 103, and the door and window opener 101 and the camera 102 are respectively connected to the electronic device 103 for communication. The communication connection can be a wired or wireless connection, which is not limited in the present embodiment.
[0061] The door and window opener 101 is installed on the door and window that is prone to cause safety accidents, and is used to monitor the distance between the moving object around the door and window and the door and window, so as to report the monitoring data packet carrying the monitoring distance to the electronic device 103. The camera 102 is installed around the door and window opener 101, and is used to collect video of the surrounding area of the door and window. The electronic device 103 is used to receive the monitoring data packet sent by the door and window opener 101, and determine whether the moving object is located in the danger range and whether the distance between the moving object and the door and window is gradually reduced through the monitoring data packet. If the moving object is located in the danger range and the distance between the moving object and the door and window is gradually reduced, then determine whether the moving object is an object to be protected through the video stream collected by the camera 102, and if the moving object is an object to be protected, control the door and window opener 101 to close the door and window.
[0062] Optionally, the implementation environment may also include a terminal, which is used to set the association relationship between the door and window opener 101 and the camera 102, set the speed of the door and window opener 101 to close the door and window, and display the on-site situation monitored by the camera 102 to the user.
[0063] The door and window opener 101 can be a push rod type door and window opener, a scissor type door and window opener, a synchronous door and window opener, an inner screw type door and window opener, a gear type door and window opener, etc., which are integrated with an infrared ranging sensor.
[0064] The camera 102 may be a hemispherical camera, a ball camera, a gun-type camera, etc. in appearance, a fixed camera, a 360-degree rotating camera, etc. in movement, and a high-definition camera, an ultra-definition camera, etc. in clarity.
[0065] The electronic device 103 may be a server or other electronic device. When the electronic device 103 is a server, the server may be an independent server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, or a cloud computing service center.
[0066] The terminal can be any computer device, such as a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a PPC (Pocket PC), a tablet computer, a smart car machine, a smart TV, etc.
[0067] Those skilled in the art should understand that the above-mentioned door and window openers 101, cameras 102, electronic devices 103 and terminals are only examples, and other existing or future door and window openers, cameras, servers and terminals, if applicable to the embodiments of the present application, should also be included in the protection scope of the embodiments of the present application and are included here by reference.
[0068] It should be noted that the application scenarios and implementation environments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new application scenarios and the evolution of the implementation environment, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0069] Next, the security protection method provided in the embodiment of the present application is explained in detail.
[0070] Figure 21 is a flowchart of a security protection method provided in an embodiment of the present application, and the method is applied to the above-mentioned electronic device 103. Based on the above description, the electronic device 103 can be a server or other electronic devices. The following description takes the electronic device 103 as a server as an example. Figure 2 , the method comprises the following steps.
[0071] Step 201: receiving a monitoring data packet sent by a target door and window opener, the monitoring data packet carrying a target monitoring distance, the target monitoring distance being the distance between a target moving object located around the target door and window opener and the target door and window opener, the target door and window opener being installed on the target door and window.
[0072] In some embodiments, the target door and window opener is integrated with an infrared ranging sensor. If the target moving object is around the target door and window opener, the target door and window opener can determine the distance between the target moving object and the target door and window opener through the infrared ranging sensor, that is, the target monitoring distance.
[0073] Among them, the minimum measuring distance, maximum measuring distance and measuring interval of the infrared ranging sensor are set during production. For example, the minimum measuring distance is 5 mm, the maximum measuring distance is 1000 mm, and the measuring interval is 20 ms. Of course, in actual applications, the minimum measuring distance, maximum measuring distance and measuring interval can be adjusted according to specific needs, and the embodiments of the present application are not limited to this.
[0074] There may be one or more moving objects around the target door and window opener. When there is one moving object around the target door and window opener, the moving object is the target moving object. When there are more than one moving objects around the target door and window opener, any one of the more than one moving objects is used as the target moving object. For example, the moving object closest to the target door and window opener is used as the target moving object. In this case, the monitoring data packet may carry the distance between the target moving object and the target door and window opener, but not the distances between other moving objects and the target door and window opener.
[0075] Of course, in the case where there are multiple mobile objects around the target door and window opener, the distances between the multiple mobile objects and the target door and window opener can be determined according to the above method, and these distances can be formed into a distance array, so as to be carried in the monitoring data packet. In this case, each of the multiple mobile objects can be used as a target mobile object. Regarding this situation, the following description will take one of the mobile objects as the target mobile object as an example.
[0076] The distances in the distance array may be arranged in ascending order, or in descending order, or in other ways. Optionally, when the monitoring data packet carries the distances between the multiple moving objects and the target door and window opener, the monitoring data packet may also carry the number of the multiple moving objects.
[0077] In some embodiments, the target door and window opener can send a monitoring data packet to the server once every fixed time period, and the fixed time period is set in advance, and the fixed time period is not less than the measurement interval of the infrared ranging sensor. For example, assuming that the measurement interval of the infrared ranging sensor is 20ms, the fixed time period can be 100ms. In practical applications, the fixed time period can be adjusted according to specific needs, and the embodiments of the present application do not limit this. If the infrared ranging sensor performs multiple ranging within the fixed time period, the door and window opener sends the result of the most recent ranging to the server.
[0078] For example, the infrared ranging sensor transmits a signal every 20ms to detect the distance of surrounding objects, and the target door and window opener sends a monitoring data packet to the server every 100ms. Within this 100ms, the infrared ranging sensor transmits five signals and measures five sets of distances, but the monitoring data packet can carry the distance measured by the infrared ranging sensor most recently (i.e. the fifth time).
[0079] In some embodiments, after receiving the monitoring data packet sent by the target door and window opener, the server will record the monitoring data packets that are received most recently and consecutively. For example, the server records the monitoring data packets received five times in a row, that is, when the monitoring data packet is received for the fifth time, the monitoring data packets received from the first to the fifth time will be recorded, and when the monitoring data packet is received for the sixth time, the monitoring data packet received for the first time will be discarded, and the monitoring data packets received from the second to the sixth time will be recorded.
[0080] The monitoring data packet can be encrypted and transmitted in HTTPS mode and in JSON file format. Of course, in practical applications, the encryption transmission mode and file format can be selected according to specific needs, and the embodiment of the present application does not limit this. The target doors and windows are the doors and windows in the dangerous areas of the user's home, such as the windows of the living room, the door of the refrigerator, the door of the oven, etc.
[0081] Step 202: If it is determined based on the target monitoring distance that the target moving object is within the target danger range and the distance between the target moving object and the target door and window opener gradually decreases, then a target video stream captured by a target camera associated with the target door and window opener is obtained, and the video picture of the target video stream covers the surrounding area of the target door and window.
[0082] In some embodiments, when the target monitoring distance is less than the danger distance threshold, it is determined that the target moving object is within the target danger range. When the target detection distance is not less than the danger distance threshold, it is determined that the target moving object is not within the target danger range.
[0083] The danger distance threshold is set in advance and is within the detection range of the infrared ranging sensor. For example, assuming that the maximum measurement distance of the infrared ranging sensor is 1500mm, the danger distance threshold can be set to 1000mm. Of course, in actual applications, the size of the danger distance threshold can be adjusted according to specific needs, and the embodiments of the present application do not limit this.
[0084] In some embodiments, the above-mentioned danger distance threshold is set by the user through the terminal, and the danger distance threshold will be sent by the terminal to the server, which will receive and store it.
[0085] Based on the above description, when the monitoring data packet received by the server each time carries the distance between the target moving object and the target door and window opener, but does not carry the distance between other moving objects and the target door and window opener, the server will compare the monitoring distances in the multiple monitoring data packets recorded. If the monitoring distances carried by the multiple monitoring data packets gradually decrease, it is determined that the distance between the target moving object and the target door and window opener is gradually decreasing.
[0086] When the monitoring data packet received by the server each time carries a distance array consisting of the distances between multiple moving objects and the target door and window opener, since the interval time for the server to receive the monitoring data packets is very short, the distance between each moving object and the target door and window opener will not change much. Therefore, in this case, the currently received monitoring data packet can be referred to as the i-th received monitoring data packet, and from the distance array of the monitoring data packet received for the i-1th time, a monitoring distance with the smallest difference with the target monitoring distance is selected as the i-1th distance between the target moving object and the target door and window opener, that is, the i-1th monitoring distance of the target moving object; then, from the distance array of the monitoring data packet received for the i-2th time, a monitoring distance with the smallest difference with the i-1th monitoring distance of the target moving object is selected as the i-2th distance between the target moving object and the target door and window opener, that is, the i-1th monitoring distance of the target moving object, and so on, until the monitoring distances between the target moving object and the target door and window opener at different times are determined from the distance arrays of the monitoring data packets recorded by the server, if the determined monitoring distances gradually decrease, it is determined that the distance between the target moving object and the target door and window opener gradually decreases.
[0087] If it is determined according to the above method that the target moving object is within the target danger range and the distance between the target moving object and the target door and window opener gradually decreases, it indicates that a safety accident may occur at the target door and window of the target moving object. At this time, in order to further determine whether the target moving object is an object to be protected, the server can obtain the target video stream captured by the target camera associated with the target door and window opener, and then perform video analysis through the target video stream.
[0088] If it is determined based on the target monitoring distance that the target moving object is outside the target danger range, or the target moving object is within the target danger range but the distance between the target moving object and the target door and window opener is not gradually decreasing, then stop obtaining the target video stream collected by the target camera associated with the target door and window opener, and return to step 201. The implementation process can refer to Figure 3 shown.
[0089] Since the target moving object may just pass by the target danger range while playing or other activities, and has no intention of opening or passing through the target doors and windows, when it is determined that the target moving object is not within the target danger range, or just passes through the target danger range, stopping obtaining the target video stream can provide more targeted security protection and avoid possible frequent and useless alarms.
[0090] Since the user may have multiple door and window openers and cameras installed in their home, in order to achieve security protection through the linkage between the door and window openers and the cameras, it is necessary to associate a corresponding camera with each door and window opener. In this way, for the target door and window opener, when the target moving object around the target door and window opener is within the danger range and the distance between the target moving object and the target door and window opener is gradually reduced, the video stream collected by the target camera associated with the target door and window opener is further analyzed, so as to perform security protection more targetedly.
[0091] In some embodiments, the target camera is a camera with a pan-tilt function, and the target camera supports a certain number of preset positions, such as 8 preset positions supported by the target camera. In this way, when the target door and window opener is associated with the target camera, the target preset position in the preset position supported by the target camera can also be set to be associated with the position of the target door and window. Moreover, the association relationship between the target door and window opener and the target camera and the association relationship between the target preset position and the position of the target door and window can be stored in the server, that is, the server stores the identification of the target door and window opener, the identification of the target camera, the identification of the target preset position and the corresponding relationship of the target rotation angle, and the target rotation angle is the rotation angle of the pan-tilt of the target camera to the target door and window; or, the identification of the target camera and the identification of the target preset position are stored in the target door and window opener, and the association relationship between the target preset position and the position of the target door and window is stored in the server, that is, the server stores the corresponding relationship between the identification of the target preset position and the target rotation angle. In different cases, the method of obtaining the target video stream collected by the target camera associated with the target door and window opener is different, which will be introduced separately below.
[0092] In the first case, the target door and window opener stores the identification of the target camera and the identification of the target preset position, and the server stores the correspondence between the identification of the target preset position and the target rotation angle. At this time, the monitoring data packet sent by the target door and window opener to the server also carries the identification of the target camera and the identification of the target preset position, and the target preset position is associated with the position of the target door and window; in this case, obtaining the target video stream collected by the target camera associated with the target door and window opener includes: based on the identification of the target camera and the identification of the target preset position, controlling the target camera to rotate to the position of the target door and window; obtaining the video stream collected by the target camera after it moves to the position of the target door and window, and obtaining the target video stream.
[0093] In the case where the target door and window opener stores the identification of the target camera and the identification of the target preset position, when the target door and window opener sends a monitoring data packet to the server, the identification of the target camera and the identification of the target preset position can be carried in the monitoring data packet to inform the server of the target camera and the target preset position it is associated with, so that the server can obtain the target rotation angle based on the identification of the target preset position, and then control the target camera to rotate to the position of the target door and window according to the target rotation angle based on the identification of the target camera, so as to obtain the video picture of the target door and window captured by the target camera, that is, the target video stream. The implementation process can be referred to Figure 4 shown.
[0094] In some embodiments, the target camera can move 360° horizontally and 180° vertically, and the video resolution and bit rate are relatively high. For example, the video resolution of the target camera is 1080p and the bit rate is 2 Mbps. In actual applications, the video resolution and bit rate can be selected according to specific needs, and the embodiments of the present application are not limited to this.
[0095] The association between the target door and window opener and the target camera and the association between the target preset position and the position of the target door and window can be configured through the user's terminal. For example, the terminal displays a configuration interface for the target door and window opener, which indicates that there are multiple cameras and the preset positions of each camera. In response to the user's selection operation on the target camera and the target preset position, the video screen of the target camera is displayed. When the pan / tilt of the target camera rotates to the position of the target door and window, in response to the user's confirmation operation, the current rotation angle of the pan / tilt of the target camera is obtained, and the current rotation angle of the pan / tilt of the target camera is used as the target rotation angle, and then the identifier of the target door and window opener, the identifier of the target camera, the identifier of the target preset position, and the target rotation angle are sent to the server. The server stores the corresponding relationship between the identifier of the target preset position and the target rotation angle, and sends the identifier of the target camera and the identifier of the target preset position to the target door and window opener, so that the target door and window opener stores the identifier of the target camera and the identifier of the target preset position.
[0096] Since the target camera has a pan / tilt function, during the pan / tilt rotation of the target camera, the user can determine whether the target camera is currently rotated to the position of the target door or window through the video screen of the target camera. If the target camera is rotated to the position of the target door or window, a confirmation operation is triggered, and then the terminal can obtain the rotation angle of the pan / tilt of the target camera to the target door or window, that is, the target rotation angle, from the target camera, so as to store the corresponding relationship between the identifier of the target preset position and the target rotation angle in the server. In this way, when it is necessary to view the monitoring situation at the target door or window, the pan / tilt can immediately rotate to the position of the target door or window according to the target rotation angle, so as to quickly obtain the video stream at the target door or window.
[0097] The target camera identifier is used to uniquely identify the target camera, and may be, for example, the name, number, etc. of the target camera. The target door and window opener identifier is used to uniquely identify the target door and window opener, and may be, for example, the name, number, etc. of the target door and window opener. The target preset position identifier may be, for example, the number of the target preset position. In the case where the target camera can rotate horizontally and / or vertically, the target rotation angle may include a horizontal rotation angle and / or a vertical rotation angle.
[0098] Since cameras with wide-angle lenses will cause a large degree of distortion in the video image, the server may make inaccurate judgments on the distance, resulting in missed reports of infants or pets entering the target danger range. Therefore, a camera with a wide range of motion and a pan / tilt function can be used as a target camera. While being able to quickly obtain video images of the dangerous area, it can also restore the real situation to the greatest extent possible, which is conducive to accurately analyzing the on-site situation, avoiding missed reports of dangerous events, and ensuring the safety of infants or pets when they are alone at home.
[0099] In the second case, the server stores the corresponding relationship between the identification of the target door and window opener, the identification of the target camera, the identification of the target preset position, and the target rotation angle. At this time, the monitoring data packet sent by the target door and window opener to the server also carries the identification of the target door and window opener. In this case, the target video stream captured by the target camera associated with the target door and window opener is obtained, including: based on the identification of the target door and window opener, the identification of the target camera and the identification of the target preset position are obtained, and the target preset position is associated with the position of the target door and window; based on the identification of the target camera and the identification of the target preset position, the target camera is controlled to rotate to the position of the target door and window; the video stream captured after the target camera moves to the position of the target door and window is obtained to obtain the target video stream.
[0100] In the case where the server stores the corresponding relationship between the identification of the target door and window opener, the identification of the target camera, the identification of the target preset position, and the target rotation angle, the server can directly obtain the identification of the target camera and the identification of the target preset position based on the identification of the target door and window opener, obtain the target rotation angle based on the identification of the target preset position, and then control the target camera to rotate to the position of the target door and window according to the target rotation angle based on the identification of the target camera, thereby obtaining the video image of the target door and window captured by the target camera, that is, the target video stream. The implementation process can be referred to Figure 5 shown.
[0101] In this case, after the terminal configures the association between the target door and window opener and the target camera and the association between the target preset position and the position of the target door and window, the identifier of the target door and window opener, the identifier of the target camera, the identifier of the target preset position and the target rotation angle can be sent to the server, which is stored by the server. For other contents in the second case, please refer to the above description and will not be repeated here.
[0102] Step 203: If the target moving object is determined to be the object to be protected based on the target video stream, the target door and window openers are controlled to close the target doors and windows to achieve safety protection for the target moving object.
[0103] In some embodiments, determining that a target moving object is an object to be protected based on a target video stream includes: performing video analysis on the target video stream to obtain features of the target moving object; if the features of the target moving object match features of a reference object, and the degree of match between the features of the target moving object and the features of the reference object within a continuous first time period is greater than a matching degree threshold, then determining that the target moving object is an object to be protected; wherein the reference object features refer to features of the object to be protected.
[0104] In some embodiments, the reference object features are extracted by the server from the image of the object to be protected. The image of the object to be protected at least includes images of the object to be protected from multiple angles, such as images from the front, back, left, right, and top, and all have high resolutions, so that the features of the object to be protected in various directions can be accurately analyzed, so that when the object to be protected enters the dangerous area in various postures, the object to be protected can be confirmed, avoiding the situation where the object to be protected has entered the dangerous area but has not been noticed.
[0105] The image of the object to be protected can be uploaded by the user to the terminal, and then sent to the server by the terminal. Of course, in practical applications, the image of the object to be protected can also be obtained by other means, which is not limited in the embodiment of the present application.
[0106] In some embodiments, the server can extract the features of the target moving object from each video frame of the target video stream, and match the features of the target object with the features of the reference object. If the features of the target moving object extracted from a certain video frame match the features of the reference object and the degree of match is greater than a matching threshold, the information of the target moving object is recorded, and the information includes the identification of the target moving object and the time when the target moving object enters the target danger range. The other video frames are analyzed in the same way to update the information of the target moving object. In this way, the server can determine from the recorded information of the target moving object whether the time when the target moving object enters the target danger range is greater than or equal to the first duration. If the time when the target moving object enters the target danger range is greater than or equal to the first duration, it is determined that the degree of match between the features of the target moving object and the features of the reference object in the continuous first duration is greater than the matching threshold.
[0107] The information of the target moving object recorded by the server may also include the distance between the target moving object and the target door and window opener, which is the target monitoring distance carried in the monitoring data packet. Of course, in practical applications, other information may also be included, which is not limited in the embodiments of the present application. The first duration and the matching degree threshold are set in advance, and the sizes of both may be adjusted according to application requirements, which is not limited in the embodiments of the present application.
[0108] Since the target camera will inevitably produce a certain degree of distortion during the imaging process, the server analyzes the target video stream, and the distance between the target moving object and the target door and window opener obtained will have a certain error compared with the actual situation. Therefore, when recording the distance between the target moving object and the target door and window opener, the target monitoring distance corresponding to the target moving object carried in the monitoring data packet can be directly recorded instead of using the distance obtained by analyzing the target video stream. In this way, the recorded distance value is more accurate, and the safety of the object to be protected can be better guaranteed during subsequent other processing.
[0109] Since the target moving object is not necessarily the object to be protected, after determining that the target moving object is within the target danger range based on the target monitoring distance and the distance between the target moving object and the target door and window opener is gradually reduced, the target door and window opener can be controlled to close the target door and window without first closing the target door and window. Instead, it is determined based on the target video stream whether the characteristics of the target moving object match the characteristics of the reference object, and whether the matching degree between the characteristics of the target moving object and the characteristics of the reference object in the first continuous time period is greater than the matching degree threshold, that is, whether the target moving object is the object to be protected. After determining that the target moving object is the object to be protected, the target door and window opener is controlled to close the target door and window, which can avoid obstruction to the normal activities of non-objects to be protected, and can also avoid frequent and useless alarms when the object to be protected only passes through the target danger range. At the same time, after determining that the target moving object is the object to be protected, controlling the target door and window opener to close the target door and window can truly prevent the object to be protected from entering the target door and window, compared with issuing an alarm, and can truly reduce the potential safety hazards that may occur when the object to be protected is alone at home.
[0110] In some embodiments, controlling the target door and window opener to close the target door and window includes: determining a target closing speed of the target door and window; and controlling the target door and window opener to close the target door and window according to the target closing speed.
[0111] The target closing speed is set in advance, and the size of the target closing speed can be adjusted according to actual application requirements, which is not limited in the embodiments of the present application. Of course, the target closing speed can also be set by the user. For example, the terminal displays a speed configuration interface, which includes two options: slow and fast. In response to the user's selection operation for any one of the options, a speed selection instruction corresponding to the selection operation is sent to the server. Since the server stores closing speeds corresponding to different speed instructions, that is, the closing speed corresponding to the slow instruction and the closing speed corresponding to the fast instruction, after the server receives the speed selection instruction sent by the terminal, the closing corresponding to the speed selection instruction can be directly determined as the target closing speed.
[0112] In some embodiments, during the process of closing the target doors and windows, if the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold, the target pinching probability is determined based on the target video stream and the closing speed of the target door and window, and the target pinching probability refers to the probability that the target moving object is pinched by the target door and window; if the target pinching probability is greater than the probability threshold, the closing speed of the target door and window is reduced.
[0113] Based on the above description, during the process of analyzing each video frame of the target video stream by the server, the recorded information of the target moving object may include the distance between the target moving object and the target door and window opener. In this way, the server may directly compare the recorded distance with the anti-pinch distance threshold to determine whether the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold.
[0114] The anti-pinch distance threshold and probability threshold are pre-set, and the anti-pinch distance threshold is less than the danger distance threshold described above. In addition, the anti-pinch distance threshold and probability threshold can be adjusted according to actual application requirements, and the embodiments of the present application do not limit this.
[0115] In some embodiments, please refer to Figure 6 , determining the target clamping probability based on the target video stream and the closing speed of the target door and window, including: performing video analysis on the target video stream to obtain the closing direction of the target door and window, the moving direction of the target moving object and the moving speed of the target moving object; if there is an intersection between the closing direction of the target door and window and the moving direction of the target moving object, determining a first distance between the target door and window and the intersection, and a second distance between the target moving object and the intersection; determining a first time required for the target door and window to reach the intersection based on the closing speed of the target door and window and the first distance, and determining a second time required for the target moving object to reach the intersection based on the moving speed of the target moving object and the second distance; if the time difference between the first time and the second time is less than a time threshold, determining the target clamping probability based on the time difference and the time threshold.
[0116] In the process of analyzing the target video stream, the position of the target door and window, the position of the target moving object and the position of the intersection can also be determined. In this way, the first distance can be determined by the positions of the target door and window and the intersection, and the second distance can be determined by the positions of the target moving object and the intersection.
[0117] When determining the first time required for the target doors and windows to reach the intersection based on the closing speed of the target doors and windows and the first distance, the ratio of the first distance to the closing speed of the target doors and windows can be determined, and the ratio can be used as the first time; when determining the second time required for the target moving object to reach the intersection based on the moving speed of the target moving object and the second distance, the ratio of the second distance to the moving speed of the target moving object can be determined, and the ratio can be used as the second time.
[0118] When determining the target clamping probability based on the time difference and the time threshold, the difference between the time difference and the time threshold may be determined, and the ratio of the difference to the time threshold may be determined, and the ratio is used as the target clamping probability.
[0119] It should be noted that the time threshold is set in advance, and the size of the time threshold can be adjusted according to actual application requirements, which is not limited in the embodiments of the present application.
[0120] If the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold, it indicates that the target moving object may be clamped by the target door and window being closed. Therefore, in the process of closing the target door and window, the probability of the target moving object being clamped by the target door and window can be determined, that is, the target clamping probability. If the target clamping probability is greater than the probability threshold, it indicates that the target moving object will definitely be clamped by the target door and window being closed. Therefore, it is necessary to reduce the closing speed of the target door and window to prevent the target door and window from causing damage to the target moving object.
[0121] In some embodiments, if the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold, an anti-pinch alarm message can also be sent to the terminal, and if other instant messaging accounts are bound to the terminal, the anti-pinch alarm message can also be sent to the instant messaging account. In this way, after the guardian of the protected object receives the anti-pinch alarm message, he can send a command to continue closing, stop closing, or reopen to the server through the terminal, and the server will control the target door and window opener accordingly after receiving the command.
[0122] In some embodiments, the target camera has a voice intercom function. In this case, after the guardian of the object to be protected receives the anti-pinch alarm message, he or she can also send instructions to the server through the terminal to control the target camera to turn on the voice intercom function, so that the guardian of the object to be protected can communicate with the object to be protected through the terminal to dissuade it from leaving the danger zone, and the audio information of the communication is transmitted between the terminal and the target camera through the server.
[0123] In some embodiments, if the probability of the target moving object being caught by the target door or window is greater than the probability threshold within the continuous second time period, the target door or window opener is controlled to stop closing the target door or window. The second time period is set in advance, and the size of the second time period can be adjusted according to actual application requirements, and the embodiment of the present application does not limit this.
[0124] In some embodiments, the monitoring data packet sent by the target door and window opener also carries the closing progress of the target door and window. In this case, if the closing progress of the target door and window received under the consecutive number threshold does not change, the target door and window opener is controlled to stop closing the door and window. The number threshold is set in advance, and the size of the number threshold can be adjusted according to actual application requirements, which is not limited in the embodiments of the present application.
[0125] If the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold, it indicates that the target moving object may be clamped by the target door and window that is being closed. If the on-site situation is not analyzed and the target door and window are continuously closed, the target moving object may be clamped by the target door and window. Therefore, in the process of closing the target door and window, the probability of the target moving object being clamped and whether the closing progress of the target door and window has changed can be analyzed to determine whether it is necessary to reduce the closing speed of the target door and window or stop closing the target door and window. At the same time, the guardian of the protected object can also check the on-site situation and choose whether to stop closing or reopen the target door and window. In this way, the target door and window can be prevented from causing damage to the target moving object.
[0126] In some embodiments, the target door and window opener is also integrated with a buzzer. In this case, after the target moving object is determined to be the object to be protected based on the target video stream, the buzzer is also controlled to emit an alarm sound.
[0127] In some embodiments, the server stores a voice audio stream recorded in advance by the guardian of the object to be protected, and the target camera has a voice broadcasting function. In this case, after determining that the target moving object is the object to be protected based on the target video stream, the target camera is also controlled to play the voice audio stream to attract the attention of the object to be protected.
[0128] In the embodiment of the present application, the target door and window opener and the target camera integrated with the infrared ranging sensor are controlled in linkage to ensure the safety of the protected object. The target video stream is acquired for analysis only when it is determined that the target monitoring distance is within the target danger range and is gradually decreasing; when it is determined that the target monitoring distance is not within the target danger range or the target monitoring distance is not gradually decreasing, the acquisition of the target video stream is stopped, so that frequent and useless alarms that may be generated can be avoided.
[0129] Since the target moving object is not necessarily the object to be protected, after the target moving object is determined to be within the target danger range based on the target monitoring distance and the distance between the target moving object and the target door and window opener is gradually reduced, the target door and window opener is not controlled to close the target door and window first, but after the target moving object is determined to be the object to be protected based on the target video stream, the target door and window opener is controlled to close the target door and window. In this way, it can avoid obstruction to the normal activities of non-objects to be protected, and it can also avoid frequent and useless alarms when the object to be protected only passes through the target danger range. At the same time, after determining that the target moving object is the object to be protected, controlling the target door and window opener to close the target door and window can truly prevent the safety hazards of the object to be protected caused by the target door and window, compared with only issuing an alarm sound.
[0130] In addition, by analyzing the probability of the target moving object being clamped and whether the closing progress of the target doors and windows has changed during the process of closing the target doors and windows, or by the guardian of the protected object making control selections at the terminal, when the target moving object may be clamped by the target doors and windows, the closing speed of the target doors and windows can be reduced or the closing of the target doors and windows can be stopped. In this way, the target doors and windows can be prevented from causing damage to the target moving object.
[0131] Next, through Figure 7 , the entire process of the embodiment of this application is introduced again. Please refer to Figure 7 The server first receives the monitoring data packet sent by the door and window opener, and determines whether the target moving object is within the target danger range based on the target monitoring distance in the monitoring data packet. If the target moving object is outside the danger range, the server stops acquiring the target video stream and continues to receive the monitoring data packet. If the target moving object is within the target danger range, the server determines whether the distance between the target moving object and the target door and window opener is gradually decreasing. If it is not gradually decreasing, the server stops acquiring the target video stream and continues to receive the monitoring data packet. If the distance between the target moving object and the target door and window opener is gradually decreasing, the server acquires the target video stream captured by the target camera associated with the target door and window.
[0132] Next, the target video stream is analyzed to obtain the characteristics of the target moving object. If the characteristics of the target moving object do not match the characteristics of the reference object, or the matching degree of the two is not greater than the matching degree threshold within a continuous first time period, the monitoring data packet continues to be received; if the matching degree of the two is greater than the matching degree threshold within a continuous first time period, the door and window openers are controlled to close the target doors and windows, the buzzer is controlled to sound an alarm, and the target camera is controlled to play the voice audio stream recorded in advance by the guardian of the protected object.
[0133] In the process of controlling the door and window openers to close the target doors and windows, if the distance between the object to be protected and the target door and window openers is not less than the anti-pinch distance threshold, the door and window openers continue to be controlled to close the target doors and windows; if the distance between the object to be protected and the target door and window openers is less than the anti-pinch distance threshold, the target video stream is analyzed to determine the target pinching probability; if the target pinching probability is not greater than the target probability threshold, the target door and window openers continue to be controlled to close the target doors and windows; if the target pinching probability is greater than the probability threshold, the closing speed of the target doors and windows is controlled to be reduced; if the target pinching probability is greater than the probability threshold for a second consecutive time period, the target door and window openers are controlled to stop closing the target doors and windows.
[0134] When the distance between the object to be protected and the door and window opener is less than the anti-pinch threshold, the server also sends an anti-pinch alarm message to the terminal. If it is detected that the object to be protected has not read the anti-pinch alarm message, the anti-pinch alarm message will continue to be sent to the terminal; if the guardian of the object to be protected has read the anti-pinch alarm message, the guardian can send instructions to the server through the terminal to control the door and window opener to reopen the target door and window, or continue to close the target door and window, and can also control the target camera to turn on the voice intercom function, so as to communicate with the object to be protected and dissuade the object to be protected from staying away from the target door and window.
[0135] Figure 8 is a schematic diagram of a safety protection device provided in an embodiment of the present application. The safety protection device can be implemented by software, hardware or a combination of both. Figure 1 Part or all of the server 103 in. Please refer to Figure 8 The device includes: a receiving module 801, an acquisition module 802 and a first control module 803.
[0136] The receiving module 801 is used to receive a monitoring data packet sent by a target door and window opener, wherein the monitoring data packet carries a target monitoring distance, and the target monitoring distance refers to the distance between a target moving object located around the target door and window opener and the target door and window opener, and the target door and window opener is installed on the target door and window;
[0137] An acquisition module 802 is used to acquire a target video stream captured by a target camera associated with the target door and window opener if it is determined based on the target monitoring distance that the target moving object is within the target danger range and the distance between the target moving object and the target door and window opener gradually decreases, wherein the video picture of the target video stream covers the surrounding area of the target door and window;
[0138] The first control module 803 is used to control the target door and window openers to close the target doors and windows if the target moving object is determined to be the object to be protected based on the target video stream, so as to achieve safety protection for the target moving object.
[0139] Optionally, the first control module 803 includes:
[0140] The analysis submodule is used to perform video analysis on the target video stream to obtain the characteristics of the target moving object;
[0141] A determination submodule is used to determine that the target moving object is an object to be protected if the features of the target moving object match the features of the reference object, and the matching degree between the features of the target moving object and the features of the reference object within a continuous first time period is greater than a matching degree threshold; wherein the reference object features refer to the features of the object to be protected.
[0142] Optionally, the target camera is a camera with a pan / tilt function; the monitoring data packet also carries an identifier of the target camera and an identifier of a target preset position, and the target preset position is associated with the position of the target door or window; the acquisition module 802 is specifically used for:
[0143] Based on the identification of the target camera and the identification of the target preset position, the target camera is controlled to rotate to the position of the target door or window;
[0144] Get the video stream collected after the target camera moves to the position of the target door and window, and get the target video stream.
[0145] Optionally, the target camera is a camera with a pan / tilt function; the monitoring data packet also carries an identifier of the target door and window opener; the acquisition module 802 is specifically used for:
[0146] Based on the identification of the target door and window opener, the identification of the target camera and the identification of the target preset position are obtained, and the target preset position is associated with the position of the target door and window;
[0147] Based on the identification of the target camera and the identification of the target preset position, the target camera is controlled to rotate to the position of the target door or window;
[0148] Get the video stream collected after the target camera moves to the position of the target door and window, and get the target video stream.
[0149] Optionally, the first control module 803 includes:
[0150] A speed determination submodule, used to determine a target closing speed of a target door or window;
[0151] The control submodule is used to control the target door and window opener to close the target door and window according to the target closing speed.
[0152] Optionally, the device further comprises:
[0153] A clamping probability determination module is used to determine the target clamping probability based on the target video stream and the closing speed of the target door and window when the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold during the process of closing the target door and window. The target clamping probability refers to the probability that the target moving object is clamped by the target door and window.
[0154] The speed reduction module is used to reduce the closing speed of the target door and window if the target clamping probability is greater than the probability threshold.
[0155] Optionally, the clamping probability determination module is specifically used for:
[0156] Perform video analysis on the target video stream to obtain the closing direction of the target door and window, the moving direction of the target moving object, and the moving speed of the target moving object;
[0157] If there is an intersection between the closing direction of the target door or window and the moving direction of the target moving object, determining a first distance between the target door or window and the intersection, and a second distance between the target moving object and the intersection;
[0158] Determine a first time required for the target door or window to reach the intersection based on the closing speed of the target door or window and the first distance, and determine a second time required for the target moving object to reach the intersection based on the moving speed of the target moving object and the second distance;
[0159] If the time difference between the first time and the second time is less than the time threshold, the target clamping probability is determined based on the time difference and the time threshold.
[0160] Optionally, the device further comprises:
[0161] The second control module is used to control the target door and window opener to stop closing the target door and window if the probability that the target moving object is clamped by the target door and window within a continuous second time period is greater than the probability threshold.
[0162] In the embodiment of the present application, the target door and window opener and the target camera integrated with the infrared ranging sensor are controlled in linkage to ensure the safety of the protected object. The target video stream is acquired for analysis only when it is determined that the target monitoring distance is within the target danger range and is gradually decreasing, thus avoiding frequent and useless alarms.
[0163] Since the target moving object is not necessarily the object to be protected, after the target moving object is determined to be within the target danger range based on the target monitoring distance and the distance between the target moving object and the target door and window opener is gradually reduced, the target door and window opener is not controlled to close the target door and window first, but after the target moving object is determined to be the object to be protected based on the target video stream, the target door and window opener is controlled to close the target door and window. In this way, it can avoid obstruction to the normal activities of non-objects to be protected, and it can also avoid frequent and useless alarms when the object to be protected only passes through the target danger range. At the same time, after determining that the target moving object is the object to be protected, controlling the target door and window opener to close the target door and window can truly prevent the safety hazards of the object to be protected caused by the target door and window, compared with only issuing an alarm sound.
[0164] In addition, by analyzing the probability of the target moving object being clamped during the process of closing the target doors and windows, and then controlling to reduce the closing speed of the target doors and windows or stop closing the target doors and windows when the target moving object may be clamped by the target doors and windows, the target doors and windows can be prevented from causing damage to the target moving object.
[0165] It should be noted that: the security protection device provided in the above embodiment only uses the division of the above functional modules as an example when performing security protection. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the security protection device provided in the above embodiment and the security protection method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0166] Fig. 9 1 is a block diagram of a terminal 900 provided in an embodiment of the present application. The terminal 900 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 900 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0167] Typically, the terminal 900 includes a processor 901 and a memory 902 .
[0168] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.
[0169] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction, which is used to be executed by the processor 901 to implement the security protection method provided by the method embodiment of the present application.
[0170] In some embodiments, the terminal 900 may further optionally include: a peripheral device interface 903 and at least one peripheral device. The processor 901, the memory 902 and the peripheral device interface 903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 903 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a display screen 905, and an audio circuit 906.
[0171] The peripheral device interface 903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0172] The radio frequency circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 904 may also include circuits related to NFC (Near Field Communication), which is not limited in the embodiments of the present application.
[0173] The display screen 905 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to collect touch signals on the surface or above the surface of the display screen 905. The touch signal can be input to the processor 901 as a control signal for processing. At this time, the display screen 905 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 905 can be one, and the front panel of the terminal 900 is set; in other embodiments, the display screen 905 can be at least two, which are respectively set on different surfaces of the terminal 900 or are folded; in some other embodiments, the display screen 905 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 900. Even, the display screen 905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0174] The audio circuit 906 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing, or input them into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 906 may also include a headphone jack.
[0175] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0176] Fig.10 1 is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1000 includes a central processing unit (CPU) 1001, a system memory 1004 including a random access memory (RAM) 1002 and a read-only memory (ROM) 1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The server 1000 also includes a basic input / output system (I / O system) 1006 that helps transmit information between various devices in the computer, and a large-capacity storage device 1007 for storing an operating system 1013, an application program 1014, and other program modules 1015.
[0177] The basic input / output system 1006 includes a display 1008 for displaying information and an input device 1009 such as a mouse and a keyboard for user inputting information. The display 1008 and the input device 1009 are connected to the central processing unit 1001 through an input / output controller 1010 connected to the system bus 1005. The basic input / output system 1006 may also include an input / output controller 1010 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1010 also provides output to a display screen, a printer, or other types of output devices.
[0178] The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1007 and its associated computer-readable media provide non-volatile storage for the server 1000. That is, the mass storage device 1007 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.
[0179] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1004 and mass storage device 1007 can be collectively referred to as memory.
[0180] According to various embodiments of the present application, the server 1000 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 1000 can be connected to the network 1012 through the network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 can be used to connect to other types of networks or remote computer systems (not shown).
[0181] The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.
[0182] In some embodiments, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the security protection method in the above embodiment are implemented. For example, the computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0183] It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.
[0184] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.
[0185] That is, in some embodiments, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of the security protection method described above.
[0186] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
[0187] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0188] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A safety protection method, characterized in that: The method comprises: Receiving a monitoring data packet sent by a target door and window opener, the monitoring data packet carrying a target monitoring distance, the target monitoring distance being the distance between a target moving object located around the target door and window opener and the target door and window opener, the target door and window opener being installed on the target door and window; If it is determined based on the target monitoring distance that the target moving object is within the target danger range and the distance between the target moving object and the target door and window opener is gradually reduced, then obtaining a target video stream captured by a target camera associated with the target door and window opener, wherein the video picture of the target video stream covers the surrounding area of the target door and window; If the target moving object is determined to be an object to be protected based on the target video stream, the target door and window openers are controlled to close the target doors and windows to achieve safety protection for the target moving object.
2. The method according to claim 1, characterized in that The step of determining, based on the target video stream, that the target moving object is an object to be protected comprises: Performing video analysis on the target video stream to obtain features of the target moving object; If the feature of the target moving object matches the feature of the reference object, and the matching degree between the feature of the target moving object and the feature of the reference object is greater than the matching degree threshold within a continuous first time period, then the target moving object is determined to be an object to be protected; The reference object characteristics refer to the characteristics of the object to be protected.
3. The method according to claim 1 or 2, characterized in that The target camera is a camera with a pan / tilt function; the monitoring data packet also carries the identifier of the target camera and the identifier of the target preset position, and the target preset position is associated with the position of the target door and window; The step of obtaining a target video stream collected by a target camera associated with the target door and window opener includes: Based on the identification of the target camera and the identification of the target preset position, controlling the target camera to rotate to the position of the target door or window; The target video stream is obtained by acquiring the video stream captured after the target camera moves to the position of the target door and window, and obtaining the target video stream.
4. The method according to claim 1 or 2, characterized in that: The target camera is a camera with a pan / tilt function; the monitoring data packet also carries the identification of the target door and window opener; The step of obtaining a target video stream collected by a target camera associated with the target door and window opener includes: Based on the identification of the target door and window opener, acquiring the identification of the target camera and the identification of the target preset position, wherein the target preset position is associated with the position of the target door and window; Based on the identification of the target camera and the identification of the target preset position, controlling the target camera to rotate to the position of the target door or window; The target video stream is obtained by acquiring the video stream captured after the target camera moves to the position of the target door and window, and obtaining the target video stream.
5. The method according to claim 1, characterized in that The method further comprises: In the process of closing the target door and window, if the distance between the target moving object and the target door and window opener is less than the anti-pinch distance threshold, a target pinching probability is determined based on the target video stream and the closing speed of the target door and window, wherein the target pinching probability refers to the probability that the target moving object is pinched by the target door and window; If the target clamping probability is greater than a probability threshold, the closing speed of the target door or window is reduced.
6. The method according to claim 5, characterized in that The determining of the target clamping probability based on the target video stream and the closing speed of the target door and window comprises: Performing video analysis on the target video stream to obtain the closing direction of the target door and window, the moving direction of the target moving object, and the moving speed of the target moving object; If there is an intersection between the closing direction of the target door or window and the moving direction of the target moving object, determining a first distance between the target door or window and the intersection, and a second distance between the target moving object and the intersection; Determine a first time required for the target door or window to reach the intersection based on the closing speed of the target door or window and the first distance, and determine a second time required for the target moving object to reach the intersection based on the moving speed of the target moving object and the second distance; If the time difference between the first time and the second time is less than a time threshold, the target clamping probability is determined based on the time difference and the time threshold.
7. The method according to claim 5 or 6, characterized in that The method further comprises: If the probability that the target moving object is clamped by the target door or window is greater than the probability threshold for a continuous second time period, the target door or window opener is controlled to stop closing the target door or window.
8. A safety protection device, characterized in that: The device comprises: A receiving module, configured to receive a monitoring data packet sent by a target door and window opener, wherein the monitoring data packet carries a target monitoring distance, wherein the target monitoring distance refers to a distance between a target moving object located around the target door and window opener and the target door and window opener, wherein the target door and window opener is installed on the target door and window; an acquisition module, configured to acquire a target video stream captured by a target camera associated with the target door and window opener if it is determined based on the target monitoring distance that the target moving object is within a target danger range and the distance between the target moving object and the target door and window opener gradually decreases, wherein the video picture of the target video stream covers the surrounding area of the target door and window; The first control module is used to control the target door and window openers to close the target doors and windows if it is determined that the target moving object is an object to be protected based on the target video stream, so as to achieve safety protection for the target moving object.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.