Vehicle skylight safety protection method and device for children

By installing gravity sensors and infrared detectors in the vehicle, detecting the outskirts of the sunroof of the children's head and warning and functional limitations, the safety risk of the sunroof of the children's head is solved and ensures safety in the car.

CN120229210APending Publication Date: 2025-07-01HEFEI LANMA JIANXING INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510658727.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

In the prior art, there are serious safety risks when children extend their heads out of the vehicle sunroof, and existing protective measures have not effectively responded to this scenario.

Method used

By installing a gravity sensor under the cover between the main and co-pilot positions, gravity data is obtained and thresholds are set. In combination with an infrared detector, a child is detected whether the head is extended from the sunroof. If detected, an alarm is issued and the vehicle functions are restricted, including controlling the accelerator and brake opening, locking the sunroof button, etc.

Benefits of technology

It realizes timely and accurate detection and alarm of children's heads extending out of the sunroof, limits vehicle functions, avoids potential safety risks, and ensures children's safety when riding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120229210A_ABST
    Figure CN120229210A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle skylight safety protection method and device for children. The method comprises the steps of obtaining gravity data collected by a gravity sensor in a vehicle; wherein the gravity sensor is mounted below a cover plate between a main driving position and a co-driving position; if the gravity data is larger than a preset threshold value, whether the child stretches the head out of the skylight or not is detected; if it is detected that the child stretches the head out of the skylight, an alarm is given, and the vehicle function is limited. Thus, through the gravity sensor installed below the cover plate between the main driver and the co-driver, it can be timely and accurately detected that the head of a child stretches out of the skylight, and therefore an alarm is given, the vehicle function is limited, and the riding safety of the child is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vehicles, and in particular, to a method and device for safety protection of vehicle sunroofs for children. Background Art

[0002] During driving, there may sometimes be a situation where due to the negligence of adults, children are allowed to stretch their bodies out of the sunroof. And a child stretching their body out of the sunroof will pose potential serious safety risks. For example, when braking suddenly, the child may be thrown out of the vehicle, or the child's head or neck may be stuck due to mechanical failures or incorrect button presses. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a method and device for safety protection of vehicle sunroofs for children, which can timely and accurately detect that a child has stretched their head out of the sunroof, thereby giving an alarm and restricting the vehicle functions, helping to ensure the safety of children in the vehicle.

[0004] The embodiment of this application provides a method for safety protection of vehicle sunroofs for children, and the method includes:

[0005] Obtain the gravity data collected by the gravity sensor in the vehicle; wherein, the gravity sensor is installed under the cover between the driver's seat and the passenger seat;

[0006] If the gravity data is greater than a preset threshold, then detect whether a child has stretched their head out of the sunroof;

[0007] If it is detected that a child has stretched their head out of the sunroof, then give an alarm and restrict the vehicle functions.

[0008] Further, restricting the vehicle functions includes:

[0009] Restrict the vehicle speed by controlling the throttle opening and the brake opening;

[0010] And / or, restrict the closing of the vehicle sunroof by locking the vehicle sunroof button.

[0011] Further, an infrared emitter and an infrared detector are respectively installed on both sides of the vehicle sunroof; if the gravity data is greater than a preset threshold, then detecting whether a child has stretched their head out of the sunroof includes:

[0012] If the gravity data is greater than a preset threshold, then detect whether the vehicle sunroof has been opened;

[0013] If the vehicle sunroof has been opened, then determine whether the infrared detector on one side of the vehicle sunroof can detect the infrared rays emitted by the infrared emitter on the other side;

[0014] If not, then determine that a child has stretched their head out of the sunroof.

[0015] Furthermore, the warning methods include:

[0016] Turn on the hazard warning indicator light of the vehicle to give an external warning;

[0017] And / or, give an in-vehicle warning through at least one information prompting method.

[0018] Furthermore, the method further includes:

[0019] When the gravity data is less than or equal to the preset threshold, and the infrared detector on one side of the vehicle sunroof detects the infrared rays emitted by the infrared emitter on the other side, lift the restriction on the vehicle functions.

[0020] Furthermore, the method further includes:

[0021] If it is detected that the vehicle sunroof has been opened, give an in-vehicle warning through at least one information prompting method.

[0022] The embodiment of the present application further provides a vehicle sunroof safety protection device for children, and the device includes:

[0023] An acquisition module, configured to acquire the gravity data collected by a gravity sensor in the vehicle; wherein, the gravity sensor is installed under the cover between the driver's seat and the passenger seat;

