Angle detection method, device, system and storage medium

By setting up multiple angle detection units in the angle detection system, selecting the target unit according to the detection scenario, and using devices such as magnetic encoders and IMUs to detect real-time angles, the problem of inaccurate detection results in the existing technology is solved, and high-precision angle detection and improved virtual rendering effects are achieved.

CN115317890BActive Publication Date: 2025-10-14XIMMERSE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210939469.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-05
Publication Date
2025-10-14
Estimated Expiration
2042-08-05

AI Technical Summary

Technical Problem

The existing door opening angle detection method is single and cannot meet the angle detection requirements in different actual detection scenarios, resulting in inaccurate detection results.

Method used

By setting up multiple angle detection units in the angle detection system, the target angle detection unit corresponding to the current detection scene is determined according to the control instructions of the central control device, and real-time angle data is detected using devices such as magnetic encoders, IMUs and distance sensors. The data is then processed by the main control unit and fed back to the central control device.

Benefits of technology

It realizes the selection of adaptive angle detection units according to the accuracy requirements of different detection scenes, improves the accuracy and precision of angle detection, and enhances the virtual rendering effect in the virtual scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115317890B_ABST
    Figure CN115317890B_ABST
Patent Text Reader

Abstract

The application discloses an angle detection method, device, system and storage medium, and relates to the technical field of angle detection. The method is applied to a master control unit in an angle detection system, the system further comprises a plurality of angle detection units and a central control device, and comprises the following steps: in response to a first control instruction corresponding to a current detection scene and sent by the central control device, an angle detection unit corresponding to the current detection scene is determined from the plurality of angle detection units as a target angle detection unit; a second control instruction is sent to the target angle detection unit; real-time detection data fed back by the target angle detection unit is received, and a real-time opening and closing angle of an opening and closing object is determined according to the real-time detection data; and the real-time opening and closing angle is fed back to the central control device. In this way, the precision of the detected opening and closing angle is more consistent with the angle precision requirement under the current detection scene, and the accuracy of angle detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of angle detection, and particularly relates to an angle detection method, device, system and storage medium. BACKGROUND

[0002] In a virtual-real fusion training scene, door opening angle detection is a scene that needs to be used frequently. According to the actual door opening angle, the door opening angle in the virtual environment can be determined, which can improve the simulation effect in the virtual scene and enhance the user experience.

[0003] However, the current common method for detecting the door opening angle is relatively single, and cannot meet the angle detection requirements in different actual detection scenes, thereby causing the angle detection result to be inaccurate and other problems. SUMMARY

[0004] Therefore, the present application provides an angle detection method, device, system and storage medium.

[0005] In a first aspect, an angle detection method is provided by the embodiments of the present application, which is applied to a master control unit in an angle detection system, the system further includes a plurality of angle detection units and a central control device, and the method includes the following steps: in response to a first control instruction corresponding to a current detection scene sent by the central control device, determining an angle detection unit corresponding to the current detection scene from the plurality of angle detection units as a target angle detection unit; sending a second control instruction to the target angle detection unit, the second control instruction being used to drive the target angle detection unit to detect real-time detection data associated with a real-time angle of an opening and closing object; receiving the real-time detection data fed back by the target angle detection unit, and determining a real-time opening and closing angle of the opening and closing object according to the real-time detection data; and feeding back the real-time opening and closing angle to the central control device.

[0006] In a second aspect, an angle detection device is provided. The device is applied to a master control unit in an angle detection system. The system further includes a plurality of angle detection units and a central control device. The device includes a detection unit determination module, an instruction sending module, an angle determination module, and an angle sending module. The detection unit determination module is configured to determine, as a target angle detection unit, an angle detection unit corresponding to a current detection scene from the plurality of angle detection units in response to a first control instruction corresponding to the current detection scene sent by the central control device. The instruction sending module is configured to send a second control instruction to the target angle detection unit. The second control instruction is configured to drive the target angle detection unit to detect real-time detection data associated with a real-time angle of an opening and closing object. The angle determination module is configured to receive the real-time detection data fed back by the target angle detection unit, and determine a real-time opening and closing angle of the opening and closing object according to the real-time detection data. The angle sending module is configured to feed back the real-time opening and closing angle to the central control device.

[0007] In a third aspect, an angle detection system is provided. The system includes a master control unit, a plurality of angle detection units, and a central control device. The central control device is configured to send a first control instruction corresponding to a current detection scene to the master control unit. The master control unit is configured to determine, as a target angle detection unit, an angle detection unit corresponding to the current detection scene from the plurality of angle detection units in response to the first control instruction sent by the central control device. The master control unit is configured to send a second control instruction to the target angle detection unit. The target angle detection unit in the plurality of angle detection units is configured to detect real-time detection data associated with a real-time angle of an opening and closing object, and feed back the real-time detection data to the master control unit. The master control unit is configured to receive the real-time detection data fed back by the target angle detection unit, and determine a real-time opening and closing angle of the opening and closing object according to the real-time detection data. The master control unit is configured to feed back the real-time opening and closing angle to the central control device.

[0008] In a fourth aspect, a computer readable storage medium is provided. The computer readable storage medium stores program codes. The program codes can be invoked by a processor to execute the above method.

