Anti-pinch early warning method and apparatus, and electronic device
By constructing a target distance matrix and a template matrix for differential calculation, it is possible to determine whether there are foreign objects in the electric leg rest. This solves the risk of user injury caused by the electric leg rest only activating anti-pinch after detecting foreign objects in the existing technology, and achieves the effect of early anti-pinch warning.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2026-03-26
AI Technical Summary
In existing technologies, electric leg supports can only activate the anti-pinch function after detecting foreign objects, which poses a high risk of users being pinched.
By deploying sensor modules to measure the distance between the fixed end and the mobile end, a target distance matrix is constructed. The target template matrix is determined based on the operating status value of the mobile end. Differential calculations are performed to determine the connectivity of the matrix element values and to determine whether there are foreign objects, thereby triggering an anti-pinch warning in advance.
It enables timely activation of anti-pinch warnings even when no foreign object is caught, reducing the risk of users being injured by pinching.
Smart Images

Figure CN2025093976_26032026_PF_FP_ABST
Abstract
Description
Anti-pinch early warning method and device and electronic equipment
[0001] Cross-reference to Related Applications
[0002] The present application claims priority to the Chinese patent application No. 202411325792X filed on September 23, 2024, and entitled "Anti-pinch early warning method and device and electronic equipment", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the field of automation, in particular, to an anti-pinch early warning method, device and electronic equipment. BACKGROUND
[0004] In modern home design, electric sofas, as important furniture for improving the quality of life, provide great convenience and comfort for users with their electric leg support function. However, during the automatic expansion or contraction of the electric leg support, due to the incomplete visibility of mechanical movement, especially when a person's hands, feet or other body parts are accidentally placed on the movement path, there is a high risk of pinching injury.
[0005] To address this safety hazard, the current commonly used technical solution is to install a pressure sensor inside the electric leg support, which monitors the change of pressure value in real time to determine whether the electric leg support is pinching foreign matter. Once an abnormal pressure is detected, the system will immediately stop the movement of the leg support, thereby avoiding further injury. However, this anti-pinch mechanism can effectively prevent the injury from expanding, but it is essentially a post-remedial measure, i.e., intervention after pinching foreign matter, which means that the pinched object (such as a human body part) has already been injured or uncomfortable to some extent at the moment of pinching.
[0006] In view of the problem in the related art that the anti-pinch operation cannot be started until the moving end of the target device contacts foreign matter, resulting in a high risk of pinching injury to the user, no effective solution has been proposed. SUMMARY
[0007] The present application provides an anti-pinch early warning method, device and electronic equipment to solve the problem in the related art that the anti-pinch operation cannot be started until the moving end of the target device contacts foreign matter, resulting in a high risk of pinching injury to the user.
[0008] According to an aspect of the present application, a pinch prevention early warning method is provided, applied to a target device including a fixed end and a mobile end. The method includes: determining the distance between each sensing point of a sensor module and the sensor module, obtaining MxN distance values, and constructing a target distance matrix from the MxN distance values, wherein the sensor module is composed of at least one sensor, the sensor module is used to measure the distance between the fixed end and the mobile end, the sensor module is arranged on the fixed end or the mobile end, M and N are positive integers; obtaining a running state value of the mobile end, and determining a target template matrix according to the running state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in a running state interval to which the running state value belongs, each historical distance matrix is composed of MxN historical distance values, and each historical distance value is the historical distance between the deployment position of each sensor in the sensor module and the position of the mobile end; performing difference calculation on the target distance matrix and the target template matrix according to a preset rule to obtain a target difference matrix, and grouping the matrix element values in the target difference matrix according to the connectivity of the matrix element values in the target difference matrix to obtain Q matrix element value sets, wherein the target difference matrix is composed of MxN matrix element values, and Q is a positive integer; determining the number of elements in each matrix element value set to obtain Q element numbers, and determining whether there is a foreign object between the mobile end and the fixed end according to the Q element numbers, and determining a pinch prevention early warning result according to the existence state of the foreign object, wherein the pinch prevention early warning result is used to prevent the foreign object from being pinched by the mobile end and the fixed end.
[0009] Optionally, determining the distance between each sensing point of the sensor module and the sensor module to obtain MxN distance values, and constructing a target distance matrix from the MxN distance values includes: receiving an initial distance matrix collected by the sensor module, wherein the initial distance matrix is used to represent the measured distance between the fixed end and the mobile end; obtaining a state matrix of the sensor module and obtaining a running state value of the mobile end, determining a matrix change rule according to the running state value, and changing the initial distance matrix according to the matrix change rule and the state matrix to obtain the target distance matrix.
[0010] Optionally, the matrix changing rule is determined according to the running state value, and the initial distance matrix is changed according to the matrix changing rule and the state matrix to obtain the target distance matrix, including: obtaining a first preset correspondence table, and obtaining a safety distance value corresponding to the running state value in the first preset correspondence table to obtain a target safety distance value, wherein the first preset correspondence table includes a plurality of running state value intervals and a safety distance value corresponding to each running state value interval, and the safety distance value is a safety distance between the fixed end and the mobile end; identifying a first position of an abnormal element value in the state matrix, and changing a distance value at the first position in the initial distance matrix to the target safety distance value to obtain an updated initial distance matrix; changing a distance value greater than the target safety distance value in the updated initial distance matrix to the target safety distance value to obtain the target distance matrix.
[0011] Optionally, the running state value of the mobile terminal is obtained, and the target template matrix is determined according to the running state value, including: obtaining pose data of the mobile terminal, and determining the running state value according to the pose data; obtaining a first preset correspondence table, and obtaining a running state value interval to which the running state value belongs in the first preset correspondence table, wherein the first preset correspondence table includes a plurality of running state value intervals and a safety distance value corresponding to each running state value interval; and determining the template matrix corresponding to the running state value interval as the target template matrix.
[0012] Optionally, the target distance matrix and the target template matrix are subjected to difference calculation according to a preset rule to obtain a target difference matrix, including: subtracting distance values at the same position in the target template matrix and the target distance matrix to obtain an initial difference matrix; sequentially judging whether each difference value is greater than or equal to a preset threshold value; in the case that the target difference value is greater than or equal to the preset threshold value, changing the target difference value in the initial difference matrix to a first preset value to obtain an updated initial difference matrix; in the case that the target difference value is less than the preset threshold value, changing the target difference value in the initial difference matrix to a second preset value to obtain an updated initial difference matrix, wherein the first preset value is greater than the second preset value; after changing each difference value in the initial difference matrix, the updated initial difference matrix is determined as the target difference matrix.
[0013] Optionally, the matrix element values in the target difference matrix are grouped according to the connectivity of the matrix element values in the target difference matrix to obtain Q matrix element value sets, including: determining position information of each first preset value in the target difference matrix to obtain a plurality of position information, wherein the target difference matrix includes the first preset value and the second preset value, and the first preset value is greater than the second preset value; grouping the first preset values adjacent in position information to obtain a plurality of groups of first preset values; and adding a group of first preset values with repeated position information to the same matrix element value set to obtain Q matrix element value sets.
[0014] Optionally, the determining whether the foreign matter exists between the mobile end and the fixed end according to the number of the Q elements and the determining the anti-pinch early warning result according to the existence state of the foreign matter comprise: in a case that the number of the elements is greater than or equal to a number threshold, it is determined that the foreign matter exists between the mobile end and the fixed end, and the anti-pinch early warning result is determined as that the anti-pinch early warning information is sent and the anti-pinch operation is started; in a case that the number of the elements is less than the number threshold, it is determined that the foreign matter does not exist between the mobile end and the fixed end, and the anti-pinch early warning result is determined as that the anti-pinch early warning information is not sent.
[0015] Optionally, the target template matrix is obtained by: determining a running state interval to which the running state value belongs, and obtaining a plurality of historical distance matrices located in the running state interval; performing a merging operation on the plurality of historical distance matrices according to a preset merging rule to obtain a candidate distance matrix, wherein the merging rule is that, for element values at the same position in the matrix, the smallest element value in the plurality of historical distance matrices is determined as an element value in the candidate distance matrix; and performing a minimum pooling operation on the candidate distance matrix to obtain the target template matrix.
[0016] Optionally, the running state value of the mobile end is a moving angle of the mobile end.
[0017] Optionally, the template matrix corresponding to the running state value interval is a state matrix, the state matrix representing running states of each sensor in the sensor module, and each element in the state matrix being one of: a normal running state code, an error state code, and an abnormal element.
[0018] Optionally, the template matrix corresponding to the running state value interval is a matrix composed of distances between the fixed end and the mobile end measured by the sensor module and in which no foreign matter exists.
[0019] According to another aspect of the present application, a pinch-prevention early-warning device is provided. The device comprises: a first determining unit configured to determine distances between each sensing point of a sensor module and the sensor module, to obtain MxN distance values, and to construct a target distance matrix from the MxN distance values, wherein the sensor module is composed of at least one sensor, the sensor module is configured to measure a distance between a fixed end and a mobile end, the sensor module is arranged at the fixed end or the mobile end, M and N are positive integers; a second determining unit configured to obtain a running state value of the mobile end, and to determine a target template matrix according to the running state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in a running state interval to which the running state value belongs, each historical distance matrix is composed of MxN historical distance values, and each historical distance value is a historical distance between a deployment position of each sensor in the sensor module and a position of the mobile end; a calculating unit configured to perform difference calculation on the target distance matrix and the target template matrix according to a preset rule, to obtain a target difference matrix, and to group matrix element values in the target difference matrix according to connectivity of the matrix element values, to obtain Q matrix element value sets, wherein the target difference matrix is composed of MxN matrix element values, and Q is a positive integer; and a third determining unit configured to determine a number of elements in each matrix element value set, to obtain Q element numbers, to determine whether a foreign object exists between the mobile end and the fixed end according to the Q element numbers, and to determine a pinch-prevention early-warning result according to a presence state of the foreign object, wherein the pinch-prevention early-warning result is used to prevent the foreign object from being pinched by the mobile end and the fixed end.
[0020] According to another aspect of the present application, a computer program product is also provided, comprising a computer program, which, when executed by a processor, implements a pinch-prevention early-warning method in the present application.
[0021] According to another aspect of the present application, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer readable instructions, and the processor is configured to run the computer readable instructions, wherein the computer readable instructions, when run, implement a pinch-prevention early-warning method.
[0022] By the present application, the following steps are adopted: determining distances between each sensing point of a sensor module and the sensor module, obtaining M*N distance values, and constructing a target distance matrix from the M*N distance values, wherein the sensor module is composed of at least one sensor, the sensor module is used to measure the distance between a fixed end and a mobile end, the sensor module is arranged at the fixed end or the mobile end, M and N are positive integers; obtaining a running state value of the mobile end, and determining a target template matrix according to the running state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in a running state interval to which the running state value belongs, each historical distance matrix is composed of M*N historical distance values, and each historical distance value is a historical distance between a deployment position of each sensor in the sensor module and a position of the mobile end; performing difference calculation on the target distance matrix and the target template matrix according to a preset rule, obtaining a target difference value matrix, and grouping matrix element values in the target difference value matrix according to connectivity of the matrix element values, obtaining Q matrix element value sets, wherein the target difference value matrix is composed of M*N matrix element values, and Q is a positive integer; determining the number of elements in each matrix element value set, obtaining Q element numbers, and determining whether there is a foreign matter between the mobile end and the fixed end according to the Q element numbers, and determining a foreign matter prevention warning result according to a presence state of the foreign matter, wherein the foreign matter prevention warning result is used to prevent the foreign matter from being clamped by the mobile end and the fixed end. The problem that in the related art, a foreign matter prevention operation can be started only after it is detected that the mobile end of a target device contacts the foreign matter, and the risk of user being clamped is high, is solved. By deploying sensors to measure the distance between the fixed end and the mobile end, and determining a target template matrix according to a running state value of the mobile end, the target distance matrix and the target template matrix are compared to obtain a target difference value matrix, so that the number of element values that are different between the target template matrix and the target distance matrix is determined according to the connectivity of different matrix element values in the target difference value matrix, whether to start the foreign matter prevention warning is determined through the number, and the effect that the foreign matter prevention warning is started in the case that no foreign matter is clamped is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and the illustrative embodiments of the present application, and their description are used to interpret the present application. The accompanying drawings do not constitute an inappropriate limitation on the present application. In the drawings:
[0024] FIG. 1 is a flowchart of a foreign matter prevention warning method according to an embodiment of the present application;
[0025] FIG. 2 is a schematic diagram of an optional electric sofa according to an embodiment of the present application;
[0026] FIG. 3 is a schematic diagram of a foreign matter prevention warning device according to an embodiment of the present application;
[0027] FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] It should be noted that the embodiments and features of the embodiments in the present application can be combined with each other without conflict. The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0029] In order for those skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] It should be noted that the anti-pinch warning method, device and electronic device determined by the present disclosure can be used in the field of automation, and can also be used in any field other than the field of automation. The application field of the anti-pinch warning method, device and electronic device determined by the present disclosure is not limited.
[0032] It should be noted that the information, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) collected in the present application are all information and data authorized by the user or authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards in relevant regions, take necessary security measures, do not violate public order and good customs, and provide corresponding operation portal for users to choose to authorize use or refuse to use. For example, an interface is provided between the system and the related users or institutions. Before obtaining the relevant information, the interface needs to send a request to the aforementioned user or institution, and after receiving the consent information feedback from the aforementioned user or institution, the relevant information is obtained.
[0033] For ease of description, the following describes some nouns or terms related to the embodiments of the present application:
[0034] dTof sensor: Direct Time of Flight sensor, a kind of time flight sensor, which is a sensor for calculating object distance by measuring the flight time of light pulse between occurrence and reception.
[0035] According to the embodiments of the present application, a pinch prevention warning method is provided.
[0036] Fig. 1 is a flowchart of a pinch prevention warning method according to an embodiment of the present application. As shown in Fig. 1, the method includes the following steps:
[0037] In step S101, the distance between each sensing point of the sensor module and the sensor module is determined to obtain MxN distance values, and a target distance matrix is constructed from the MxN distance values, wherein the sensor module is composed of at least one sensor, the sensor module is used to measure the distance between the fixed end and the moving end, the sensor module is arranged at the fixed end or the moving end, and M and N are positive integers.
[0038] It should be noted that the sensor module can be composed of at least one dTof sensor, the sensor module can emit MxN sensing signals through at least one dTof sensor to obtain distance information at MxN sensing points, so as to determine whether there is a foreign object between the fixed end and the moving end according to the distance information at the MxN sensing points, wherein there is no size relationship between M and N, M can be greater than, less than or equal to N, and the pinch prevention warning method in the present application is described in subsequent embodiments with M equal to N as an example.
[0039] Further, the target device can be a sofa, the moving end can be an electrically adjustable leg support of the sofa, and the fixed end can be the interior of the sofa. Fig. 2 is a schematic diagram of an optional electric sofa according to an embodiment of the present application. As shown in Fig. 2, the sensor module can obtain the distance between the fixed end of the sofa and the electrically adjustable leg support. In the case where a foreign object (such as a human hand or foot) appears between the fixed end of the sofa and the electrically adjustable leg support, the distance between the fixed end of the sofa and the electrically adjustable leg support detected by the sensor module will be affected by the foreign object, causing the measured distance value to change to the distance between the sensor module and the foreign object, so that the distance value determined by the sensor module changes, and then whether there is a foreign object between the fixed end of the sofa and the electrically adjustable leg support can be determined according to the distance matrix determined by the sensor module, and the electrically adjustable leg support is controlled according to the foreign object determination result to avoid the situation that the electrically adjustable leg support clamps the foreign object.
[0040] Specifically, as shown in FIG. 2, the sensor module can be arranged at a fixed end, and the electrically adjustable leg support, i.e., a moving end, is arranged at a moving end of the target device, i.e., a sofa. In order to ensure a large foreign matter determination range and improve the detection accuracy of foreign matter, the sensor module can be arranged in an M*N matrix form, so as to obtain an M*N distance matrix, i.e., a target distance matrix.
[0041] For example, M and N can be 8. If there is no foreign matter between the sofa fixed end and the electrically adjustable leg support when the electrically adjustable leg support is located at position A, the distance matrix (1) measured by the sensor module is as follows:
[0042] Therefore, in the case that there is foreign matter between the sofa fixed end and the electrically adjustable leg support, the measured matrix (2) can be as follows:
[0043] Therefore, whether there is foreign matter between the sofa fixed end and the electrically adjustable leg support can be determined according to the target distance matrix.
[0044] In step S102, the running state value of the moving end is obtained, and a target template matrix is determined according to the running state value. The target template matrix is calculated from a plurality of historical distance matrices in a running state interval to which the running state value belongs. Each historical distance matrix is composed of M*N historical distance values. Each historical distance value is a historical distance between the arrangement position of each sensor in the sensor module and the position of the moving end.
[0045] Specifically, the running state value of the moving end can be used to represent the running condition of the moving end. For example, the running state value can be the moving angle of the electrically adjustable leg support. When the running state value is 25, it can be represented that the electrically adjustable leg support is lifted by 25 degrees from the initial position.
[0046] Further, when determining whether there is foreign matter between the sofa fixed end and the electrically adjustable leg support, the target distance matrix measured by the sensor module needs to be compared with the target template matrix measured in the case that there is no foreign matter. Since the distance between the sofa fixed end and the electrically adjustable leg support is different when the electrically adjustable leg support is lifted by different angles, when obtaining the target template matrix, the running state value of the electrically adjustable leg support needs to be obtained first, and the target template matrix corresponding to the running state value is obtained. Then, the distance values in the target template matrix and the distance values in the target distance matrix can be compared, so as to ensure the accuracy of the comparison result.
[0047] It should be noted that in order to ensure that the target template matrix and the target distance matrix can be normally compared, it is necessary to ensure that the matrix style of the target template matrix and the target distance matrix is completely consistent, therefore, the target template matrix also needs to be MxN style, and the distance value in the target template matrix is the distance value measured under a certain operating state value, under the condition that there is no foreign matter between the fixed end of the sofa and the electrically adjustable leg support.
[0048] In step S103, the target distance matrix and the target template matrix are subjected to difference calculation according to a preset rule to obtain a target difference matrix, and the matrix element values in the target difference matrix are grouped according to the connectivity of the matrix element values in the target difference matrix to obtain Q matrix element value sets, wherein the target difference matrix is composed of MxN matrix element values, and Q is a positive integer.
[0049] Specifically, under the condition that the target distance matrix and the target template matrix under the operating state value are obtained, the target distance matrix and the target template matrix can be subjected to difference calculation to obtain a difference matrix, wherein the difference matrix can be used to represent the difference degree between the currently measured distance and the distance under the no-foreign-matter state, so as to determine whether there is foreign matter according to the difference degree.
[0050] For example, after difference calculation, if the difference between the element values at the same position in the matrix is greater than or equal to the preset threshold value, it represents that the distance difference is too large, which indicates that there may be foreign matter, and if the difference between the element values at the same position in the matrix is less than the preset threshold value, it represents that the difference may be caused by measurement error, which indicates that there is no foreign matter, and then whether there is foreign matter is determined according to the difference matrix after difference calculation.
[0051] It should be noted that in the case where the preset threshold value is set, the matrix obtained by difference calculation of the target distance matrix and the target template matrix can be further processed to obtain a difference matrix with clearer results, that is, in the case where the initial difference matrix is obtained, the size relationship between each element value in the matrix and the preset threshold value can be determined, in the case where the element value is greater than or equal to the preset threshold value, the element value is changed to 1, and in the case where the element value is less than the preset threshold value, the element value is changed to 0, thereby obtaining a matrix composed of only 1 and 0, for example, as shown in matrix (3):
[0052] Therefore, the connectivity of the matrix elements can be directly determined according to the matrix, and the matrix element values in the target difference matrix can be grouped according to the connectivity.
[0053] Further, when determining the connectivity of the matrix elements, the connected domains in the matrix can be determined, for example, in the above matrix, there are two connected domains, the first one is the connected domain located at the 3rd row and the 6th column, with a quantity of 1; the second one is the connected domain located at the 7th row and the 4th column, with a quantity of 3, thus, the element values in the matrix can be divided into 2 groups (element value 0 is not grouped), thereby completing the operation of grouping the matrix element values in the target difference matrix according to the connected domains to obtain Q matrix element value sets (one set contains the element (3, 6), and the other set contains three elements (7, 4), (8, 4), and (8, 5)).
[0054] In step S104, the number of elements in each matrix element value set is determined to obtain Q element quantities, and whether there is a foreign object between the mobile end and the fixed end is determined according to the Q element quantities, and a foreign object existence state is determined according to the foreign object existence state to determine a foreign object existence state, and the foreign object existence state is used to prevent the foreign object from being clamped by the mobile end and the fixed end.
[0055] Specifically, after obtaining the plurality of matrix element value sets, the number of elements in each element value set can be obtained, and it is determined whether the number is greater than a preset value. In the case where the number is greater than or equal to the preset value, it is indicated that there are many abnormal point positions, and the abnormal point positions are relatively concentrated, thus, it is determined that there is a foreign object, and a foreign object prevention warning operation needs to be performed, for example, the adjustment operation of the electrically adjustable leg rest is terminated, or the electrically adjustable leg rest is controlled to adjust a preset angle in the opposite direction. In the case where the number is less than the preset value, it is indicated that the error detected by a certain sensor is large, resulting in an abnormal distance value. At this time, it can be determined that there is no foreign object, and no foreign object prevention warning operation needs to be performed, thereby achieving the technical effect that the foreign object is detected in time and the foreign object prevention warning operation is performed in the case where there is a foreign object between the fixed end of the sofa and the electrically adjustable leg rest, and the safety of using the electrically adjustable sofa is ensured.
[0056] The anti-pinch early warning method provided by the embodiments of the present application determines the distance between each sensing point of a sensor module and the sensor module, obtains M*N distance values, constructs a target distance matrix from the M*N distance values, wherein the sensor module is composed of at least one sensor, the sensor module is used to measure the distance between the fixed end and the mobile end, the sensor module is arranged on the fixed end or the mobile end, M and N are positive integers; an operating state value of the mobile end is obtained, and a target template matrix is determined according to the operating state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in an operating state interval to which the operating state value belongs, each historical distance matrix is composed of M*N historical distance values, and each historical distance value is a historical distance between the deployment position of each sensor in the sensor module and the position of the mobile end; the target distance matrix and the target template matrix are differentially calculated according to a preset rule to obtain a target difference value matrix, and the matrix element values in the target difference value matrix are grouped according to the connectivity of the matrix element values in the target difference value matrix to obtain Q matrix element value sets, wherein the target difference value matrix is composed of M*N matrix element values, and Q is a positive integer; the number of elements in each matrix element value set is determined to obtain Q element numbers, and whether there is a foreign object between the mobile end and the fixed end is determined according to the Q element numbers, and an anti-pinch early warning result is determined according to the existence state of the foreign object, wherein the anti-pinch early warning result is used to prevent the foreign object from being pinched by the mobile end and the fixed end. The problem that in the related art, the anti-pinch operation can be started only after it is detected that the mobile end of the target device contacts a foreign object, resulting in a high risk of the user being pinched. By deploying sensors to measure the distance between the fixed end and the mobile end, and determining the target template matrix according to the operating state value of the mobile end, the target distance matrix and the target template matrix are compared to obtain the target difference value matrix, so that the number of element values that are different between the target template matrix and the target distance matrix is determined according to the connectivity of different matrix element values in the target difference value matrix, whether to start the anti-pinch early warning is determined by the number, and the effect of starting the anti-pinch early warning in the case of not pinching the foreign object is achieved.
[0057] Optionally, in the anti-pinch early warning method provided by the embodiments of the present application, determining the distance between each sensing point of a sensor module and the sensor module to obtain M*N distance values, and constructing a target distance matrix from the M*N distance values include: receiving an initial distance matrix collected by the sensor module, wherein the initial distance matrix is used to represent the measured distance between the fixed end and the mobile end; obtaining a state matrix of the sensor module and an operating state value of the mobile end, determining a matrix change rule according to the operating state value, and changing the initial distance matrix according to the matrix change rule and the state matrix to obtain the target distance matrix.
[0058] It should be noted that when the target distance matrix is obtained, due to the fact that the sensor module may have various problems, the distance matrix collected by the sensor module is inaccurate, and therefore, the initial distance matrix collected by the sensor module needs to be processed to obtain a more accurate target distance matrix.
[0059] Specifically, the received initial distance matrix collected by the receiving sensor module can be as shown in matrix (4):
[0060] Wherein, there are multiple abnormal values, for example, N, at this time, the initial distance matrix needs to be changed according to the state matrix of the sensor module to remove the abnormal values therein. It should be noted that the state matrix can represent the running state of each sensor in the sensor module, and the state matrix can be as shown in matrix (5):
[0061] Wherein, 5 is a normal running state code, 6 and 9 can be error state codes, and 255 is an abnormal value. The state matrix can be used to determine which values in the initial distance matrix are abnormal values, so as to change the initial distance matrix.
[0062] It should be noted that when the initial distance matrix is changed, the change can be made according to the matrix change rule. When the matrix change rule is determined, the running state value of the mobile terminal at the current time is determined, and the safe distance is determined according to the running state value, and then the abnormal data in the initial distance matrix is changed to the safe distance value, so as to complete the preliminary change of the initial distance matrix.
[0063] For example, in the case of a safe distance of 4, the above matrix 4 can be changed to:
[0064] Further, in order to ensure the simplicity of the matrix, the values greater than the safe distance in matrix (6) can be changed to the safe distance value, so as to obtain matrix (7):
[0065] Further, matrix (7) can be determined as the target distance matrix, thereby ensuring the accuracy of the target distance matrix and avoiding misjudgment of foreign objects.
[0066] The embodiment changes the initial distance matrix collected by the sensor module, thereby achieving the technical effect of improving the accuracy of the distance matrix.
[0067] Optionally, in the anti-pinch early warning method provided in the embodiments of the present application, the matrix change rule is determined according to the running state value, and the initial distance matrix is changed according to the matrix change rule and the state matrix to obtain the target distance matrix, which includes: obtaining a first preset reference table, and obtaining a safe distance value corresponding to the running state value in the first preset reference table to obtain a target safe distance value, wherein the first preset reference table includes a plurality of running state value intervals and a safe distance value corresponding to each running state value interval, and the safe distance value is a safe distance between the fixed end and the mobile end; identifying a first position of an abnormal element value in the state matrix, and changing a distance value at the first position in the initial distance matrix to the target safe distance value to obtain an updated initial distance matrix; changing a distance value greater than the target safe distance value in the updated initial distance matrix to the target safe distance value to obtain the target distance matrix.
[0068] It should be noted that when determining the matrix change rule, since the matrix change rule is to change the value greater than the safe distance in the initial distance matrix to the safe distance value, it is necessary to first determine the safe distance value at the current time according to the running state value of the mobile end at the current time, and then change the initial distance matrix according to the safe distance value.
[0069] Specifically, when determining the safe distance value, the first preset reference table can be obtained, since the first preset reference table includes a plurality of running state value intervals and a safe distance value corresponding to each running state value interval, the interval in which the running state value at the current time is located can be determined first, and the safe distance value corresponding to the interval is determined as the target safe distance value. Table 1 is an optional first preset reference table, as shown in Table 1, in the case of a running state value of 22, the interval located in [21, 50] can be determined, at this time, the target safe distance can be determined as 4.
[0070] Table 1
[0071] Further, after obtaining the target safe distance, it is necessary to determine which distance values in the initial distance matrix need to be changed, which can be determined in two ways, one is to determine through the state matrix, that is, to identify a first position of an abnormal element value in the state matrix, and to change a distance value at the first position in the initial distance matrix to the target safe distance value, so as to change the distance value of the state anomaly to the safe distance value, and the other is to change the distance value greater than the safe distance value to the safe distance value, so as to avoid the large difference caused by the too long distance in the subsequent difference calculation, and then misjudge as existing foreign matter.
[0072] The embodiment sets a matrix change rule, and changes the initial distance matrix according to the matrix change rule, so that the technical effect of improving the accuracy of the target distance matrix is achieved, thereby improving the accuracy of subsequent foreign matter judgment.
[0073] Optionally, in the anti-pinch early warning method provided in the embodiment of the application, the operation state value of the mobile terminal is obtained, and the target template matrix is determined according to the operation state value, including: obtaining the pose data of the mobile terminal, and determining the operation state value according to the pose data; obtaining a first preset reference table, and obtaining the operation state value interval to which the operation state value belongs in the first preset reference table, wherein the first preset reference table includes a plurality of operation state value intervals and a safety distance value corresponding to each operation state value interval; and determining the template matrix corresponding to the operation state value interval as the target template matrix.
[0074] Specifically, when determining the target template matrix, since each safety distance corresponds to a target template matrix, the first preset reference table still needs to be obtained, the operation state value interval to which the operation state value belongs is obtained in the first preset reference table, so that the template matrix corresponding to the operation state value interval is determined as the target template matrix.
[0075] It should be noted that when determining the operation state value, the pose data of the mobile terminal can be used for determination, wherein the pose data can be the angle at which the mobile terminal is lifted, for example, the angle at which the mobile terminal is lifted at the current time is 25 degrees, and the operation state value is 25.
[0076] The embodiment determines the relationship between the operation state value and the template matrix, so that the target template matrix of the mobile terminal in different poses is accurately obtained, and the accuracy of subsequent foreign matter recognition is improved.
[0077] Optionally, in the anti-pinch early warning method provided in the embodiment of the application, the target distance matrix and the target template matrix are subjected to difference calculation according to a preset rule to obtain a target difference matrix, including: subtracting the distance values at the same positions in the target template matrix and the target distance matrix to obtain an initial difference matrix; sequentially judging whether each difference value is greater than or equal to a preset threshold value; in the case where the target difference value is greater than or equal to the preset threshold value, changing the target difference value in the initial difference matrix to a first preset value to obtain an updated initial difference matrix; in the case where the target difference value is less than the preset threshold value, changing the target difference value in the initial difference matrix to a second preset value to obtain an updated initial difference matrix, wherein the first preset value is greater than the second preset value; after changing each difference value in the initial difference matrix, the updated initial difference matrix is determined as the target difference matrix.
[0078] Specifically, when the target distance matrix and the target template matrix are subjected to difference calculation, the target template matrix is first subtracted from the target distance matrix to obtain an initial difference matrix, and it is determined whether each difference value in the initial difference matrix is greater than or equal to a preset threshold value, the difference value greater than or equal to the preset threshold value is determined as a first preset value, and the difference value less than the preset threshold value is determined as a second preset value, so that the difference values in the initial difference matrix are divided into two types, and a target difference matrix is obtained.
[0079] For example, when the target distance matrix is matrix (8) and the target template matrix is matrix (9), the obtained initial difference matrix is shown in matrix (10):
[0080] After subtraction, the following is obtained:
[0081] When the preset threshold value is 2, the target difference matrix obtained after processing matrix (10) is shown in matrix (11):
[0082] Thus, the processed target difference matrix is obtained, and the technical effect of improving the efficiency of determining the connectivity of the elements in the matrix is further improved.
[0083] Optionally, in the anti-pinch early warning method provided in the embodiments of the present application, grouping the matrix element values in the target difference matrix according to the connectivity of the matrix element values in the target difference matrix to obtain Q matrix element value sets comprises: determining the position information of each first preset value in the target difference matrix to obtain a plurality of position information, wherein the target difference matrix contains first preset values and second preset values, and the first preset values are greater than the second preset values; grouping the first preset values adjacent in position information into a group to obtain a plurality of first preset value groups; and adding a group of first preset values with repeated position information to the same matrix element value set to obtain Q matrix element value sets.
[0084] It should be noted that when grouping according to connectivity, only the first preset values are grouped, that is, only 1 is grouped, and the second preset values are not grouped.
[0085] Specifically, when grouping the matrix element values, the position information of each first preset value in the target difference matrix needs to be determined, and adjacent first preset values are grouped into a group, wherein, in the case that there is no adjacent first preset value, the first preset value itself is grouped into a group, thereby obtaining a plurality of groups of first preset values, and further, a group of first preset values with repeated position information is added to the same matrix element value set, that is, mutually connected first preset values are added to a matrix element value set, thereby obtaining a plurality of matrix element value sets, wherein each matrix element value set contains at least one first preset value.
[0086] For example, as shown in the matrix (11), the position information of each first preset value is obtained, 4 position information is obtained, which is (3, 6), (7, 4), (8, 4), and (8, 5), and adjacent first preset values are grouped into a group, 3 groups of first preset values are obtained, which are (3, 6), ((7, 4), (8, 4)), and ((8, 4), (8, 5)), and first preset values with the same position information are grouped into a group, and 2 matrix element value sets are obtained, which are (3, 6) and ((7, 4), (8, 4), (8, 5)).
[0087] Optionally, in the anti-pinch warning method provided in the embodiments of the present application, whether there is a foreign object between the mobile end and the fixed end is determined according to the number of elements, and the anti-pinch warning result is determined according to the existence state of the foreign object, comprising: in the case that the number of elements is greater than or equal to the number threshold, it is determined that there is a foreign object between the mobile end and the fixed end, and the anti-pinch warning result is determined as issuing anti-pinch warning information and starting anti-pinch operation; in the case that the number of elements is less than the number threshold, it is determined that there is no foreign object between the mobile end and the fixed end, and the anti-pinch warning result is determined as not issuing anti-pinch warning information.
[0088] Specifically, after obtaining a plurality of matrix element value sets, the number of elements in each matrix element value set can be determined, and it is judged whether the number of elements is greater than a preset value, in the case that the number of elements is greater than or equal to the preset value, it is indicated that there are many abnormal point positions, and they are relatively concentrated, therefore, it is judged that there is a foreign object at present, and anti-pinch warning operation is needed. In the case that the number of elements of all matrix element value sets is less than the preset value, it is indicated that the error detected by a certain sensor is large, resulting in an abnormal distance value, at this time, it can be judged that there is no foreign object at present, and anti-pinch warning operation is not needed, thereby achieving the technical effect that the foreign object between the fixed end of the sofa and the electrically adjustable leg support is detected in time and anti-pinch warning operation is performed in the case that there is a foreign object between the fixed end of the sofa and the electrically adjustable leg support, and the safety of using the electric sofa is ensured.
[0089] For example, in the case of a preset value of 2, the number of elements of each matrix element value set can be obtained, and in the case of a certain matrix element value set containing 3 element values, it is determined that there is a foreign object, and the movement of the electric leg support needs to be stopped. In the case of the number of element values in all matrix element value sets being 1 or 0, it is indicated that there is no foreign object, and then the electric adjustment leg support continues to perform the adjustment operation until a foreign object is detected or a predetermined adjustment position is reached.
[0090] The application determines whether there is a foreign object by setting a preset value, thereby achieving the technical effect of reducing the foreign object misjudgment rate.
[0091] Optionally, in the anti-pinch early warning method provided in the embodiments of the application, the target template matrix is obtained by: determining a running state interval to which a running state value belongs, and obtaining a plurality of historical distance matrices located in the running state interval; performing a merging operation on the plurality of historical distance matrices according to a preset merging rule to obtain a candidate distance matrix, wherein the merging rule is that for element values at the same position in the matrix, the smallest element value in the plurality of historical distance matrices is determined as the element value in the candidate distance matrix; and performing a minimum pooling operation on the candidate distance matrix to obtain the target template matrix.
[0092] Specifically, when generating the target template matrix, since each running state interval corresponds to a template matrix, the number of running state intervals needs to be determined first, and then the number of template matrices is determined according to the number of running state intervals. In the case of the running state intervals shown in Table 1, the number of running state intervals is 4, that is, the four running state intervals [0, 20], [21, 50], [51, 100] and [101, max], at this time, the template matrix corresponding to each interval needs to be set to obtain four template matrices.
[0093] Further, after the running state interval is determined, a plurality of historical distance matrices measured under each running state interval in the case of no foreign object can be obtained, and the plurality of historical distance matrices under the same running state interval are merged and subjected to a minimum pooling operation to obtain the target template matrix. By merging and performing a minimum pooling operation on the matrix, the distance values in the matrix can be changed to the minimum value, thereby improving the accuracy of foreign object detection when comparing.
[0094] For example, when obtaining the template matrix of the running state interval [21, 50], the distance matrices with stroke numbers 22 and 38 can be obtained, as shown in matrix (12) and matrix (13):
[0095] Stroke number: 22:
[0096] Stroke number: 38:
[0097] Further, the above two matrices are merged, and the merging rule is shown in formula (14):
[0098] wherein B k(i,j) is the matrix element value of the i-th row and the j-th column in the template matrix of the k-th running state interval, is the matrix element value of the i-th row and the j-th column in the p-th historical matrix in the k-th running state interval, through the above formula 14, the minimum matrix element value at each position in each historical matrix in each running state interval can be selected, and a plurality of minimum matrix element values constitute a candidate distance matrix of the running state interval, as shown in matrix (15).
[0099] Further, after obtaining the candidate distance matrix, the minimum pooling method can be used, the convolution kernel parameter can be 3*3, and the stride is 1. After convolution with the 8*8 candidate distance matrix, the output matrix is still 8*8, so that the target template matrix after convolution is obtained, and the robustness of the template matrix is further improved. The target template matrix is shown in matrix (16).
[0100] The embodiment of the present application can accurately obtain the template matrix in each running state interval, and ensure the accuracy of the comparison result of the target distance matrix and the target template matrix.
[0101] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0102] The embodiment of the present application also provides a clamping prevention early warning device. It should be noted that the clamping prevention early warning device of the embodiment of the present application can be used to execute the clamping prevention early warning method provided by the embodiment of the present application. The clamping prevention early warning device provided by the embodiment of the present application is introduced as follows.
[0103] FIG. 3 is a schematic diagram of a clamping prevention early warning device according to the embodiment of the present application. As shown in FIG. 3, the device comprises a first determination unit 31, a second determination unit 32, a calculation unit 33, and a third determination unit 34.
[0104] The first determination unit 31 is configured to determine distances between each sensing point of a sensor module and the sensor module, to obtain M*N distance values, and to construct a target distance matrix from the M*N distance values, wherein the sensor module is composed of at least one sensor, the sensor module is configured to measure a distance between a fixed end and a mobile end, the sensor module is arranged on the fixed end or the mobile end, and M and N are positive integers.
[0105] The second determination unit 32 is configured to obtain a running state value of the mobile end, and to determine a target template matrix according to the running state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in a running state interval to which the running state value belongs, each historical distance matrix is composed of M*N historical distance values, and each historical distance value is a historical distance between a deployment position of each sensor in the sensor module and a position of the mobile end.
[0106] The calculation unit 33 is configured to perform differential calculation on the target distance matrix and the target template matrix according to a preset rule, to obtain a target difference matrix, and to group matrix element values in the target difference matrix according to connectivity of the matrix element values, to obtain Q matrix element value sets, wherein the target difference matrix is composed of M*N matrix element values, and Q is a positive integer.
[0107] The third determination unit 34 is configured to determine an element quantity in each matrix element value set, to obtain Q element quantities, to determine whether there is a foreign object between the mobile end and the fixed end according to the Q element quantities, and to determine a foreign object prevention warning result according to a presence state of the foreign object, wherein the foreign object prevention warning result is configured to prevent the foreign object from being clamped by the mobile end and the fixed end.
[0108] The anti-pinch early warning device provided in the embodiments of the present application determines the distance between each sensing point of the sensor module and the sensor module by the first determination unit 31, obtains M*N distance values, and constructs a target distance matrix from the M*N distance values, wherein the sensor module is composed of at least one sensor, the sensor module is used to measure the distance between the fixed end and the mobile end, the sensor module is arranged on the fixed end or the mobile end, M and N are positive integers; the second determination unit 32 obtains the running state value of the mobile end, and determines the target template matrix according to the running state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in the running state interval to which the running state value belongs, each historical distance matrix is composed of M*N historical distance values, and each historical distance value is the historical distance between the deployment position of each sensor in the sensor module and the position of the mobile end; the calculation unit 33 differentially calculates the target distance matrix and the target template matrix according to a preset rule, obtains a target difference value matrix, groups the matrix element values in the target difference value matrix according to the connectivity of the matrix element values in the target difference value matrix, and obtains Q matrix element value sets, wherein the target difference value matrix is composed of M*N matrix element values, and Q is a positive integer; the third determination unit 34 determines the number of elements in each matrix element value set, obtains Q element numbers, determines whether there is a foreign matter between the mobile end and the fixed end according to the Q element numbers, and determines an anti-pinch early warning result according to the existence state of the foreign matter, wherein the anti-pinch early warning result is used to prevent the foreign matter from being pinched by the mobile end and the fixed end. The problem that the risk of user being pinched is high because the anti-pinch operation cannot be started until it is detected that the mobile end of the target device contacts the foreign matter in the related art is solved. The distance between the fixed end and the mobile end is measured by deploying the sensor, the target template matrix is determined according to the running state value of the mobile end, the target distance matrix and the target template matrix are compared, the target difference value matrix is obtained, the number of element values that are different between the target template matrix and the target distance matrix is determined according to the connectivity of different matrix element values in the target difference value matrix, whether to start the anti-pinch early warning is determined by the number, and the effect that the anti-pinch early warning is started without pinching the foreign matter is achieved.
[0109] Optionally, in the anti-pinch early warning device provided in the embodiments of the present application, the first determination unit 31 comprises: a receiving module, configured to receive an initial distance matrix collected by the sensor module, wherein the initial distance matrix is used to represent the measured distance between the fixed end and the mobile end; a first obtaining module, configured to obtain a state matrix of the sensor module, and obtain a running state value of the mobile end, determine a matrix changing rule according to the running state value, and change the initial distance matrix according to the matrix changing rule and the state matrix to obtain the target distance matrix.
[0110] Optionally, in the anti-pinch early warning device provided by the embodiment of the application, the first acquisition module comprises: an acquisition submodule, configured to acquire a first preset correspondence table and acquire a safety distance value corresponding to the running state value in the first preset correspondence table to obtain a target safety distance value, wherein the first preset correspondence table comprises a plurality of running state value intervals and a safety distance value corresponding to each running state value interval, and the safety distance value is a safety distance between the fixed end and the mobile end; an identification submodule, configured to identify a first position of an abnormal element value in the state matrix and change a distance value at the first position in the initial distance matrix to the target safety distance value to obtain an updated initial distance matrix; and a change submodule, configured to change a distance value greater than the target safety distance value in the updated initial distance matrix to the target safety distance value to obtain the target distance matrix.
[0111] Optionally, in the anti-pinch early warning device provided by the embodiment of the application, the second determination unit 32 comprises: a second acquisition module, configured to acquire pose data of the mobile end and determine the running state value according to the pose data; a third acquisition module, configured to acquire the first preset correspondence table and acquire a running state value interval to which the running state value belongs in the first preset correspondence table, wherein the first preset correspondence table comprises a plurality of running state value intervals and a safety distance value corresponding to each running state value interval; and a first determination module, configured to determine the template matrix corresponding to the running state value interval as the target template matrix.
[0112] Optionally, in the anti-pinch early warning device provided by the embodiment of the application, the calculation unit 33 comprises: a calculation module, configured to subtract distance values at the same positions in the target template matrix and the target distance matrix to obtain an initial difference value matrix; a judgment module, configured to judge whether each difference value is greater than or equal to a preset threshold value in turn; a first change module, configured to change the target difference value in the initial difference value matrix to a first preset value to obtain an updated initial difference value matrix in a case where the target difference value is greater than or equal to the preset threshold value; a second change module, configured to change the target difference value in the initial difference value matrix to a second preset value to obtain an updated initial difference value matrix in a case where the target difference value is less than the preset threshold value, wherein the first preset value is greater than the second preset value; and a second determination module, configured to determine the updated initial difference value matrix as the target difference value matrix after changing each difference value in the initial difference value matrix.
[0113] Optionally, in the anti-pinch early warning device provided by the embodiment of the application, the calculation unit 33 comprises: a third determination module, configured to determine position information of each first preset value in the target difference value matrix, to obtain a plurality of position information, wherein the target difference value matrix comprises the first preset value and the second preset value, and the first preset value is greater than the second preset value; a grouping module, configured to group first preset values with adjacent position information into a group, to obtain a plurality of groups of first preset values; and an adding module, configured to add a group of first preset values with repeated position information into the same matrix element value set, to obtain Q matrix element value sets.
[0114] Optionally, in the anti-pinch early warning device provided by the embodiment of the application, the third determination unit 34 comprises: a fourth determination module, configured to determine that there is a foreign object between the mobile end and the fixed end in the case that the element quantity is greater than or equal to the quantity threshold value, and determine the anti-pinch early warning result as issuing the anti-pinch early warning information and starting the anti-pinch operation; and a fifth determination module, configured to determine that there is no foreign object between the mobile end and the fixed end in the case that the element quantity is less than the quantity threshold value, and determine the anti-pinch early warning result as not issuing the anti-pinch early warning information.
[0115] Optionally, in the anti-pinch early warning device provided by the embodiment of the application, the target template matrix is obtained by the following manner: a fourth determination unit, configured to determine a running state interval to which the running state value belongs, and acquire a plurality of historical distance matrices located in the running state interval; a merging unit, configured to perform a merging operation on the plurality of historical distance matrices according to a preset merging rule, to obtain a candidate distance matrix, wherein the merging rule is that, for element values at the same position in the matrix, the smallest element value in the plurality of historical distance matrices is determined as an element value in the candidate distance matrix; and a processing unit, configured to perform a minimum pooling operation on the candidate distance matrix, to obtain the target template matrix.
[0116] The anti-pinch early warning device comprises a processor and a memory, the first determination unit 31, the second determination unit 32, the calculation unit 33, and the third determination unit 34 are all stored in the memory as program units, and the corresponding functions are realized by the processor executing the program units stored in the memory.
[0117] The processor comprises a core, and the core retrieves the corresponding program units from the memory. The core can be set to one or more, and the problem that the user is at high risk of being injured by the target device in the related art can be solved by adjusting the core parameters.
[0118] The memory can comprise a non-persistent memory in a computer readable medium, a random access memory (RAM), and / or a non-volatile memory such as a read-only memory (ROM) or a flash memory (flash RAM), and the memory comprises at least one memory chip.
[0119] The embodiment of the present application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the anti-pinch early warning method.
[0120] The embodiment of the present application provides a processor, which is used for running a program, and the program is executed to perform the anti-pinch early warning method.
[0121] FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 4, the electronic device 40 includes a processor, a memory, and a program stored in the memory and capable of running on the processor. The processor executes the program to realize the steps of the anti-pinch early warning method. The device herein can be a server, a PC, a PAD, a mobile phone, or the like.
[0122] The present application also provides a computer program product, which is suitable for executing a program that is initialized with the steps of the anti-pinch early warning method when executed on a data processing device.
[0123] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.
[0125] These computer program instructions can also be stored in a computer readable storage medium that can direct the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer readable storage medium produce a product including instruction devices, which implement the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.
[0126] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks.
[0127] In one typical arrangement, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0128] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), flash memory, or other memory technologies, CD-ROM, digital versatile disc (DVD), or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information for access by a computing device. In no case does the medium include a transitory signal.
[0129] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0130] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article or apparatus that includes the element.
[0131] The above merely provides an example of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall fall into the scope of claims of the present application.
Claims
1. A pinching prevention early warning method characterized by comprising: The method is applied to a target device including a fixed end and a mobile end, and comprises: determining distances between each sensing point of a sensor module and the sensor module, obtaining M×N distance values, and constructing a target distance matrix from the M×N distance values, wherein the sensor module is composed of at least one sensor, the sensor module is used to measure a distance between the fixed end and the mobile end, the sensor module is arranged at the fixed end or the mobile end, M and N are positive integers; obtaining a running state value of the mobile end, and determining a target template matrix according to the running state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in a running state interval to which the running state value belongs, each historical distance matrix is composed of M×N historical distance values, and each historical distance value is a historical distance between a deployment position of each sensor in the sensor module and a position of the mobile end; differentially calculating the target distance matrix and the target template matrix according to a preset rule to obtain a target difference matrix, grouping matrix element values in the target difference matrix according to connectivity of the matrix element values to obtain Q matrix element value sets, wherein the target difference matrix is composed of M×N matrix element values, and Q is a positive integer; determining the number of elements in each matrix element value set to obtain Q element numbers, determining whether there is a foreign object between the mobile end and the fixed end according to the Q element numbers, and determining a foreign object prevention warning result according to a presence state of the foreign object, wherein the foreign object prevention warning result is used to prevent the foreign object from being clamped by the mobile end and the fixed end.
2. The method of claim 1, wherein, determining distances between each sensing point of a sensor module and the sensor module, obtaining M×N distance values, and constructing a target distance matrix from the M×N distance values, wherein the sensor module is composed of at least one sensor, the sensor module is used to measure a distance between the fixed end and the mobile end, the sensor module is arranged at the fixed end or the mobile end, M and N are positive integers; receiving an initial distance matrix collected by the sensor module, wherein the initial distance matrix is used to represent a measured distance between the fixed end and the mobile end; obtaining a state matrix of the sensor module and a running state value of the mobile end, determining a matrix change rule according to the running state value, and changing the initial distance matrix according to the matrix change rule and the state matrix to obtain the target distance matrix.
3. The method of claim 2, wherein, determining a matrix change rule according to the running state value, and changing the initial distance matrix according to the matrix change rule and the state matrix to obtain the target distance matrix, comprises: obtaining a first preset reference table, and obtaining a target safety distance value corresponding to the running state value in the first preset reference table, wherein the first preset reference table includes a plurality of running state value intervals and a safety distance value corresponding to each running state value interval, and the safety distance value is a safety distance between the fixed end and the mobile end; identify a first position of an abnormal element value in the state matrix, and change a distance value at the first position in the initial distance matrix to the target safety distance value to obtain an updated initial distance matrix; change a distance value greater than the target safety distance value in the updated initial distance matrix to the target safety distance value to obtain the target distance matrix.
4. The method of claim 1, wherein, obtaining a running state value of the mobile terminal, and determining a target template matrix according to the running state value includes: obtaining pose data of the mobile terminal, and determining the running state value according to the pose data; obtaining a first preset reference table, and obtaining a running state value interval to which the running state value belongs in the first preset reference table, wherein the first preset reference table includes a plurality of running state value intervals, and a safety distance value corresponding to each running state value interval; determining a template matrix corresponding to the running state value interval as the target template matrix.
5. The method of claim 1, wherein, differentially calculating the target distance matrix and the target template matrix according to a preset rule to obtain a target difference value matrix includes: subtracting distance values at the same position in the target template matrix and the target distance matrix to obtain an initial difference value matrix; sequentially judging whether each difference value is greater than or equal to a preset threshold value; in a case where the target difference value is greater than the preset threshold value, changing the target difference value in the initial difference value matrix to a first preset value to obtain an updated initial difference value matrix; in a case where the target difference value is less than the preset threshold value, changing the target difference value in the initial difference value matrix to a second preset value to obtain an updated initial difference value matrix, wherein the first preset value is greater than the second preset value; after changing each difference value in the initial difference value matrix, determining the updated initial difference value matrix as the target difference value matrix.
6. The method of claim 1, wherein, grouping matrix element values in the target difference value matrix according to connectivity of the matrix element values in the target difference value matrix to obtain Q matrix element value sets includes: determining position information of each first preset value in the target difference value matrix to obtain a plurality of position information, wherein the target difference value matrix includes the first preset value and a second preset value, and the first preset value is greater than the second preset value; grouping first preset values adjacent in position information to obtain a plurality of groups of first preset values; adding a group of first preset values with repeated position information to the same matrix element value set to obtain the Q matrix element value sets.
7. The method of claim 1, wherein, determining whether a foreign object exists between the mobile terminal and the fixed terminal according to the Q element quantity, and determining an anti-pinch warning result according to an existence state of the foreign object includes: in a case where the element quantity is greater than or equal to a quantity threshold value, determining that a foreign object exists between the mobile terminal and the fixed terminal, and determining the anti-pinch warning result as issuing anti-pinch warning information and starting an anti-pinch operation; in a case where the element quantity is less than the quantity threshold value, determining that no foreign object exists between the mobile terminal and the fixed terminal, and determining the anti-pinch warning result as not issuing anti-pinch warning information.
8. The method of claim 1, wherein, The target template matrix is obtained by the following manner: determine a running state interval to which the running state value belongs, and obtain a plurality of historical distance matrices located in the running state interval; perform a merging operation on the plurality of historical distance matrices according to a preset merging rule to obtain a candidate distance matrix, wherein the merging rule is that, for element values at the same position in the matrix, the smallest element value in the plurality of historical distance matrices is determined as an element value in the candidate distance matrix; perform a minimum pooling operation on the candidate distance matrix to obtain the target template matrix.
9. The method of claim 1, wherein, The running state value of the mobile end is a moving angle of the mobile end.
10. The method of claim 2, wherein, The template matrix corresponding to the running state value interval is a state matrix, wherein the state matrix represents running states of each sensor in the sensor module, and each element in the state matrix is one of a normal running state code, an error state code and an abnormal element.
11. The method of claim 5, wherein, The template matrix corresponding to the running state value interval is a matrix formed by distances between the fixed end and the mobile end measured by the sensor module.
12. A pinching prevention early warning device characterized by comprising: The device is applied to a target equipment, and the target equipment includes a fixed end and a mobile end. A first determination unit is configured to determine distances between each sensing point of a sensor module and the sensor module to obtain M×N distance values, and construct a target distance matrix from the M×N distance values, wherein the sensor module is formed by at least one sensor, the sensor module is configured to measure distances between the fixed end and the mobile end, the sensor module is arranged on the fixed end or the mobile end, and M and N are positive integers. A second determination unit is configured to obtain a running state value of the mobile end, and determine a target template matrix according to the running state value, wherein the target template matrix is calculated from a plurality of historical distance matrices in a running state interval to which the running state value belongs, each historical distance matrix is formed by M×N historical distance values, and each historical distance value is a historical distance between a deployment position of each sensor in the sensor module and a position of the mobile end. A calculation unit is configured to perform difference calculation on the target distance matrix and the target template matrix according to a preset rule to obtain a target difference matrix, group matrix element values in the target difference matrix according to connectivity of the matrix element values to obtain Q matrix element value sets, wherein the target difference matrix is formed by M×N matrix element values, and Q is a positive integer. A third determination unit is configured to determine a number of elements in each matrix element value set to obtain Q element numbers, determine whether there is a foreign object between the mobile end and the fixed end according to the Q element numbers, and determine a foreign object prevention warning result according to a presence state of the foreign object, wherein the foreign object prevention warning result is used to prevent the foreign object from being clamped by the mobile end and the fixed end.
13. An electronic device, comprising: An apparatus, including one or more processors and memory storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the anti-pinch warning method according to any one of claims 1 to 11. An apparatus, including one or more processors and memory storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the anti-pinch warning method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Anti-pinch device for vehicles
CN101120151A
Moving object detection method and device, equipment and storage medium
CN113156453A
Non-contact vehicle door anti-pinch alarm device based on millimeter wave detection
CN113247024A
Automatic door anti-pinch method and system based on ultrasonic waves
CN113585906A
Anti-pinch early warning method and device and electronic equipment
CN118837901A