[0024] A detection module, configured to detect whether a child stretches his / her head out of the sunroof if the gravity data is greater than a preset threshold;

[0025] A control module, configured to give an alarm and restrict the vehicle functions if it is detected that a child stretches his / her head out of the sunroof.

[0026] Furthermore, when the control module is used to restrict the vehicle functions, the control module is configured to:

[0027] Restrict the vehicle speed by controlling the throttle opening and the brake opening;

[0028] And / or, restrict the closing of the vehicle sunroof by locking the sunroof button of the vehicle.

[0029] Furthermore, an infrared emitter and an infrared detector are respectively installed on both sides of the vehicle sunroof; when the detection module is used to detect whether a child stretches his / her head out of the sunroof if the gravity data is greater than a preset threshold, the detection module is configured to:

[0030] If the gravity data is greater than a preset threshold, detect whether the vehicle sunroof has been opened;

[0031] If the vehicle sunroof has been opened, determine whether the infrared detector on one side of the vehicle sunroof can detect the infrared rays emitted by the infrared emitter on the other side;

[0032] If not, it is determined that the child has stretched his / her head out of the sunroof.

[0033] Furthermore, the warning methods include:

[0034] Turn on the hazard warning indicator light of the vehicle to give an alarm outside the vehicle;

[0035] And / or, give an alarm inside the vehicle through at least one information prompting method.

[0036] Furthermore, the control module is further configured to:

[0037] When the gravity data is less than or equal to the preset threshold, and the infrared detector on one side of the vehicle sunroof detects the infrared rays emitted by the infrared emitter on the other side, lift the restriction on the vehicle functions.

[0038] Furthermore, the safety protection device further includes a warning module; the warning module is used for:

[0039] If it is detected that the vehicle sunroof has been opened, give an in-vehicle warning through at least one information prompting method.

[0040] An embodiment of the present application further provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the vehicle sunroof safety protection method for children as described above are executed.

[0041] An embodiment of the present application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the vehicle sunroof safety protection method for children as described above are executed.

[0042] A vehicle sunroof safety protection method and device for children provided by an embodiment of the present application obtain gravity data collected by a gravity sensor in the vehicle; wherein, the gravity sensor is installed under the cover plate between the driver's seat and the passenger seat; if the gravity data is greater than a preset threshold, it is detected whether a child has stretched his / her head out of the sunroof; if it is detected that the child has stretched his / her head out of the sunroof, an alarm is given and the vehicle functions are restricted.

[0043] In this way, through the gravity sensor installed under the cover plate between the driver's seat and the passenger seat, it is possible to detect in a timely and accurate manner that a child has stretched his / her head out of the sunroof, thereby giving an alarm and restricting the vehicle functions, which helps to ensure the safety of children in the vehicle.

[0044] To make the above objects, features, and advantages of the present application more obvious and understandable, the following provides preferred embodiments in conjunction with the accompanying drawings for detailed description as follows. Description of the Drawings

[0045] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other relevant drawings can also be obtained based on these drawings.

[0046] Figure 1 Shows a flowchart of a vehicle sunroof safety protection method for children provided by an embodiment of the present application;

[0047] Figure 2 Shows a schematic structural diagram of a vehicle sunroof safety protection device for children provided by an embodiment of the present application;

[0048] Figure 3 Shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all of them. Usually, the components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, every other embodiment obtained by those of ordinary skill in the art without creative efforts belongs to the scope of protection of the present application.

[0050] Through research, it is found that during driving, sometimes due to the negligence of adults, children are allowed to stretch their bodies out of the sunroof. And a child stretching their body out of the sunroof will pose a potential serious safety risk. For example, when braking suddenly, the child may be thrown out of the vehicle, or the child's head or neck may be stuck due to mechanical failure or incorrect button pressing. In the current related technologies, the closing of the window is often restricted to prevent passengers from having their hands pinched when reaching out of the window. However, these methods do not consider the physiological structure and behavior patterns of children in the scenario where a child stretches their head out of the sunroof, and there are still serious safety risks.

[0051] Based on this, the embodiments of the present application provide a method for safety protection of vehicle sunroofs for children, which can detect in a timely and accurate manner that a child extends his / her head out of the sunroof, thereby giving an alarm and restricting vehicle functions, which helps to ensure the safety of children during rides.

[0052] Please refer to Figure 1 , Figure 1 which is a flowchart of a method for safety protection of vehicle sunroofs for children provided by the embodiments of the present application. As Figure 1 shown in