[0009] In the scheme provided in the application, in response to the first control instruction corresponding to the current detection scene sent by the central control device, the angle detection unit corresponding to the current detection scene is determined from the plurality of angle detection units; the second control instruction is sent to the target angle detection unit, and the second control instruction is used to drive the target angle detection unit to detect the real-time detection data associated with the real-time angle of the opening and closing object; the real-time detection data fed back by the target angle detection unit is received, and the real-time opening and closing angle of the opening and closing object is determined according to the real-time detection data; and the real-time opening and closing angle is fed back to the central control device. In this way, according to the instruction sent by the central control device for different detection scenes, the target detection unit corresponding to the current detection scene is controlled to detect the real-time opening and closing angle of the opening and closing object, that is, the angle detection unit that is adapted to the different requirements of detection accuracy for different detection scenes can be determined for angle detection, and the selection of angle detection accuracy is realized. Further, the accuracy of the detected opening and closing angle is more in line with the angle accuracy requirement under the current detection scene, and the accuracy of angle detection is improved. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0011] Figure 1 A schematic diagram of an angle detection system of an angle detection method provided by an embodiment of the application is shown.

[0012] Figure 2 A flowchart of an angle detection method provided by an embodiment of the application is shown.

[0013] Figure 3 A scene diagram of an application scene of an angle detection method provided by an embodiment of the application is shown.

[0014] Figure 4 A flowchart of an angle detection method provided by another embodiment of the application is shown.

[0015] Figure 5 A scene diagram of an application scene of an angle detection method provided by another embodiment of the application is shown.

[0016] Figure 6 A flowchart of an angle detection method provided by another embodiment of the application is shown.

[0017] Figure 7 A curve diagram of a fitting curve provided by an embodiment of the application is shown.

[0018] Figure 8 A scene diagram showing an application scenario of an angle detection method provided by another embodiment of the present application is shown.

[0019] Figure 9 A schematic diagram of an angle detection system of an angle detection method provided by another embodiment of the present application is shown.

[0020] Figure 10 A block diagram of an angle detection device provided by an embodiment of the present application is shown.

[0021] Figure 11 A storage unit for storing or carrying program code for implementing the above method provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application.

[0023] The present application provides an angle detection method, device, system and storage medium. According to the instruction of a central control device, a corresponding target detection unit is determined, and a real-time opening and closing angle is sent to the central control device.

[0024] Please refer to Figure 1 , Figure 1 A schematic diagram of an angle detection system 10 of an angle detection method provided by an embodiment of the present application is shown. The system 10 can include a central control device 110, a master control unit 120, and a plurality of angle detection units 130. The central control device 110 can be an augmented reality (AR) head-mounted display device, a mixed reality (MR) head-mounted display device, a smart phone, a tablet computer, a notebook computer, or the like. Of course, the central control device 110 can also be a server. The server can be a standalone physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. The master control unit 120 can be an NRF processing chip, such as an NRF52833 chip. Of course, it can also be any other processing chip that supports a wireless mesh network (mesh network) and can perform simple addition and subtraction calculations and image generation. The present embodiment does not limit this.

[0025] In some embodiments, the central control device 110 is configured to send a first control instruction corresponding to a current detection scene to the master control unit 120; the master control unit 120 is configured to determine, in response to the first control instruction sent by the central control device 110, an angle detection unit corresponding to the current detection scene from the plurality of angle detection units 130 as a target angle detection unit; send a second control instruction to the target angle detection unit; the target angle detection unit in the plurality of angle detection units 130 is configured to detect real-time detection data associated with a real-time angle of the opening and closing object, and feed back the real-time detection data to the master control unit 120; the master control unit 120 is configured to receive the real-time detection data fed back by the target angle detection unit, and determine a real-time opening and closing angle of the opening and closing object according to the real-time detection data; and feed back the real-time opening and closing angle to the central control device 110.

[0026] Please refer to Figure 2 , Figure 2 A flowchart of an angle detection method provided by an embodiment of the present application is provided, which is applied to a master control unit in an angle detection system, and the system further includes a plurality of angle detection units and a central control device. The angle detection method provided by the embodiment of the present application will be described in detail below. Figure 2 The angle detection method provided by the embodiment of the present application can include the following steps:

[0027] Step S210: In response to the first control instruction corresponding to the current detection scene sent by the central control device, an angle detection unit corresponding to the current detection scene is determined from the plurality of angle detection units as a target angle detection unit.

[0028] In the embodiment, different detection scenes have different requirements for angle detection accuracy. Some detection scenes have higher requirements for detection accuracy, and some detection scenes have lower requirements for detection accuracy. Therefore, corresponding angle detection units can be set for different detection scenes in advance to achieve angle detection that meets the accuracy requirements of the detection scene. It can be understood that the current detection scene can be a scene selected by a user at the central control device end, and the first control instruction corresponding to the current detection scene can be generated in response to the selection of the scene by the user at the central control device end. For example, the user clicks the "start virtual game scene 1" button, at which time the current detection scene is virtual game scene 1. Correspondingly, the central control device generates a first control instruction corresponding to the virtual game scene 1 in response to the click operation, and sends the generated first control instruction to the master control unit. The current detection scene includes but is not limited to a virtual-real fusion training scene and a room training system scene.

[0029] Based on this, the master control unit can respond to the first control instruction corresponding to the current detection scene sent by the central control device, and determine the angle detection unit corresponding to the current detection scene from the plurality of angle detection units as the target angle detection unit. The plurality of angle detection units can include an angle detection unit composed of a magnetic encoder, an angle detection unit composed of an IMU and a distance sensor, and of course, other devices that can be used for angle detection in related technologies can also be used as one of the plurality of angle detection units in this embodiment.

[0030] In some embodiments, the first control instruction can carry a scene identifier of the current detection scene, and the master control unit pre-stores a mapping relationship between scene identifiers of different detection scenes and angle detection units corresponding to the detection scenes; based on this, the master control unit can determine the angle detection unit corresponding to the scene identifier from the plurality of angle detection units as the target detection unit according to the scene identifier carried in the first control instruction and the mapping relationship in response to the first control instruction.

[0031] In other embodiments, the first control instruction can carry a unit identifier of the angle detection unit corresponding to the current detection scene, and based on this, the master control unit can determine the angle detection unit corresponding to the unit identifier as the target angle detection unit according to the unit identifier carried in the first control instruction in response to the first control instruction. The unit identifier can be a hardware identifier of the angle detection unit, which can be used as a unique identity of the angle detection unit, or a port number of a data port connected to the master control unit, and this embodiment does not limit the unit identifier.

[0032] In some embodiments, the system can further include a first network communication unit connected to the central control device, so that the central control device can send the first control instruction to the master control unit through the first network communication unit, and then the master control unit determines the target angle detection unit from the plurality of angle detection units in response to the first control instruction sent by the central control device through the first network communication unit. The first network communication unit can be a mesh network communication unit, which realizes data transmission through mesh communication technology, has low power consumption, and reduces the power consumption of the angle detection system in the sleep state, and of course, it can also be other wireless communication units that can access the central control device, have high transmission power and low power consumption.

[0033] Step S220: sending a second control instruction to the target angle detection unit, the second control instruction being used to drive the target angle detection unit to detect real-time detection data associated with a real-time angle of the opening and closing object.

[0034] In this embodiment, the second control instruction is an instruction generated by the master control unit after determining the target angle detection unit, for driving the target angle detection unit to start detecting real-time detection data associated with the real-time angle of the opening and closing object, and the master control unit sends the second control instruction to the target angle detection unit to drive the target angle detection unit to detect the real-time detection data associated with the real-time angle of the opening and closing object. The opening and closing object can be a door, a window, or any other object capable of performing an opening and closing action, and the present embodiment does not limit this.

[0035] Step S230: receiving the real-time detection data fed back by the target angle detection unit, and determining the real-time opening and closing angle of the opening and closing object according to the real-time detection data.

[0036] Based on this, the target angle detection unit sends the detected real-time detection data to the master control unit, and the master control unit further processes the received real-time monitoring data to obtain the final required real-time opening and closing angle.

[0037] In this embodiment, the master control unit determines the real-time opening and closing angle according to the real-time monitoring data fed back by the target angle detection unit. The real-time monitoring data obtained by the target angle detection unit can be the opening and closing linear velocity, angular velocity, and moving distance of the opening and closing object, or any other physical data that can be detected during the opening and closing process, and the present embodiment does not limit this.

[0038] Step S240: feeding back the real-time opening and closing angle to the central control device.

[0039] In this embodiment, the master control unit can feed back the real-time opening and closing angle to the central control device after detecting the real-time opening and closing angle. Taking the opening and closing object as an example, the central control device can accurately render a door and / or window in the virtual scene in the same opening and closing state as in the real scene according to the real-time opening and closing angle of the door and / or window in the real scene, thereby improving the accuracy of the virtual rendering effect.

[0040] In some embodiments, the system can further include a second network communication unit connected to the master control unit, so that the master control unit can feed back the real-time opening and closing angle to the central control device through the second network communication unit. The second network communication unit can be a wireless fidelity (WiFi) communication unit, or any other network communication mode with small delay, high real-time performance, and large bandwidth, and the present embodiment does not limit this. In this way, the detected real-time opening and closing angle of the opening and closing object can be fed back to the central control device in a timely manner.

[0041] That is, in the embodiment, the central control device wakes up the master control unit to start working by sending a first control instruction using the first network communication unit, which has the characteristic of low power consumption and can be used for wake-up operation; while the master control unit transmits the real-time opening and closing angle to the central control device using the second network communication unit, which has the characteristics of small delay, high real-time performance and large bandwidth, and can meet the requirements of high speed and low delay of the master control unit in data transmission. It can be seen that when the angle detection system is in a dormant state, only the mesh network is turned on, which can reduce the power consumption of the system. When the angle detection system is awakened, that is, after the master control unit receives the first control instruction, the mesh network is turned off, and the WiFi is connected to the router, and the real-time opening and closing angle detected by the router is transmitted to the central control device, realizing the transmission of the real-time opening and closing angle.

[0042] In some embodiments, referring to the application scenario shown in Figure 3 The central control device can send a control instruction to realize real-time detection of the opening and closing angle of multiple opening and closing objects (such as doors). The application scenario includes a central control device, a first network communication unit (i.e. Mesh wake-up dongle) connected to the central control device, a switch, a WiFi router, a master control unit, a second network communication unit (i.e. WiFi communication unit) connected to the master control unit, multiple angle detection units, and multiple doors. Each door corresponds to multiple angle detection units, and the specific angle detection unit used for angle detection of each door is determined by the master control unit according to the first control instruction sent by the central control device, which will not be described here; the second network communication unit is used for communication and transmission of real-time opening and closing angle between the master control unit in the wake-up working state and the central control device. Since the power consumption of the second network communication unit is very high and cannot be used for wake-up operation, in order to save power, the first control instruction can be transmitted by the first network communication unit to wake up the master control unit. When the master control unit is in a dormant state, only the first network communication unit is turned on, that is, the mesh network is used to listen to the command of the central control device to wake up; after the master control unit is awakened, the second network communication unit is turned on, that is, the WiFi is turned on to connect to the WiFi router, the mesh network is turned off, and the real-time opening and closing angle detected is sent to the central control device through the WiFi router and the switch.

[0043] In the embodiment, the target angle detection unit corresponding to the current detection scene is used to detect the opening and closing angle of the opening and closing object, which more accurately detects the opening and closing angle of the opening and closing object in the current detection scene, and makes the accuracy of the detected opening and closing angle more meet the angle accuracy requirements in the current detection scene, thereby improving the accuracy of angle detection.