[0053] S101. Obtain the gravity data collected by the gravity sensor in the vehicle.

[0054] Among them, the gravity sensor is installed under the cover between the driver's seat and the passenger seat, more specifically, under the cover of the storage space between the driver and passenger seats, such as under the cover of the armrest box. This is because generally, the height of the cover of the storage space between the driver and passenger seats is higher than the seat and is located below the sunroof. Through the analysis of the scenario where a child extends his / her head out of the sunroof and in combination with the physiological characteristics and behavior patterns of children, the embodiments of the present application find that due to limited height, when a child extends his / her head out of the sunroof, he / she needs to step on the space for placing sundries between the driver's and passenger's seats, such as the armrest box. Therefore, by installing a gravity sensor under the cover, the potential risk that a child may extend his / her head out of the sunroof can be identified in a timely and accurate manner based on the collected gravity data, thereby triggering subsequent further detection.

[0055] S102. If the gravity data is greater than a preset threshold, detect whether the child has extended his / her head out of the sunroof.

[0056] In this step, since the weight of a child is significantly different from that of a general object, it can be clearly distinguished by setting a threshold. The threshold can be set according to empirical data, such as 25 kg; or it can be set personalized with reference to the physiological characteristics of the owner's child, such as age and weight, to achieve more targeted safety protection. When the gravity data is greater than the preset threshold, it is determined that the child may stand on the armrest box, and at this time, the child has a potential risk of extending his / her head out of the sunroof, and further detect whether the child has extended his / her head out of the sunroof. In addition, different from general static objects, the gravity data will fluctuate due to the change of the body posture when the child steps on the armrest box. Therefore, the confidence level that the child stands on the armrest box can also be determined by analyzing the fluctuation pattern of the gravity data, and when the confidence level is greater than the preset confidence threshold, it is determined that the child may stand on the armrest box, and then detect whether the child has extended his / her head out of the sunroof. Here, machine learning and other methods can be used to analyze the fluctuation pattern based on the sample gravity data in the experiment.

[0057] In specific implementation, the gravity sensor, the MCU chip, and the Bluetooth chip form an independent board. The gravity sensor is connected to the MCU through corresponding low-speed communication interfaces (SPI, I2C). The MCU obtains the readings of the gravity sensor at regular intervals. The Bluetooth module is connected to the MCU through UART, and the Bluetooth radio frequency end is connected to the in-vehicle cockpit SOC chip. When it is detected that the gravity data is greater than the preset threshold, the MCU forwards the information to the cockpit SOC chip through Bluetooth.

[0058] In a possible implementation manner, an infrared emitter and an infrared detector are respectively installed on both sides (opposite sides) of the vehicle sunroof; then step S102 may include:

[0059] S1021. If the gravity data is greater than the preset threshold, detect whether the vehicle sunroof is open.

[0060] Here, the cockpit SOC chip can detect whether the sunroof is in the open state through sensors or other means.

[0061] S1022. If the vehicle sunroof is open, determine whether the infrared detector on one side of the vehicle sunroof can detect the infrared rays emitted by the infrared emitter on the other side.

[0062] S1023. If not, determine that the child has stretched his / her head out of the sunroof.

[0063] In specific implementation, the infrared detector at one end and another MCU and Bluetooth module form another independent board; when the detector can detect the infrared rays emitted by the infrared emitter at the other end, it is considered that the child has not stretched his / her head out of the sunroof. If not, determine that the child has stretched his / her head out of the sunroof.

[0064] Furthermore, the method further includes: if it is detected that the vehicle sunroof has been opened, give an in-vehicle warning in at least one information prompting manner.

[0065] Here, when the gravity data is greater than the preset threshold and the vehicle sunroof has been opened, it is considered that there is a risk that the child may stretch his / her head out of the sunroof. An in-vehicle warning can be given through information prompting manners such as voice, vibration, and in-vehicle screen display to remind not to let the child perform dangerous behaviors.

[0066] S103. If it is detected that the child has stretched his / her head out of the sunroof, give an alarm and restrict the vehicle functions.

[0067] In this step, when it is detected that the child has stretched his / her head out of the sunroof, an alarm is immediately given and the vehicle functions are restricted to ensure the safety of the child.

[0068] Among them, restricting the vehicle functions includes:

[0069] The vehicle speed is limited by controlling the throttle opening and the brake opening. Here, the SOC chip notifies the vehicle ECU system through the vehicle Ethernet or CAN bus to control the vehicle to start decelerating. The deceleration should not be too fast to prevent the child from flying out of the vehicle directly. The vehicle speed is reduced to below 10km by slow deceleration. In addition, the ECU system forcibly prohibits the driver from stepping on the accelerator to accelerate.

[0070] And / or, by locking the sunroof button, the sunroof of the vehicle is restricted from closing. At this time, the vehicle ECU locks the sunroof closing button to prevent the sunroof from being accidentally triggered to close, which may cause the child's head or neck to be pinched.

[0071] The alarm methods include:

[0072] The vehicle's hazard warning lights are activated to warn the outside world. Here, the vehicle is controlled to turn on the hazard warning lights ("double flash") to remind the rear vehicle to avoid collision and cause the child to fly out of the car.

[0073] And / or, an in-car warning is issued through at least one information prompting method. The in-car warning can be issued through voice, vibration, in-car screen display, etc., prompting the driver to retract the head into the car immediately, otherwise certain functions will be restricted.

[0074] Furthermore, the method further comprises:

[0075] When the gravity data is less than or equal to the preset threshold, and the infrared transmitter on one side of the vehicle sunroof detects infrared rays emitted by the infrared transmitter on the other side, the restriction on the vehicle function is lifted.

[0076] Here, when the reading of the gravity sensor returns to within the preset threshold and the infrared detector on one side of the vehicle sunroof detects the infrared rays emitted by the infrared transmitter on the other side again, the ECU's restrictions on the accelerator, brakes and closing the sunroof are released.

[0077] Furthermore, the driving mode of the vehicle can also be determined. When the vehicle is in a specific driving mode, the vehicle sunroof safety protection method for children in the embodiment of the present application is enabled to reduce misjudgments.

[0078] In one example, when the vehicle is driving on a mountain road and going downhill, this safety protection method is enabled. At this time, a child wants to stick his head out of the sunroof because of playfulness. When the sunroof is opened and the child stands on the cover of the storage compartment, an in-vehicle voice reminder is triggered to tell the parent not to let the child perform dangerous behaviors, helping to detect and prevent the child from subsequent dangerous behaviors in time. If the child continues to stick his head out of the sunroof, at this time the vehicle speed begins to slow down and the hazard lights start to flash to avoid collisions with the vehicle in front and the vehicle behind. When the driver steps on the accelerator pedal and there is no response, the in-vehicle system gives a voice prompt to let the child retract his head into the vehicle. When the child retracts his head back into the vehicle and returns to the seat, the vehicle returns to normal.

[0079] A vehicle sunroof safety protection for children provided by an embodiment of the present application obtains gravity data collected by a gravity sensor in the vehicle; wherein, the gravity sensor is installed under the cover between the driver's seat and the passenger seat; if the gravity data is greater than a preset threshold, it is detected whether a child sticks his head out of the sunroof; if it is detected that a child sticks his head out of the sunroof, an alarm is given and the vehicle functions are restricted.

[0080] In this way, through the gravity sensor installed under the cover between the driver's seat and the passenger seat, it can be timely and accurately detected that a child sticks his head out of the sunroof, so as to give an alarm and restrict the vehicle functions, which helps to ensure the safety of children in the vehicle.

[0081] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a vehicle sunroof safety protection device for children provided by an embodiment of the present application. As shown in Figure 2 , the safety protection device 200 includes:

[0082] An acquisition module 210, configured to obtain gravity data collected by a gravity sensor in the vehicle; wherein, the gravity sensor is installed under the cover between the driver's seat and the passenger seat;

[0083] A detection module 220, configured to detect whether a child sticks his head out of the sunroof if the gravity data is greater than a preset threshold;

[0084] A control module 230, configured to give an alarm and restrict the vehicle functions if it is detected that a child sticks his head out of the sunroof.

[0085] Further, when the control module 230 is used to restrict the vehicle functions, the control module 230 is configured to:

[0086] Restrict the vehicle speed by controlling the throttle opening and the brake opening;

[0087] And / or, restrict the closing of the vehicle sunroof by locking the vehicle sunroof button.

[0088] Furthermore, an infrared emitter and an infrared detector are installed on both sides of the vehicle sunroof respectively; when the detection module 220 is used to detect whether the child sticks his head out of the sunroof if the gravity data is greater than a preset threshold, the detection module 220 is used to:

[0089] If the gravity data is greater than a preset threshold, detecting whether the vehicle sunroof is open;