[0044] Please refer to Figure 4 , Figure 4A flowchart of an angle detection method provided for another embodiment of the present application is applied to a master control unit in an angle detection system, which further comprises a plurality of angle detection units and a central control device. The following will be described in combination with Figure 4 The angle detection method provided by the embodiment of the present application will be described in detail. The angle detection method can comprise the following steps:

[0045] Step S310: In response to the first control instruction corresponding to the current detection scene sent by the central control device, an angle detection unit corresponding to the current detection scene is determined from the plurality of angle detection units as a target angle detection unit.

[0046] In the embodiment, the specific implementation of step S310 can refer to the content in the foregoing embodiments, which will not be described here again.

[0047] Step S320: A second control instruction is sent to the target angle detection unit, the second control instruction being used to drive the target angle detection unit to detect real-time detection data associated with a real-time angle of the opening and closing object, the target angle detection unit being a magnetic encoder, and the real-time detection data being real-time angle data detected by the magnetic encoder.

[0048] In the embodiment, the target angle detection unit comprises a magnetic encoder, and correspondingly, the real-time detection data detected by the target angle detection unit is the real-time angle data detected by the magnetic encoder, which can be understood as a real-time opening and closing absolute angle. The magnetic encoding can be understood as a magnetic sensitive angle sensor, which is a new generation of angle sensor made by using a high-performance integrated magnetic sensitive element, utilizing the non-contact characteristics of magnetic signal sensing, and cooperating with a microprocessor for intelligent signal processing. The magnetic encoder is not easy to be disturbed by external factors, and the detection data is relatively accurate, so the magnetic encoder is used for precise detection mode.

[0049] Step S330: The real-time angle data detected by the magnetic encoder is received, and a difference between an angle value of the real-time angle data and an angle value of a first preset angle is obtained as the real-time opening and closing angle.

[0050] Based on this, the magnetic encoder sends the detected real-time angle data to the master control unit, the master control unit receives the real-time angle data fed back by the magnetic encoder, and obtains a difference between an angle value of the real-time angle data and a first preset angle, the difference being the real-time opening and closing angle. The first preset angle is an angle when the opening and closing object is closed, and when the magnetic encoder is deployed, the absolute angle detected by the magnetic encoder when the opening and closing object is closed is the first preset angle.

[0051] Exemplarily, the angle value of the first preset angle is A1, the angle value of the real-time angle data is Ax, and the real-time opening and closing angle is represented as At. Thus, At = Ax - A1.

[0052] Further, the target angle detection unit can further include a Hall detection unit electrically connected with the magnetic encoder. The Hall detection unit is used in cooperation with the detection magnet to detect whether the opening and closing object is in a closed state. When the Hall detection unit detects that the opening and closing object is in a closed state, the Hall detection unit sends a corresponding electrical signal to the magnetic encoder. The magnetic encoder automatically calibrates the absolute angle when the opening and closing object is closed, i.e., the magnetic encoder automatically calibrates the first preset angle.

[0053] The Hall detection unit is located at a part of the opening and closing object that can move, and the detection magnet is located at a part of the opening and closing object that cannot move. For example, if the opening and closing object is a door, the angle detection unit is located at a door panel, and the detection magnet is located at a door beam. If the opening and closing object is a window, the angle detection unit is located at a window leaf, and the detection magnet is located at a window frame, and so on. In this way, the Hall detection unit and the detection magnet can detect whether the opening and closing object is in a closed state as expected.

[0054] Step S340: feeding back the real-time opening and closing angle to the central control device.

[0055] In this embodiment, the specific implementation of step S340 can refer to the content in the foregoing embodiments, which will not be described here again.

[0056] In some embodiments, taking the opening and closing object as a door for example, the angle detection system can detect the real-time opening and closing angle of the door. Please refer to Figure 5 , and Figure 5The application scenario shown includes a master control unit 120, a battery 140, a magnetic encoder 150, a magnet 160, and a Hall detection unit 170. The battery 140 can be a detachable battery or a non-detachable battery, and the present embodiment does not limit this. The master control unit 120 is connected to the detachable battery 140 and the Hall detection unit 170, respectively, and is fixed on the door panel of the door to be detected. The magnet 160 is fixed at the door beam, and the magnetic encoder 150 is rigidly connected to the door shaft. The master control unit 120 is electrically connected to the magnetic encoder 150 through a unified connector interface. The Hall detection unit 170 and the magnet 160 cooperate to detect whether the door is in a closed state. When the door is in a closed state, the magnetic encoder 150 takes the first preset angle as the real-time opening and closing angle. When the door is in an open state, the magnetic encoder 150 detects real-time angle data of the door and sends the real-time angle data to the master control unit 120. The master control unit 120 obtains a difference value between the real-time angle data and the first preset angle, and the difference value is the real-time opening and closing angle of the door at this time.

[0057] In the present embodiment, the absolute opening and closing angle of the opening and closing object can be detected by the magnetic encoder cooperating with the shaft of the opening and closing object, realizing high-precision real-time opening and closing angle detection. That is, if the current detection scenario requires high-precision angle detection, the master control unit controls the magnetic encoder to detect the real-time opening and closing angle, ensuring the detection accuracy of the opening and closing angle. At the same time, the efficiency of angle detection by the magnetic encoder is also high, which can realize relatively timely feedback of the opening and closing angle of the opening and closing object to the central control device.

[0058] Please refer to Figure 6 , Figure 6 A flowchart of an angle detection method provided by another embodiment of the present application is provided, which is applied to a master control unit in an angle detection system. The system also includes a plurality of angle detection units and a central control device. The angle detection method provided by the embodiment of the present application will be described in detail below. Figure 6 The angle detection method can include the following steps:

[0059] Step S410: In response to a first control instruction corresponding to a current detection scenario sent by the central control device, an angle detection unit corresponding to the current detection scenario is determined from the plurality of angle detection units as a target angle detection unit.

[0060] Step S420: A second control instruction is sent to the target angle detection unit, which is used to drive the target angle detection unit to detect real-time detection data associated with the real-time angle of the opening and closing object. The target angle detection unit includes an inertial sensor IMU and a distance sensor, and the real-time detection data includes motion data detected by the IMU and real-time distance data detected by the distance sensor.

[0061] In the embodiment, the specific implementation of steps S410 to S420 can refer to the content in the foregoing embodiments, which will not be described here again.

[0062] Step S430: receiving the motion data detected by the IMU and the real-time distance data detected by the distance sensor, and determining whether the opening and closing object is in a static state according to the rotational acceleration in the real-time detection data.

[0063] In the embodiment, the target angle detection unit can include the IMU and the distance sensor, the motion data can include the rotational acceleration of the opening and closing object, the IMU sends the detected real-time motion data of the opening and closing object including the rotational acceleration to the master control unit, and the distance sensor sends the detected real-time distance data of the opening and closing object to the master control unit, the master control unit determines the current motion state of the opening and closing object according to the rotational acceleration in the received real-time detection data, if the rotational acceleration is zero, the master control unit determines that the current opening and closing object is in a static state, and if the rotational acceleration is not zero, the master control unit determines that the current opening and closing object is in a motion state.

[0064] Step S440: if the opening and closing object is in a static state, determining the real-time opening and closing angle according to the real-time distance data and a preset mapping relationship, the preset mapping relationship includes a plurality of preset distance data and a plurality of preset opening and closing angles, and the preset distance data and the preset opening and closing angles correspond to each other.

[0065] Optionally, if the IMU detects that the rotational angular velocity in the motion data of the opening and closing object is zero, the master control unit determines that the current opening and closing object is in a static state, at this time, the Hall detection unit detects whether the opening and closing object is in a closed state, if the opening and closing object is closed, the master control unit obtains a first preset angle as the real-time opening and closing angle; if the opening and closing object is not in a closed state, at this time, the master control unit determines the opening and closing angle corresponding to the real-time distance data in the preset mapping relationship according to the received real-time distance data sent by the distance sensor and the preset mapping relationship obtained in the mode calibration state, through the mapping relationship that the preset distance data and the preset opening and closing angles correspond to each other, the opening and closing angle is the real-time opening and closing angle of the current opening and closing object.

[0066] In some embodiments, before determining the real-time opening and closing angle according to the real-time distance data and the preset mapping relationship, in response to a mode calibration instruction, the target opening and closing angle of the opening and closing object in a moving state and the target distance data corresponding to the target opening and closing angle are obtained every preset time period, to obtain the plurality of preset distance data and the plurality of preset opening and closing angle. According to the plurality of preset distance data and the plurality of preset opening and closing angle, the preset mapping relationship is established.

[0067] Wherein, the mode calibration instruction can be triggered by the user by pressing the mode calibration button, the mode calibration button is connected with the master control unit through the bus, the preset time period is determined by the crystal unit, which can be understood as the sampling frequency, the crystal unit is connected with the master control unit through the pin of the master control unit, the light-emitting unit is connected with the master control unit through the general-purpose input / output (GPIO), the mode calibration button is pressed, the mode calibration button sends the mode calibration instruction to the light-emitting unit and the master control unit through the bus, the light-emitting unit receives the calibration instruction, prompting that the current system is in the mode calibration state, the master control unit receives the calibration instruction, at this time the opening and closing object is in a moving state, the master control unit sends a second control instruction to the target angle detection unit, the target angle detection unit detects the target opening and closing angle of the opening and closing object and the target distance data corresponding to the target opening and closing angle, and sends the target opening and closing angle and the corresponding target distance data to the master control unit, the master control unit obtains a plurality of preset distance data and a plurality of preset opening and closing angle according to the accepted real-time data, after the mode calibration is completed, the target angle detection unit stops monitoring data, and the light-emitting unit stops prompting.

[0068] Wherein, the movement of the opening and closing object can be artificially controlled or automatically controlled, and the present embodiment does not limit this. The crystal unit can use a 32 megahertz crystal, or other high-frequency crystal; the opening and closing object in a moving state can be artificially kept in an opening and closing movement state, or the mode calibration button can be connected with other units, and the units can keep the opening and closing object in an opening and closing movement state after receiving the mode calibration instruction sent by the mode calibration button; the light-emitting unit can be a light-emitting diode (LED), including but not limited to a single-color LED, a high-brightness LED, an ultrahigh-brightness LED, a color-changing LED, and an infrared LED, etc., and the present embodiment does not limit this, and the mode calibration time can be artificially set.

[0069] In the embodiment, the target angle detection unit comprises an inertial sensor IMU and a distance sensor. The IMU can generally consist of a gyroscope, an acceleration agent and an algorithm processing unit, and can detect the motion data of the moving object by measuring the acceleration and the rotation angle. The distance sensor is used to detect the distance of the object. After the IMU unit receives the second control instruction sent by the master control unit, the real-time opening and closing angle of the opening and closing object in the motion state is detected, and the real-time opening and closing angle is the target opening and closing angle. After the distance sensor receives the second control instruction sent by the master control unit, the distance data of the opening and closing object corresponding to the target opening and closing angle is detected, and the distance data is the target distance data corresponding to the target opening and closing angle. The IMU unit and the distance sensor send the detected real-time data to the master control unit. The master control unit receives a plurality of real-time angle data and real-time distance data within the mode calibration time, the real-time angle data is the preset opening and closing angle, and the real-time distance data is the preset distance data.