[0090] If the sunroof of the vehicle is open, determining whether the infrared detector on one side of the sunroof of the vehicle can detect infrared rays emitted by the infrared transmitter on the other side;

[0091] If not, make sure the child has his or her head out of the sunroof.

[0092] Furthermore, the warning methods include:

[0093] Activate the vehicle's hazard warning lights to warn people outside the vehicle;

[0094] And / or, an in-vehicle alarm is issued through at least one information prompting method.

[0095] Furthermore, the control module 230 is also used for:

[0096] When the gravity data is less than or equal to the preset threshold value, and the infrared detector on one side of the vehicle sunroof detects infrared rays emitted by the infrared transmitter on the other side, the restriction on the vehicle function is lifted.

[0097] Furthermore, the safety protection device also includes an early warning module; the early warning module is used to:

[0098] If it is detected that the vehicle sunroof is opened, at least one information prompt method is used to issue an in-vehicle warning.

[0099] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown in , the electronic device 300 includes a processor 310 , a memory 320 and a bus 330 .

[0100] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 communicates with the memory 320 via the bus 330. When the machine-readable instructions are executed by the processor 310, the above-mentioned Figure 1 The specific implementation of the steps of the vehicle sunroof safety protection method for children in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0101] The embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it can execute the steps of the vehicle sunroof safety protection method for children as described in the foregoing Figure 1 method embodiment shown. For the specific implementation manner, reference can be made to the method embodiment, which will not be elaborated herein.

[0102] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, which will not be elaborated herein.

[0103] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.

[0104] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0105] In addition, in each embodiment of the present application, the functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0106] When the above-mentioned function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0107] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of the present application, used to illustrate the technical solutions of the present application, rather than limiting them. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present application can still modify the technical solutions described in the foregoing embodiments or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A vehicle sunroof safety protection method for children, characterized in that: The method comprises: Acquire gravity data collected by a gravity sensor in the vehicle; wherein the gravity sensor is installed under a cover plate between a main driving position and a co-pilot position; If the gravity data is greater than a preset threshold, detecting whether the child sticks his head out of the sunroof; If a child is detected sticking his or her head out of the sunroof, an alarm will be sounded and vehicle functions will be restricted.

2. The method according to claim 1, characterized in that Limit vehicle functions, including: Limit vehicle speed by controlling throttle and brake openings; And / or, restricting the vehicle sunroof from closing by locking the vehicle sunroof button.

3. The method according to claim 1, characterized in that An infrared transmitter and an infrared detector are installed on both sides of the vehicle sunroof respectively; if the gravity data is greater than a preset threshold, it is detected whether the child sticks his head out of the sunroof, including: If the gravity data is greater than a preset threshold, detecting whether the vehicle sunroof is open; If the sunroof of the vehicle is open, determining whether the infrared detector on one side of the sunroof of the vehicle can detect infrared rays emitted by the infrared transmitter on the other side; If not, make sure the child has his or her head out of the sunroof.

4. The method according to claim 1, characterized in that: Alert methods include: Activate the vehicle's hazard warning lights to warn people outside the vehicle; And / or, an in-vehicle alarm is issued through at least one information prompting method.

5. The method according to claim 3, characterized in that: The method further comprises: When the gravity data is less than or equal to the preset threshold value, and the infrared detector on one side of the vehicle sunroof detects infrared rays emitted by the infrared transmitter on the other side, the restriction on the vehicle function is lifted.

6. The method according to claim 3, characterized in that: The method further comprises: If it is detected that the vehicle sunroof is opened, at least one information prompt method is used to issue an in-vehicle warning.

7. A vehicle sunroof safety protection device for children, characterized in that: The device comprises: An acquisition module, used to acquire gravity data collected by a gravity sensor in the vehicle; wherein the gravity sensor is installed under a cover plate between a main driving position and a co-pilot position; a detection module, configured to detect whether the child sticks his head out of the sunroof if the gravity data is greater than a preset threshold; The control module is used to issue an alarm and restrict vehicle functions if it detects that a child has extended his head out of the sunroof.

8. The device according to claim 7, characterized in that When the control module is used to limit vehicle functions, the control module is used to: Limit vehicle speed by controlling throttle and brake openings; And / or, restricting the vehicle sunroof from closing by locking the vehicle sunroof button.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the vehicle sunroof safety protection method for children as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the vehicle sunroof safety protection method for children as claimed in any one of claims 1 to 6 are executed.