[0070] Therefore, the master control unit receives a plurality of preset opening and closing angles sent by the IMU unit and a plurality of preset distance data sent by the distance sensor within the mode calibration time. Based on the plurality of real-time monitoring data, the master control unit establishes a preset mapping relationship between the preset distance data and the preset opening and closing angle. The more preset distance data and preset opening and closing angles received by the master control unit, the more accurately the preset mapping relationship reflects the mapping relationship between the real-time distance and the real-time opening and closing angle of the opening and closing object.

[0071] The master control unit can establish a mapping relationship. The mapping relationship can be a function relationship or other mapping relationship that can reflect the one-to-one correspondence between the real-time distance and the real-time opening and closing angle. The embodiment does not limit this. Exemplarily, the function relationship can be represented by a linear fitting curve as shown in the following formula. Figure 7

[0072] Step S450: If the opening and closing object is not in a stationary state, the real-time opening and closing angle is determined according to the historical opening and closing angle of the opening and closing object and the angle change data in the motion data.

[0073] Optionally, if the IMU unit detects that the rotation angle velocity in the motion data of the opening and closing object is not zero, the master control unit determines that the opening and closing object is currently in a motion state. At this time, the master control unit obtains the sum value of the historical opening and closing angle of the opening and closing object and the real-time angle change data in the motion data of the opening and closing object sent by the IMU unit according to the recorded historical opening and closing angle of the opening and closing object, and the sum value is the real-time opening and closing angle of the opening and closing object.

[0074] ​Among them, the historical opening and closing angle of the opening and closing object refers to the real-time opening and closing angle of the opening and closing object when it was most recently in a stationary state, recorded by the main control unit before the IMU unit detects that the rotational angular velocity of the opening and closing object is not zero. In other words, it is the opening and closing angle of the opening and closing object when it was last in a stationary state.

[0075] Step S460: Feedback the real-time opening and closing angle to the central control device.

[0076] In this embodiment, the specific implementation of step S480 can refer to the content of the above embodiments and will not be repeated here.

[0077] In some embodiments, taking the door as an example, the system can detect the real-time opening and closing angle of the door. Figure 8 ,exist Figure 8 The application scenario shown includes a main control unit 120, a battery 140, a magnet 160, an IMU 180, and a distance sensor 190; wherein the main control unit 120 is connected to the battery 140, the IMU 180, and the distance sensor 190 and is fixed on the door panel of the door to be detected, a magnet 160 is fixed on the door beam, and a Hall detection unit ( Figure 7 The IMU unit 180 detects whether the door is in a moving state. When the door is in a stationary state, the main control unit 120 obtains the real-time distance data of the door at this time through the distance sensor 190. The main control unit 120 obtains the real-time opening and closing angle of the door at this time according to the real-time distance data and the preset mapping relationship. When the door is in a moving state, the main control unit 120 determines the real-time opening and closing angle of the door according to the historical opening and closing angles and the angle change data.

[0078] In this embodiment, the real-time opening and closing angle of the opening object is measured with the assistance of the distance sensor and the IMU, thereby avoiding the problem that the opening and closing angle is easily interfered with by external factors when measured only by the distance sensor. For example, if there is an external object blocking it, it will cause inaccurate detection results. That is, the accuracy and anti-interference ability of the angle detection are improved.

[0079] See also Figure 9 , Figure 9The angle detection system 10 provided by another embodiment of the present application is shown, which includes a central control device, an Nrf52833 master control unit, a WiFi unit, a Hall detection unit, an IMU, a state LED, a distance sensor, a magnetic encoder, a crystal oscillator, a lithium battery, a voltage converter (DC-DC converter), a type-c interface, and a button. The master control unit is connected to the distance sensor and the magnetic encoder through the same connector interface, connected to the state LED through a GPIO, connected to the IMU through a serial peripheral interface (SPI), controls the operation of the IMU through an interrupt request (IRQ), connected to the WIFI unit through a usart interface supporting synchronous and asynchronous operations, and connected to the crystal oscillator, the button, the charger, and the voltage converter. Based on this, an external power supply can be connected to the charger through the type-c interface, thereby realizing charging or power-on of the lithium battery. The lithium battery serves as the driving power supply of the master control unit, and the voltage of the lithium battery can be converted into 3.3 volts required by the Nrf52833 master control unit through the voltage converter.

[0080] In some embodiments, the central control device sends a first control instruction corresponding to a current detection scene to the Nrf52833 master control unit; the Nrf52833 master control unit determines an angle detection unit corresponding to the current detection scene from a plurality of angle detection units as a target angle detection unit in response to the first control instruction sent by the central control device, wherein the plurality of angle detection units include an angle detection unit composed of a magnetic encoder and an angle detection unit composed of an IMU and a distance sensor; the Nrf52833 master control unit sends a second control instruction to the target angle detection unit; the target angle detection unit in the plurality of angle detection units detects real-time detection data associated with a real-time angle of the opening and closing object, and feeds back the real-time detection data to the Nrf52833 master control unit; the Nrf52833 master control unit receives the real-time detection data fed back by the target angle detection unit, and determines a real-time opening and closing angle of the opening and closing object according to the real-time detection data; and feeds back the real-time opening and closing angle to the central control device.

[0081] In the present embodiment, the angle detection system 10 provides two different precision angle detection methods, and can call corresponding angle detection units to detect the real-time opening and closing angle of the opening and closing object according to the control instruction of different detection scenes. In this way, the precision requirements of angle detection in different detection scenes are met, and the accuracy of angle detection is improved.

[0082] Please refer to Figure 10, which shows a block diagram of an angle detection device 500 according to an embodiment of the present application. This device is applied to a main control unit in an angle detection system, which also includes multiple angle detection units and a central control device. The device 500 may include a detection unit determination module 510, a command sending module 520, an angle determination module 530, and an angle sending module 540.

[0083] The detection unit determination module 510 is used to respond to the first control instruction corresponding to the current detection scene sent by the central control device, and determine the angle detection unit corresponding to the current detection scene from the multiple angle detection units as the target angle detection unit.

[0084] The instruction sending module 520 is used to send a second control instruction to the target angle detection unit, where the second control instruction is used to drive the target angle detection unit to detect real-time detection data associated with the real-time angle of the opening object.

[0085] The angle determination module 530 is configured to receive the real-time detection data fed back by the target angle detection unit, and determine the real-time opening and closing angle of the opening object according to the real-time detection data.

[0086] The angle sending module 540 is used to feed back the real-time opening and closing angle to the central control device.

[0087] In some embodiments, the target angle detection unit is a magnetic encoder, the real-time detection data is the real-time angle data detected by the magnetic encoder, and the angle determination module 530 can be specifically used to obtain the difference between the angle value of the real-time angle data and the angle value of the first preset angle as the real-time opening and closing angle.

[0088] In other embodiments, the target angle detection unit includes an inertial sensor IMU and a distance sensor, the real-time detection data includes motion data detected by the IMU and real-time distance data detected by the distance sensor, and the angle determination module 530 may include a motion state judgment unit and an angle determination unit. The motion state judgment unit may be used to determine whether the opening and closing object is in a stationary state based on the rotational angular velocity in the motion data. The angle determination unit may be used to determine the real-time opening and closing angle based on the real-time distance data and a preset mapping relationship if the opening and closing object is in a stationary state, the preset mapping relationship including a plurality of preset distance data and a plurality of preset opening and closing angles, the preset distance data corresponding to the preset opening and closing angles one-to-one; if the opening and closing object is not in a stationary state, the real-time opening and closing angle is determined based on the historical opening and closing angles of the opening and closing object and the angle change data in the motion data.

[0089] In this mode, the angle determination unit can be specifically configured to obtain a sum value of an angle value of the historical opening and closing angle and a change value of the angle change data as the real-time opening and closing angle.

[0090] In some embodiments, the angle detection device 500 can further include a preset data acquisition module and a mapping relationship establishing module. The preset data acquisition module can be configured to, before determining the real-time opening and closing angle according to the real-time distance data and a preset mapping relationship, acquire target opening and closing angles of the opening and closing object in a moving state and target distance data corresponding to the target opening and closing angles every preset time length in response to a mode calibration instruction, to obtain a plurality of preset distance data and a plurality of preset opening and closing angles. The mapping relationship establishing module can be configured to establish the preset mapping relationship according to the plurality of preset distance data and the plurality of preset opening and closing angles.

[0091] In some embodiments, the angle detection system further includes a Hall detection unit, and the angle detection device 500 can further include an opening and closing state detection module. The opening and closing state detection module can be configured to, before determining the real-time opening and closing angle of the opening and closing object according to the real-time detection data, determine whether the opening and closing object is in a closed state according to detection data of the Hall detection unit. The angle determination module 530 can be specifically configured to, if the opening and closing object is in the closed state, acquire a first preset angle as the real-time opening and closing angle; and if the opening and closing object is not in the closed state, determine the real-time opening and closing angle of the opening and closing object according to the real-time detection data.

[0092] In some embodiments, the system further includes a first network communication unit and a second network communication unit, the first network communication unit is connected with the central control device, and the second network communication unit is connected with the master control unit; the detection unit determination module 510 can be specifically configured to, in response to a first control instruction sent by the central control device through the first network communication unit, determine an angle detection unit corresponding to the first control instruction from the plurality of angle detection units as a target angle detection unit. The angle sending module 540 can be specifically configured to feed back the real-time opening and closing angle to the central control device through the second network communication unit.

[0093] Please refer to Figure 11 which shows a structural block diagram of a computer readable storage medium provided by an embodiment of the present application. The computer readable medium 600 stores program code, which can be called and executed by a processor to perform the method described in the above method embodiments.

[0094] The computer-readable storage medium 600 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. Optionally, the computer-readable storage medium 600 comprises a non-transitory computer-readable medium. The computer-readable storage medium 600 has storage space for program code 601 for carrying out any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 601 can be compressed, for example, in a suitable form.

[0095] In some embodiments, a computer program product or computer program is provided, which comprises computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the above-mentioned method embodiments.

[0096] Finally, it should be noted that the above-mentioned embodiments are merely used to illustrate but not to limit the technical solutions of the present application; even though the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced by equivalent replacements; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An angle detection method, characterized in that: A main control unit is applied to an angle detection system, wherein the system further comprises a plurality of angle detection units and a central control device, and the method comprises: In response to a first control instruction corresponding to a current detection scene sent by the central control device, determining an angle detection unit corresponding to the current detection scene from the multiple angle detection units as a target angle detection unit, wherein the target angle detection unit includes an inertial sensor IMU and a distance sensor; sending a second control instruction to the target angle detection unit, wherein the second control instruction is used to drive the target angle detection unit to detect real-time detection data associated with the real-time angle of the opening object; Receive the real-time detection data fed back by the target angle detection unit, the real-time detection data including the motion data detected by the IMU and the real-time distance data detected by the distance sensor, and determine the real-time opening and closing angle of the opening and closing object according to the real-time detection data: judge whether the opening and closing object is in a stationary state according to the rotational angular velocity in the motion data; if the opening and closing object is in a stationary state, determine the real-time opening and closing angle according to the real-time distance data and a preset mapping relationship, the preset mapping relationship including a plurality of preset distance data and a plurality of preset opening and closing angles, and the preset distance data corresponds to the preset opening and closing angles in a one-to-one manner; if the opening and closing object is not in a stationary state, determine the real-time opening and closing angle according to the historical opening and closing angles of the opening and closing object and the angle change data in the motion data; The real-time opening and closing angle is fed back to the central control device.

2. The method according to claim 1, characterized in that The target angle detection unit is a magnetic encoder, the real-time detection data is real-time angle data detected by the magnetic encoder, and determining the real-time opening and closing angle of the opening object according to the real-time detection data includes: The difference between the angle value of the real-time angle data and the angle value of the first preset angle is obtained as the real-time opening and closing angle.

3. The method according to claim 1, characterized in that The determining the real-time opening and closing angle according to the historical opening and closing angle of the opening and closing object and the angle change data in the motion data includes: The sum of the angle value of the historical opening and closing angle and the change value of the angle change data is obtained as the real-time opening and closing angle.

4. The method according to claim 1, wherein Before determining the real-time opening and closing angle according to the real-time distance data and the preset mapping relationship, the method further includes: In response to the mode calibration instruction, obtaining a target opening and closing angle of the opening and closing object in motion and target distance data corresponding to the target opening and closing angle every preset time period to obtain the plurality of preset distance data and the plurality of preset opening and closing angles; The preset mapping relationship is established according to the plurality of preset distance data and the plurality of preset opening and closing angles.

5. The method according to any one of claims 1-2, characterized in that The angle detection system further includes a Hall detection unit. Before determining the real-time opening and closing angle of the opening object according to the real-time detection data, the method further includes: determining whether the opening and closing object is in a closed state according to the detection data of the Hall detection unit; If the opening and closing object is in a closed state, obtaining a first preset angle as the real-time opening and closing angle; If the opening and closing object is not in a closed state, the step of determining the real-time opening and closing angle of the opening and closing object according to the real-time detection data is performed.

6. The method according to any one of claims 1-2, characterized in that The system further includes a first network communication unit and a second network communication unit, wherein the first network communication unit is connected to the central control device, and the second network communication unit is connected to the main control unit; The step of determining, in response to the first control instruction sent by the central control device, an angle detection unit corresponding to the first control instruction from the multiple angle detection units as a target angle detection unit includes: In response to a first control instruction sent by the central control device through the first network communication unit, determining an angle detection unit corresponding to the first control instruction from the plurality of angle detection units as a target angle detection unit; Feedback of the real-time opening and closing angle to the central control device includes: The real-time opening and closing angle is fed back to the central control device through the second network communication unit.

7. An angle detection device, characterized in that: A main control unit used in an angle detection system, wherein the system further comprises a plurality of angle detection units and a central control device, wherein the device comprises: a detection unit determination module, configured to, in response to a first control instruction corresponding to a current detection scene sent by the central control device, determine an angle detection unit corresponding to the current detection scene from the multiple angle detection units as a target angle detection unit, wherein the target angle detection unit includes an inertial sensor IMU and a distance sensor; an instruction sending module, configured to send a second control instruction to the target angle detection unit, wherein the second control instruction is configured to drive the target angle detection unit to detect real-time detection data associated with the real-time angle of the object; an angle determination module, configured to receive the real-time detection data fed back by the target angle detection unit, and determine the real-time opening and closing angle of the opening and closing object based on the real-time detection data, wherein the real-time detection data includes motion data detected by the IMU and real-time distance data detected by the distance sensor, and the angle determination module includes a motion state judgment unit and an angle determination unit, wherein the motion state judgment unit is configured to judge whether the opening and closing object is in a stationary state based on the rotational angular velocity in the motion data, and the angle determination unit is configured to determine the real-time opening and closing angle based on the real-time distance data and a preset mapping relationship if the opening and closing object is in a stationary state, wherein the preset mapping relationship includes a plurality of preset distance data and a plurality of preset opening and closing angles, and the preset distance data corresponds one-to-one to the preset opening and closing angles; and if the opening and closing object is not in a stationary state, the real-time opening and closing angle is determined based on the historical opening and closing angles of the opening and closing object and the angle change data in the motion data; Angle sending module, used for feeding back the real-time opening and closing angle to the central control device.

8. An angle detection system, characterized in that: The system includes a main control unit, multiple angle detection units and a central control device; The central control device is used to send a first control instruction corresponding to the current detection scene to the main control unit; The main control unit is configured to determine, in response to the first control instruction sent by the central control device, an angle detection unit corresponding to the current detection scene from the multiple angle detection units as a target angle detection unit; Sending a second control instruction to the target angle detection unit, wherein the target angle detection unit includes an inertial sensor IMU and a distance sensor; The target angle detection unit among the multiple angle detection units is used to detect real-time detection data associated with the real-time angle of the object being opened, and feed the real-time detection data back to the main control unit; The main control unit is used to receive the real-time detection data fed back by the target angle detection unit, the real-time detection data including the motion data detected by the IMU and the real-time distance data detected by the distance sensor, and determine the real-time opening and closing angle of the opening and closing object based on the real-time detection data: determine whether the opening and closing object is in a stationary state based on the rotational angular velocity in the motion data; if the opening and closing object is in a stationary state, determine the real-time opening and closing angle based on the real-time distance data and a preset mapping relationship, the preset mapping relationship including multiple preset distance data and multiple preset opening and closing angles, and the preset distance data corresponds to the preset opening and closing angles one-to-one; if the opening and closing object is not in a stationary state, determine the real-time opening and closing angle based on the historical opening and closing angles of the opening and closing object and the angle change data in the motion data.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method, data processing device, computing equipment, program product and storage medium

    CN108564681A

  • Fire-fighting simulation interactive water gun

    CN213667704U