Anti-pinch warning method, device and electronic equipment

By deploying sensor modules on the fixed and mobile ends of the electric leg support, building and comparing distance matrix and template matrix, determining whether there are foreign objects, issuing anti-clip warnings in advance, solving the problem of clamping risks of electric leg support and improving the use Security.

CN118837901BActive Publication Date: 2024-11-22DEWERTOKIN TECHNOLOGY GROUP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411325792.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-11-22
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

In the prior art, the electric leg support has a high risk of pinch injury due to incomplete visibility of mechanical movement during automatic stretching or contraction, and the anti-pinch mechanism is usually post-remediation, which cannot effectively prevent the user from being pinched.

Method used

By deploying the sensor module on the fixed end and mobile end of the electric leg support, the distance between the two is measured and the target distance matrix and the target template matrix are constructed, and the difference calculation is performed. According to the connectivity of the matrix element values, determine whether there are foreign objects. Issue an anti-clip warning and start the anti-clip operation.

Benefits of technology

It effectively reduces the risk of users being pinched, and by detecting foreign objects in advance, it avoids pinched, and improves the safety of electric sofas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118837901B_ABST
    Figure CN118837901B_ABST
Patent Text Reader

Abstract

The present application discloses an anti-pinch warning method, device and electronic device. It relates to the field of automation. The method includes: determining the distance value between each sensing point of the sensor module and the sensor module, and constructing a target distance matrix according to the distance value; obtaining the running status value of the mobile terminal, and determining the target template matrix according to the running status value; performing differential calculation on the target distance matrix and the target template matrix according to preset rules to obtain a target difference matrix, grouping the matrix element values ​​in the target difference matrix according to the connectivity of the matrix element values ​​in the target difference matrix, and obtaining Q matrix element value sets; determining the number of elements in each matrix element value set, and determining the anti-pinch warning result according to the number of elements. Through the present application, the problem in the related art that the anti-pinch operation can only be started after the mobile terminal of the target device is detected to be in contact with a foreign object, resulting in a high risk of the user being pinched, is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automation, and in particular to an anti-pinch warning method, device and electronic equipment. Background Art

[0002] In modern home design, electric sofas are important furniture that improves the quality of life. The electric leg rests they are equipped with provide users with great convenience and comfort. However, during the automatic extension or contraction process, the electric leg rests have a greater risk of being pinched due to the incomplete visibility of mechanical movement, especially when human hands, feet and other body parts are accidentally placed in their movement path.

[0003] In order to deal with this safety hazard, the currently commonly used technical solution is to install a pressure sensor inside the electric leg rest, and determine whether the electric leg rest has clamped a foreign object by monitoring the change in pressure value in real time. Once abnormal pressure is detected, the system will immediately stop the movement of the leg rest to avoid further damage. However, although this anti-pinch mechanism can effectively prevent the damage from expanding, it is essentially an ex post remedial measure, that is, intervention is carried out only after the foreign object is clamped, which means that at the moment of being clamped, a certain degree of damage or discomfort has been caused to the clamped object (such as a human body part).

[0004] Currently, no effective solution has been proposed to the problem that the anti-pinch operation can only be initiated after the mobile terminal of the target device is detected to be in contact with a foreign object, which leads to a high risk of users being pinched. Summary of the invention

[0005] The present application provides an anti-pinch warning method, device and electronic device to solve the problem in the related art that the anti-pinch operation can only be initiated after detecting that the mobile terminal of the target device contacts a foreign object, resulting in a high risk of the user being pinched.

[0006] According to one aspect of the present application, there is provided an anti-pinch warning method, which is applied to a target device, wherein the target device includes a fixed end and a mobile end. The method includes: determining the distance between each sensing point of the 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 the fixed end and the mobile end, the sensor module is set at the fixed end or the mobile end, and M and N are positive integers; obtaining the operating status value of the mobile end, and determining the target template matrix according to the operating status value, wherein the target template matrix is ​​calculated from multiple historical distance matrices within the operating status interval to which the operating status value belongs, and each historical distance matrix is ​​composed of M×N historical distance values, and each historical distance value is the deployment position of each sensor in the sensor module. The target distance matrix and the target template matrix are differentially calculated according to preset rules 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 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 terminal and the fixed terminal is determined according to the Q element numbers, and an anti-pinch warning result is determined according to the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile terminal and the fixed terminal.

[0007] Optionally, the distance between each sensing point of the sensor module and the sensor module is determined to obtain M×N distance values, and a target distance matrix is ​​constructed from the M×N distance values, including: receiving an initial distance matrix collected by the sensor module, wherein the initial distance matrix is ​​used to characterize the measured distance between the fixed end and the mobile end; obtaining a state matrix of the sensor module, and obtaining 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 a target distance matrix.

[0008] Optionally, determining a matrix change rule according to the operating status value, and changing the initial distance matrix according to the matrix change rule and the state matrix to obtain a target distance matrix includes: obtaining a first preset comparison table, and obtaining a safety distance value corresponding to the operating status value in the first preset comparison table to obtain a target safety distance value, wherein the first preset comparison table includes multiple operating status value intervals and a safety distance value corresponding to each operating status value interval, and the safety distance value is a safety distance between a fixed end and a mobile end; identifying the first position of the abnormal element value in the state matrix, and changing the 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 the distance value in the updated initial distance matrix that is greater than the target safety distance value to the target safety distance value to obtain a target distance matrix.

[0009] Optionally, obtaining the running status value of the mobile terminal and determining the target template matrix based on the running status value includes: obtaining the posture data of the mobile terminal and determining the running status value based on the posture data; obtaining a first preset comparison table, and obtaining the running status value interval to which the running status value belongs in the first preset comparison table, wherein the first preset comparison table includes multiple running status value intervals and a safety distance value corresponding to each running status value interval; and determining the template matrix corresponding to the running status value interval as the target template matrix.

[0010] Optionally, the target distance matrix and the target template matrix are differentially calculated according to preset rules to obtain a target difference matrix, including: subtracting the distance values ​​at the same position in the target template matrix and the target distance matrix to obtain an initial difference matrix; judging in turn whether each difference is greater than or equal to a preset threshold; when the target difference is greater than or equal to the preset threshold, changing the target difference in the initial difference matrix to a first preset value to obtain an updated initial difference matrix; when the target difference is less than the preset threshold, changing the target difference 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 in the initial difference matrix, determining the updated initial difference matrix as the target difference matrix.

[0011] 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 sets of matrix element values, including: determining the position information of each first preset value in the target difference matrix to obtain multiple position information, wherein the target difference matrix contains a first preset value and a second preset value, and the first preset value is greater than the second preset value; grouping the first preset values ​​with adjacent position information into a group to obtain multiple groups of first preset values; adding a group of first preset values ​​with repeated position information to the same set of matrix element values ​​to obtain Q sets of matrix element values.

[0012] Optionally, determining whether there is foreign matter between the mobile end and the fixed end based on the number of Q elements, and determining the anti-pinch warning result based on the existence state of the foreign matter includes: when the number of elements is greater than or equal to the number threshold, determining that there is foreign matter between the mobile end and the fixed end, and determining the anti-pinch warning result as issuing an anti-pinch warning message and starting an anti-pinch operation; when the number of elements is less than the number threshold, determining that there is no foreign matter between the mobile end and the fixed end, and determining the anti-pinch warning result as not issuing an anti-pinch warning message.

[0013] Optionally, the target template matrix is ​​obtained in the following manner: determine the operating state interval to which the operating state value belongs, and obtain multiple historical distance matrices located in the operating state interval; merge the multiple historical distance matrices according to a preset merging rule to obtain a candidate distance matrix, wherein the merging rule is: for element values ​​at the same position in the matrix, determine the smallest element value in the multiple historical distance matrices as the element value in the candidate distance matrix; perform a minimum pooling operation on the candidate distance matrix to obtain the target template matrix.

[0014] According to another aspect of the present application, an anti-pinch warning device is provided. The device includes: a first determination unit, which is used to determine the distance between each sensing point of the sensor module and the sensor module, obtain M×N distance values, and construct a target distance matrix from the M×N distance values, wherein the sensor module is composed of at least one sensor, and the sensor module is used to measure the distance between the fixed end and the mobile end, and the sensor module is set at the fixed end or the mobile end, and M and N are positive integers; a second determination unit, which is used to obtain the running state value of the mobile end, and determine the target template matrix according to the running state value, wherein the target template matrix is ​​calculated from multiple historical distance matrices within the running state interval to which the running state value belongs, and each historical distance matrix is ​​composed of M×N historical distance values, and each historical distance value is the deployment of each sensor in the sensor module. a historical distance between the position and the position of the mobile terminal; a calculation unit, used to perform differential calculation on the target distance matrix and the target template matrix according to preset rules to obtain a target difference matrix, and group 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 consists of M×N matrix element values, and Q is a positive integer; a third determination unit, used to determine the number of elements in each matrix element value set to obtain Q element numbers, and determine whether there is a foreign object between the mobile terminal and the fixed terminal according to the Q element numbers, and determine the anti-pinch warning result according to the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile terminal and the fixed terminal.

[0015] According to another aspect of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, an anti-pinch warning method in the present application is implemented.

[0016] According to another aspect of the present invention, an electronic device is provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein an anti-pinch warning method is executed when the computer-readable instructions are executed.

[0017] Through the present application, the following steps are adopted: determine the distance between each sensing point of the 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 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 set at the fixed end or the mobile end, and M and N are positive integers; obtain the operating state value of the mobile end, and determine the target template matrix according to the operating state value, wherein the target template matrix is ​​calculated from multiple historical distance matrices within the operating state interval to which the operating state value belongs, and each historical distance matrix is ​​composed of M×N historical distance values, and each historical distance value is each sensor in the sensor module. The historical distance between the deployment location and the location of the mobile terminal; the target distance matrix and the target template matrix are differentially calculated according to preset rules 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 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 the number of Q elements, and whether there is a foreign object between the mobile terminal and the fixed terminal is determined according to the number of Q elements, and the anti-pinch warning result is determined according to the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile terminal and the fixed terminal. The problem in the related art that the anti-pinch operation can only be started after the mobile terminal of the target device is detected to be in contact with a foreign object, resulting in a high risk of the user being pinched is solved. 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 status value of the mobile end, the target distance matrix and the target template matrix are compared to obtain the target difference matrix. Then, the number of element values ​​that differ 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 matrix. The number is used to determine whether to activate the anti-pinch warning, thereby achieving the effect of activating the anti-pinch warning without pinching any foreign objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 is a flow chart of an anti-pinch warning method provided according to an embodiment of the present application;

[0020] Figure 2 is a schematic diagram of an optional electric sofa provided according to an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of an anti-pinch warning device provided according to an embodiment of the present application;

[0022] Figure 4 It is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] It should be noted that the anti-pinch warning method, device and electronic equipment determined in 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 equipment determined in the present disclosure is not limited.

[0027] It should be noted that the collected information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) used in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated. Corresponding operation portals are provided for users to choose to authorize or refuse to use. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0028] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0029] dTof sensor: Direct Time of Flight sensor is a time-of-flight sensor that calculates the distance to an object by measuring the flight time between the generation and reception of a light pulse.

[0030] According to an embodiment of the present application, an anti-pinch warning method is provided.

[0031] Figure 1 Flowchart of the anti-pinch warning method provided according to the embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0032] Step S101, determine the distance between each sensing point of the sensor module and the sensor module, obtain M×N distance values, and construct a target distance matrix by 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 set at the fixed end or the mobile end, and M and N are positive integers.

[0033] It should be noted that the sensor module can be composed of at least one dTof sensor. The sensor module can emit M×N sensing signals through at least one dTof sensor to obtain distance information at M×N sensing points, thereby determining whether there is a foreign object between the fixed end and the mobile end based on the distance information at the M×N sensing points. There is no limitation on the size relationship between M and N, and M can be greater than, less than or equal to N. In the subsequent embodiments, M equals N as an example to illustrate the anti-pinch warning method in this application.

[0034] Furthermore, the target device may be a sofa, the mobile end may be an electrically adjustable leg rest of the sofa, and the fixed end may be the interior of the sofa. Figure 2 is a schematic diagram of an optional electric sofa provided according to an embodiment of the present application, such as Figure 2 As shown, the sensor module can obtain the distance between the fixed end of the sofa and the electric adjustable leg rest. When a foreign object (such as a human hand or a human foot) appears between the fixed end of the sofa and the electric adjustable leg rest, the distance between the fixed end of the sofa and the electric adjustable leg rest detected by the sensor module will be affected by the foreign object, causing the measured distance value to be changed to the distance between the sensor module and the foreign object, thereby causing a change in the measured distance value. Further, it is possible to determine whether there is a foreign object between the fixed end of the sofa and the electric adjustable leg rest based on the distance matrix measured by the sensor module, and control the electric adjustable leg rest based on the foreign object determination result to avoid the electric leg rest from clamping the foreign object.

[0035] Specifically, Figure 2 As shown, the sensor module can be set at a fixed end, and the electric adjustable leg rest is also the mobile end, which is the mobile end of the target device (i.e., the sofa). In order to ensure a larger foreign body measurement range and thus improve the accuracy of foreign body detection, the sensor module can be set to an M×N matrix form, thereby obtaining an M×N distance matrix, i.e., the target distance matrix.

[0036] For example, M and N can be 8. When the electric adjustable leg rest is located at a certain adjustment position (the position is any position within the adjustable range of the electric adjustable leg rest), if there is no foreign matter between the fixed end of the sofa and the electric adjustable leg rest, the distance matrix (1) measured by the sensor module is:

[0037] (1)

[0038] In this adjustment position, if there is a foreign object between the fixed end of the sofa and the electrically adjustable leg rest, the measured matrix (2) can be as follows:

[0039] (2)

[0040] Therefore, it is possible to determine whether there is a foreign object between the fixed end of the sofa and the electrically adjustable leg rest based on the target distance matrix.

[0041] Step S102, obtain the running status value of the mobile terminal, and determine the target template matrix according to the running status value, wherein the target template matrix is ​​calculated by multiple historical distance matrices within the running status interval to which the running status 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 location of the mobile terminal.

[0042] Specifically, the operating status value of the mobile terminal can be used to characterize the operating status of the mobile terminal. For example, the operating status value can be the moving angle of the electrically adjustable leg rest. When the operating status value is 25, it can represent that the electrically adjustable leg rest is lifted 25 degrees from the initial position.

[0043] Furthermore, when determining whether there is a foreign object between the fixed end of the sofa and the electric adjustable leg rest, it is necessary to compare the target distance matrix measured by the sensor module with the target template matrix measured in the absence of foreign objects, and since the distance without foreign objects between the fixed end of the sofa and the electric adjustable leg rest is different when the electric adjustable leg rest is lifted at different angles, when obtaining the target template matrix, it is necessary to first obtain the operating status value of the electric adjustable leg rest and obtain the target template matrix corresponding to the operating status value, and then the distance value in the target template matrix can be compared with the distance value in the target distance matrix to ensure the accuracy of the comparison result.

[0044] It should be noted that in order to ensure that the target template matrix and the target distance matrix can be compared normally, it is necessary to ensure that the matrix styles of the target template matrix and the target distance matrix are completely consistent. Therefore, the target template matrix also needs to be in M×N style. The distance value in the target template matrix is ​​the distance value measured under a certain operating state value, when it is determined that there is no foreign matter between the fixed end of the sofa and the electric adjustable leg rest.

[0045] Step S103, performing differential calculation on the target distance matrix and the target template matrix according to preset rules 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 sets of matrix element values, wherein the target difference matrix consists of M×N matrix element values, and Q is a positive integer.

[0046] Specifically, when 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 differentially calculated to obtain a difference matrix, wherein the difference matrix can be used to characterize the degree of difference between the currently measured distance and the distance in the foreign body-free state, thereby judging whether there is a foreign body based on the degree of difference.

[0047] For example, after performing the differential calculation, if the difference between the element values ​​at the same position in the matrix is ​​greater than or equal to a preset threshold, it indicates that the distance difference is too large, indicating that there may be foreign matter; if the difference between the element values ​​at the same position in the matrix is ​​less than the preset threshold, it indicates that the difference may be due to measurement errors, indicating that there is no foreign matter, and then determine whether there is a foreign matter based on the difference matrix after the differential calculation.

[0048] It should be noted that, when a preset threshold is set, the matrix obtained by performing differential calculation on the target distance matrix and the target template matrix can be further processed to obtain a difference matrix with clearer results. That is, when the initial difference matrix is ​​obtained, the size relationship between each element value and the preset threshold can be determined. When the element value is greater than or equal to the preset threshold, the element value is changed to 1, and when the element value is less than the preset threshold, the element value is changed to 0, thereby obtaining a matrix consisting of only 1 and 0, such as shown in matrix (3):

[0049] (3)

[0050] Therefore, the connectivity of the matrix elements can be determined directly according to the matrix, and then the matrix element values ​​in the target difference matrix can be grouped according to the connectivity.

[0051] Furthermore, when determining the connectivity of matrix elements, the connected domain 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, and the number is 1; the second one is the connected domain located at the 7th row and the 4th column, and the number is 3. Therefore, the element values ​​in the matrix can be divided into 2 groups (the 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 domain to obtain Q sets of matrix element values ​​(one set contains the element (3,6), and the other set contains three elements, namely (7,4), (8,4), and (8,5)).

[0052] Step S104, determine the number of elements in each matrix element value set, obtain Q elements, and determine whether there is a foreign object between the mobile end and the fixed end based on the Q elements, and determine the anti-pinch warning result based on the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile end and the fixed end.

[0053] Specifically, after obtaining multiple matrix element value sets, the number of elements in each element value set can be obtained, and it can be determined whether the number is greater than a preset value. When the number is greater than or equal to the preset value, it indicates that there are many points where the distance is abnormal and they are relatively concentrated. Therefore, it is determined that there is a foreign object and an anti-pinch warning operation is required, such as terminating the adjustment operation of the electric adjustable leg rest, or controlling the electric adjustable leg rest to adjust the preset angle in the opposite direction. When the number is less than the preset value, it indicates that a certain sensor may have a large detection error, resulting in an abnormal distance value. At this time, it can be determined that there is no foreign object at present and no anti-pinch warning operation is required, thereby achieving the technical effect of timely detecting foreign objects and performing anti-pinch warning operations when there are foreign objects between the fixed end of the sofa and the electric adjustable leg rest, thereby ensuring the safety of using electric sofas.

[0054] The anti-pinch warning method provided in the embodiment of the present application determines the distance between each sensing point of the sensor module and the sensor module to obtain 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 set at the fixed end or the mobile end, and M and N are positive integers; the running state value of the mobile end is obtained, and a target template matrix is ​​determined according to the running state value, wherein the target template matrix is ​​calculated from multiple historical distance matrices within the running state interval to which the running state value belongs, and each historical distance matrix is ​​composed of M×N historical distance values, and each historical distance value is each sensor in the sensor module. The historical distance between the deployment location of the sensor and the location of the mobile terminal; the target distance matrix and the target template matrix are differentially calculated according to preset rules 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 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 the number of Q elements, and whether there is a foreign object between the mobile terminal and the fixed terminal is determined according to the number of Q elements, and the anti-pinch warning result is determined according to the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile terminal and the fixed terminal. The problem in the related art that the anti-pinch operation can only be started after the mobile terminal of the target device is detected to be in contact with a foreign object, resulting in a high risk of the user being pinched, is solved. 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 status value of the mobile end, the target distance matrix and the target template matrix are compared to obtain the target difference matrix. Then, the number of element values ​​that differ 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 matrix. The number is used to determine whether to activate the anti-pinch warning, thereby achieving the effect of activating the anti-pinch warning without pinching any foreign objects.

[0055] Optionally, in the anti-pinch warning method provided in the embodiment of the present application, the distance between each sensing point of the sensor module and the sensor module is determined to obtain M×N distance values, and a target distance matrix is ​​constructed from the M×N distance values, including: receiving an initial distance matrix collected by the sensor module, wherein the initial distance matrix is ​​used to characterize the measured distance between the fixed end and the mobile end; obtaining a state matrix of the sensor module, and obtaining 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 a target distance matrix.

[0056] It should be noted that when obtaining the target distance matrix, the sensor module may have various problems, resulting in inaccurate distance matrix collected by the sensor module. Therefore, it is necessary to process the initial distance matrix collected by the sensor module to obtain a more accurate target distance matrix.

[0057] Specifically, the initial distance matrix collected by the receiving sensor module can be shown as matrix (4):

[0058] (4)

[0059] Among them, there are multiple abnormal values, such as N. At this time, it is necessary to change the initial distance matrix according to the state matrix of the sensor module to remove the abnormal values. It should be noted that the state matrix can represent the operating state of each sensor in the sensor module. The state matrix can be shown as matrix (5):

[0060] (5)

[0061] Among them, 5 is the normal operation status code, 6 and 9 can be error status codes, and 255 is an abnormal value. Through the status matrix, it is possible 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, it can be changed according to the matrix change rules. When determining the matrix change rules, it is necessary to determine the operating status value of the mobile terminal at the current moment, and determine the safety distance based on the operating status value, and then change the abnormal data in the initial distance matrix to the safety distance value, thereby completing the preliminary change to the initial distance matrix.

[0063] For example, when the safety distance is 4, the above matrix 4 can be changed to:

[0064] (6)

[0065] Furthermore, in order to ensure the simplicity of the matrix, the values ​​in matrix (6) that are greater than the safety distance can be changed to the safety distance value, thereby obtaining matrix (7):

[0066] (7)

[0067] Then, the 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.

[0068] This embodiment achieves the technical effect of improving the accuracy of the distance matrix by changing the initial distance matrix collected by the sensor module.

[0069] Optionally, in the anti-pinch warning method provided in the embodiment of the present application, a matrix change rule is determined according to the operating status value, and the initial distance matrix is ​​changed according to the matrix change rule and the state matrix to obtain the target distance matrix, including: obtaining a first preset comparison table, and obtaining the safety distance value corresponding to the operating status value in the first preset comparison table to obtain the target safety distance value, wherein the first preset comparison table includes multiple operating status value intervals and the safety distance value corresponding to each operating status value interval, and the safety distance value is the safety distance between the fixed end and the mobile end; identifying the first position of the abnormal element value in the state matrix, and changing the 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 the 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.

[0070] It should be noted that when determining the matrix change rule, since the matrix change rule is to change the value greater than the safety distance in the initial distance matrix to the safety distance value, it is necessary to first determine the current safety distance value based on the operating status value of the mobile terminal at the current moment, and then change the initial distance matrix according to the safety distance value.

[0071] Specifically, when determining the safety distance value, a first preset comparison table can be obtained. Since the first preset comparison table contains multiple operating state value intervals and the safety distance value corresponding to each operating state value interval, the interval in which the operating state value at the current moment is located can be determined first, and the safety distance value corresponding to the interval is determined as the target safety distance value. Table 1 is an optional first preset comparison table. As shown in Table 1, when the operating state value is 22, the interval located at [21, 50] can be determined. At this time, the target safety distance can be determined to be 4.

[0072] Table 1

[0073]

[0074] Furthermore, after obtaining the target safety distance, it is necessary to determine which distance values ​​in the initial distance matrix need to be changed. This can be determined in two ways. One is to determine through the state matrix, that is, identify the first position of the abnormal element value in the state matrix, and change the distance value at the first position in the initial distance matrix to the target safety distance value, thereby changing the distance value of the abnormal state to the safety distance value. The other is to change the distance value greater than the safety distance value to the safety distance value, so as to avoid excessive difference due to excessive distance during subsequent differential calculations, thereby misjudging the presence of foreign matter.

[0075] This embodiment achieves the technical effect of improving the accuracy of the target distance matrix by setting a matrix change rule and changing the initial distance matrix according to the matrix change rule, thereby improving the accuracy of subsequent foreign body judgment.

[0076] Optionally, in the anti-pinch warning method provided in the embodiment of the present application, obtaining the running status value of the mobile terminal, and determining the target template matrix based on the running status value includes: obtaining the posture data of the mobile terminal, and determining the running status value based on the posture data; obtaining a first preset comparison table, and obtaining the running status value interval to which the running status value belongs in the first preset comparison table, wherein the first preset comparison table includes multiple running status value intervals and a safety distance value corresponding to each running status value interval; determining the template matrix corresponding to the running status value interval as the target template matrix.

[0077] Specifically, when determining the target template matrix, since each safety distance corresponds to a target template matrix, it is still necessary to obtain the first preset comparison table, and obtain the running status value interval to which the running status value belongs in the first preset comparison table, so as to determine the template matrix corresponding to the running status value interval as the target template matrix.

[0078] It should be noted that when determining the running status value, it can be determined based on the posture data of the mobile terminal, wherein the posture data can be the angle at which the mobile terminal is raised. For example, if the angle at which the mobile terminal is raised is 25 degrees at the current moment, then the running status value is 25.

[0079] This embodiment achieves the goal of accurately acquiring the target template matrix of the mobile terminal in different positions by determining the relationship between the running state value and the template matrix, thereby improving the accuracy of subsequent foreign object recognition.

[0080] Optionally, in the anti-pinch warning method provided in the embodiment of the present application, the target distance matrix and the target template matrix are differentially calculated according to preset rules to obtain a target difference matrix, including: subtracting the distance values ​​at the same position in the target template matrix and the target distance matrix to obtain an initial difference matrix; judging in turn whether each difference is greater than or equal to a preset threshold; when the target difference is greater than or equal to the preset threshold, changing the target difference in the initial difference matrix to a first preset value to obtain an updated initial difference matrix; when the target difference is less than the preset threshold, changing the target difference 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 in the initial difference matrix, determining the updated initial difference matrix as the target difference matrix.

[0081] Specifically, when performing differential calculation on the target distance matrix and the target template matrix, it is first necessary to subtract the target template matrix from the target distance matrix to obtain an initial difference matrix, and then determine whether each difference in the initial difference matrix is ​​greater than or equal to a preset threshold, and determine the difference greater than or equal to the preset threshold as the first preset value, and determine the difference less than the preset threshold as the second preset value, thereby dividing the differences in the initial difference matrix into two types, and then obtaining the target difference matrix.

[0082] 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):

[0083] (8) (9)

[0084] After subtraction, we get:

[0085] (10)

[0086] When the preset threshold is 2, the target difference matrix obtained after processing matrix (10) is shown in matrix (11): (11)

[0087] Thereby, a processed target difference matrix is ​​obtained, thereby improving the efficiency of subsequent determination of the connectivity of elements in the matrix.

[0088] Optionally, in the anti-pinch warning method provided in the embodiment of the present application, 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 sets of matrix element values, including: determining the position information of each first preset value in the target difference matrix to obtain multiple position information, wherein the target difference matrix contains a first preset value and a second preset value, and the first preset value is greater than the second preset value; grouping the first preset values ​​with adjacent position information into a group to obtain multiple groups of first preset values; adding a group of first preset values ​​with repeated position information to the same set of matrix element values ​​to obtain Q sets of matrix element values.

[0089] It should be noted that when grouping is performed according to connectivity, only the first preset value is grouped, that is, only 1 is grouped, and the second preset value is not grouped.

[0090] Specifically, when grouping matrix element values, it is necessary to determine the position information of each first preset value in the target difference matrix, and group adjacent first preset values ​​into a group, wherein, in the case where there are no adjacent first preset values, the first preset values ​​themselves are grouped into a group, thereby obtaining multiple groups of first preset values, and further adding a group of first preset values ​​with repeated position information to the same matrix element value set, that is, adding interconnected first preset values ​​to a matrix element value set, thereby obtaining multiple matrix element value sets, wherein each matrix element value set contains at least one first preset value.

[0091] For example, as shown in matrix (11), the position information of each first preset value is obtained, and four position information are obtained, namely (3, 6), (7, 4), (8, 4), and (8, 5). Adjacent first preset values ​​are grouped together to obtain three groups of first preset values, namely: (3, 6), ((7, 4), (8, 4)), ((8, 4), (8, 5)). First preset values ​​with the same position information are grouped together to obtain two sets of matrix element values, namely: (3, 6), ((7, 4), (8, 4), and (8, 5)).

[0092] Optionally, in the anti-pinch warning method provided in the embodiment of the present application, whether there is a foreign object between the mobile end and the fixed end is determined based on the number of Q elements, and the anti-pinch warning result is determined based on the existence state of the foreign object, including: when 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 an anti-pinch warning information and starting an anti-pinch operation; when 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 an anti-pinch warning information.

[0093] Specifically, after obtaining multiple matrix element value sets, the number of elements in each matrix element value set can be determined, and it can be judged whether the number of elements is greater than a preset value. When the number of elements is greater than or equal to the preset value, it indicates that there are many points with abnormal distances, and they are more concentrated. Therefore, it is judged that there is a foreign object at present, and an anti-pinch warning operation is required. When the number of elements in all matrix element value sets is less than the preset value, it indicates that a certain sensor may have a large detection error, resulting in an abnormal distance value. At this time, it can be judged that there is no foreign object at present, and there is no need to perform an anti-pinch warning operation, thereby achieving the technical effect of timely detecting foreign objects and performing anti-pinch warning operations when there are foreign objects between the fixed end of the sofa and the electrically adjustable leg rest, thereby ensuring the safety of using electric sofas.

[0094] For example, when the preset value is 2, the number of elements in each matrix element value set can be obtained. When a certain matrix element value set contains 3 element values, it is determined that a foreign object exists and the movement of the electric leg rest needs to be stopped. When the number of element values ​​in all matrix element value sets is 1 or 0, it indicates that there is no foreign object, and the electric adjustable leg rest continues to perform the adjustment operation until a foreign object is detected or the predetermined adjustment position is reached.

[0095] The present application determines whether there is a foreign object by setting a preset value, thereby achieving the technical effect of reducing the misjudgment rate of foreign objects.

[0096] Optionally, in the anti-pinch warning method provided in the embodiment of the present application, the target template matrix is ​​obtained in the following manner: determine the operating status interval to which the operating status value belongs, and obtain multiple historical distance matrices located in the operating status interval; merge the multiple historical distance matrices according to a preset merging rule to obtain a candidate distance matrix, wherein the merging rule is: for element values ​​at the same position in the matrix, determine the smallest element value in the multiple historical distance matrices as the element value in the candidate distance matrix; perform a minimum pooling operation on the candidate distance matrix to obtain the target template matrix.

[0097] Specifically, when generating the target template matrix, since each operating state interval corresponds to a template matrix, it is necessary to first determine the number of operating state intervals, and then determine the number of template matrices according to the number of operating state intervals. In the case where the operating state intervals are as shown in Table 1, the number of operating state intervals is 4, namely, [0,20], [21,50], [51,100], and [101,max]. At this time, it is necessary to set the template matrix corresponding to each interval, and obtain 4 template matrices.

[0098] Furthermore, after determining the operating status interval, multiple historical distance matrices measured in each operating status interval when it is determined that there are no foreign objects can be obtained, and the multiple historical distance matrices in the same operating status interval can be merged and minimum pooled to obtain a target template matrix. By merging and minimum pooling the matrices, the distance values ​​in the matrices can be changed to the minimum value, thereby improving the accuracy of foreign object detection when comparing.

[0099] For example, when obtaining the template matrix with the running state interval of [21,50], the distance matrix with the trip numbers of 22 and 38 can be obtained, as shown in Matrix (12) and Matrix (13):

[0100] Trip number: 22:

[0101] (12)

[0102] Trip number: 38:

[0103] (13)

[0104] Furthermore, the above two matrices are merged, and the merging rule is shown in formula (14):

[0105] (14)

[0106] in, is the matrix element value of the i-th row and j-th column in the template matrix of the k-th operating state interval, is the matrix element value of the i-th row and j-th column in the p-th history matrix in the k-th operating state interval. Through the above formula 14, the minimum matrix element value at each position in each history matrix in each operating state interval can be selected, and the candidate distance matrix of the operating state interval is composed of multiple minimum matrix element values, as shown in matrix (15). (15)

[0107] Furthermore, after obtaining the candidate distance matrix, the minimum pooling method can be used. The convolution kernel parameter can be 3×3 and the stride can be 1. After convolution with the 8×8 candidate distance matrix, the output matrix is ​​still 8×8, thereby obtaining the convolved target template matrix, thereby improving the robustness of the template matrix. The target template matrix is ​​shown in matrix (16).

[0108] (16)

[0109] In this embodiment, the template matrix in each operating state interval is accurately obtained, thereby ensuring the accuracy of the subsequent comparison results between the target distance matrix and the target template matrix.

[0110] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0111] The embodiment of the present application also provides an anti-pinch warning device. It should be noted that the anti-pinch warning device of the embodiment of the present application can be used to execute the anti-pinch warning method provided in the embodiment of the present application. The anti-pinch warning device provided in the embodiment of the present application is introduced below.

[0112] Figure 3 Schematic diagram of an anti-pinch warning device provided according to an embodiment of the present application. Figure 3As shown, the device includes: a first determining unit 31, a second determining unit 32, a calculating unit 33, and a third determining unit 34.

[0113] The first determination unit 31 is used to determine the distance between each sensing point of the sensor module and the sensor module, obtain M×N distance values, and construct a target distance matrix by 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 set at the fixed end or the mobile end, and M and N are positive integers.

[0114] The second determination unit 32 is used to obtain the running status value of the mobile terminal and determine the target template matrix according to the running status value, wherein the target template matrix is ​​calculated by multiple historical distance matrices within the running status interval to which the running status 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 location of the mobile terminal.

[0115] The calculation unit 33 is used to perform differential calculation on the target distance matrix and the target template matrix according to preset rules to obtain a target difference matrix, and group 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 sets of matrix element values, wherein the target difference matrix consists of M×N matrix element values, and Q is a positive integer.

[0116] The third determination unit 34 is used to determine the number of elements in each matrix element value set to obtain Q elements, and determine whether there is a foreign object between the mobile end and the fixed end based on the Q elements, and determine the anti-pinch warning result based on the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile end and the fixed end.

[0117] The anti-pinch warning device provided in the embodiment of the present application determines the distance between each sensing point of the sensor module and the sensor module through 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 at the fixed end or the mobile end, and 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 multiple historical distance matrices within 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 each in the sensor module. The historical distance between the deployment location of the sensor and the location of the mobile terminal; the calculation unit 33 performs differential calculation on the target distance matrix and the target template matrix according to preset rules to obtain a target difference matrix, and groups 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 consists 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 to obtain Q elements, and determines whether there is a foreign object between the mobile terminal and the fixed terminal based on the Q elements, and determines the anti-pinch warning result based on the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile terminal and the fixed terminal. The problem in the related art that the anti-pinch operation can only be started after detecting that the mobile end of the target device contacts a foreign object, resulting in a high risk of users being pinched, is solved. 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 status value of the mobile end, the target distance matrix and the target template matrix are compared to obtain a target difference matrix, and then the number of element values ​​that differ 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 matrix, and whether to start the anti-pinch warning is determined based on the number, thereby achieving the effect of starting the anti-pinch warning when no foreign object is pinched.

[0118] Optionally, in the anti-pinch warning device provided in the embodiment of the present application, the first determination unit 31 includes: a receiving module, used to receive an initial distance matrix collected by the sensor module, wherein the initial distance matrix is ​​used to characterize the measured distance between the fixed end and the mobile end; a first acquisition module, used to obtain the state matrix of the sensor module, and obtain the operating state value of the mobile end, determine the matrix change rule according to the operating state value, and change the initial distance matrix according to the matrix change rule and the state matrix to obtain the target distance matrix.

[0119] Optionally, in the anti-pinch warning device provided in the embodiment of the present application, the first acquisition module includes: an acquisition submodule, used to obtain a first preset comparison table, and obtain the safety distance value corresponding to the operating status value in the first preset comparison table to obtain a target safety distance value, wherein the first preset comparison table includes multiple operating status value intervals and the safety distance value corresponding to each operating status value interval, and the safety distance value is the safety distance between the fixed end and the mobile end; an identification submodule, used to identify the first position of the abnormal element value in the state matrix, and change the distance value located at the first position in the initial distance matrix to the target safety distance value to obtain an updated initial distance matrix; a change submodule, used to change the 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.

[0120] Optionally, in the anti-pinch warning device provided in the embodiment of the present application, the second determination unit 32 includes: a second acquisition module, used to obtain the posture data of the mobile terminal, and determine the operating status value based on the posture data; a third acquisition module, used to obtain the first preset comparison table, and obtain the operating status value interval to which the operating status value belongs in the first preset comparison table, wherein the first preset comparison table includes multiple operating status value intervals and the safety distance value corresponding to each operating status value interval; a first determination module, used to determine the template matrix corresponding to the operating status value interval as the target template matrix.

[0121] Optionally, in the anti-pinch warning device provided in the embodiment of the present application, the calculation unit 33 includes: a calculation module, which is used to subtract the distance values ​​at the same position in the target template matrix and the target distance matrix to obtain an initial difference matrix; a judgment module, which is used to judge in turn whether each difference is greater than or equal to a preset threshold; a first change module, which is used to change the target difference in the initial difference matrix to a first preset value when the target difference is greater than or equal to the preset threshold, to obtain an updated initial difference matrix; a second change module, which is used to change the target difference in the initial difference matrix to a second preset value when the target difference is less than the preset threshold, to obtain an updated initial difference matrix, wherein the first preset value is greater than the second preset value; a second determination module, which is used to determine the updated initial difference matrix as the target difference matrix after changing each difference in the initial difference matrix.

[0122] Optionally, in the anti-pinch warning device provided in the embodiment of the present application, the calculation unit 33 includes: a third determination module, used to determine the position information of each first preset value in the target difference matrix, and obtain multiple position information, wherein the target difference matrix contains the first preset value and the second preset value, and the first preset value is greater than the second preset value; a grouping module, used to group the first preset values ​​with adjacent position information into a group, and obtain multiple groups of first preset values; an adding module, used to add a group of first preset values ​​with repeated position information to the same matrix element value set, and obtain Q matrix element value sets.

[0123] Optionally, in the anti-pinch warning device provided in the embodiment of the present application, the third determination unit 34 includes: a fourth determination module, which is used to determine that there is a foreign object between the mobile end and the fixed end when the number of elements is greater than or equal to a number threshold, and determine the anti-pinch warning result as issuing an anti-pinch warning message and starting an anti-pinch operation; a fifth determination module, which is used to determine that there is no foreign object between the mobile end and the fixed end when the number of elements is less than a number threshold, and determine the anti-pinch warning result as not issuing an anti-pinch warning message.

[0124] Optionally, in the anti-pinch warning device provided in the embodiment of the present application, the target template matrix is ​​obtained in the following manner: a fourth determination unit is used to determine the operating state interval to which the operating state value belongs, and obtain multiple historical distance matrices located in the operating state interval; a merging unit is used to merge multiple historical distance matrices according to a preset merging rule to obtain a candidate distance matrix, wherein the merging rule is: for element values ​​at the same position in the matrix, the smallest element value in the multiple historical distance matrices is determined as the element value in the candidate distance matrix; a processing unit is used to perform a minimum pooling operation on the candidate distance matrix to obtain the target template matrix.

[0125] The anti-pinch warning device comprises a processor and a memory, and the first determination unit 31, the second determination unit 32, the calculation unit 33, the third determination unit 34, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.

[0126] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the problem in the related art that the anti-pinch operation can only be started after the mobile terminal of the target device is detected to be in contact with a foreign object, resulting in a higher risk of the user being pinched is solved.

[0127] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0128] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the anti-pinch warning method is implemented.

[0129] An embodiment of the present invention provides a processor, which is used to run a program, wherein the anti-pinch warning method is executed when the program is running.

[0130] Figure 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application, such as Figure 4 As shown, an embodiment of the present invention provides an electronic device, the electronic device 40 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the steps of the above anti-pinch warning method when executing the program. The device in this article can be a server, a PC, a mobile phone, etc.

[0131] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the steps of the above anti-pinch warning method.

[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt 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 codes.

[0133] The present application is described with reference to the 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 process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0136] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0137] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0138] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0139] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0140] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A pinch prevention warning method, characterized in that: Applied to a target device, the target device includes a fixed terminal and a mobile terminal, and the method includes: Determine the distance between each sensing point of the sensor module and the sensor module to obtain M×N distance values, and construct a target distance matrix by 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 at the fixed end or the mobile end, and M and N are positive integers; Acquire the running state value of the mobile terminal, and determine a target template matrix according to the running state value, wherein the target template matrix is ​​calculated by a plurality of historical distance matrices within 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 a historical distance between a deployment position of each sensor in the sensor module and a location of the mobile terminal; The target distance matrix and the target template matrix are differentially calculated 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 sets of matrix element values, wherein the target difference matrix consists of M×N matrix element values, and Q is a positive integer; Determine the number of elements in each matrix element value set to obtain Q elements, and determine whether there is a foreign object between the mobile end and the fixed end based on the Q elements, and determine the anti-pinch warning result based on the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile end and the fixed end.

2. The method according to claim 1, characterized in that Determining the distance between each sensing point of the sensor module and the sensor module to obtain M×N distance values, and constructing a target distance matrix from the M×N distance values ​​includes: 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; The state matrix of the sensor module is obtained, and the operating state value of the mobile terminal is obtained, a matrix change rule is determined according to the operating 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.

3. The method according to claim 2, characterized in that 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 includes: Obtain a first preset comparison table, and obtain the safety distance value corresponding to the operating state value in the first preset comparison table to obtain a target safety distance value, wherein the first preset comparison table includes multiple operating state value intervals and the safety distance value corresponding to each operating state value interval, and the safety distance value is the 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 the distance value at the first position in the initial distance matrix to the target safety distance value to obtain an updated initial distance matrix; The distance values ​​in the updated initial distance matrix that are greater than the target safety distance value are changed to the target safety distance value to obtain the target distance matrix.

4. The method according to claim 1, characterized in that: Acquiring the running state value of the mobile terminal and determining the target template matrix according to the running state value includes: Acquire the posture data of the mobile terminal, and determine the running state value according to the posture data; Obtain a first preset comparison table, and obtain the operating status value interval to which the operating status value belongs in the first preset comparison table, wherein the first preset comparison table includes multiple operating status value intervals and a safety distance value corresponding to each operating status value interval; The template matrix corresponding to the running status value interval is determined as the target template matrix.

5. The method according to claim 1, characterized in that: The target distance matrix and the target template matrix are differentially calculated according to preset rules to obtain a target difference matrix including: Subtract the distance values ​​at the same position in the target template matrix and the target distance matrix to obtain an initial difference matrix; Determine in turn whether each difference is greater than or equal to a preset threshold; When the target difference is greater than the preset threshold, the target difference in the initial difference matrix is ​​changed to a first preset value to obtain an updated initial difference matrix; When the target difference is less than the preset threshold, the target difference in the initial difference matrix is ​​changed 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 each difference in the initial difference matrix is ​​changed, the updated initial difference matrix is ​​determined as the target difference matrix.

6. The method according to claim 1, characterized in that 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, and the obtained Q matrix element value sets include: Determine 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 includes the first preset value and the second preset value, and the first preset value is greater than the second preset value; Grouping the adjacent first preset values ​​of the position information into one group to obtain multiple groups of first preset values; A group of first preset values ​​with repeated position information is added to the same matrix element value set to obtain the Q matrix element value sets.

7. The method according to claim 1, characterized in that Determining whether there is a foreign object between the mobile terminal and the fixed terminal according to the number of Q elements, and determining an anti-pinch warning result according to the existence state of the foreign object includes: When the number of the 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 an anti-pinch warning message and starting an anti-pinch operation; When the number of elements is less than the number threshold, it is determined that there is no foreign matter between the mobile end and the fixed end, and the anti-pinch warning result is determined as not issuing an anti-pinch warning message.

8. The method according to claim 1, characterized in that The target template matrix is ​​obtained in the following way: Determine the operating state interval to which the operating state value belongs, and obtain a plurality of historical distance matrices located in the operating state interval; The multiple historical distance matrices are merged according to a preset merging rule to obtain a candidate distance matrix, wherein the merging rule is: for element values ​​at the same position in the matrix, the smallest element value in the multiple historical distance matrices is determined as the element value in the candidate distance matrix; A minimum pooling operation is performed on the candidate distance matrix to obtain the target template matrix.

9. An anti-pinch warning device, characterized in that: Applied to a target device, the target device includes a fixed terminal and a mobile terminal, and the apparatus includes: A first determination unit is used to determine the distance between each sensing point of the sensor module and the sensor module to obtain M×N distance values, and to construct a target distance matrix by 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 at the fixed end or the mobile end, and M and N are positive integers; a second determination unit, configured to obtain an operation status value of the mobile terminal, and determine a target template matrix according to the operation status value, wherein the target template matrix is ​​calculated by a plurality of historical distance matrices within an operation status interval to which the operation status value belongs, each historical distance matrix being composed of M×N historical distance values, and each historical distance value being a historical distance between a deployment position of each sensor in the sensor module and a location of the mobile terminal; A calculation unit, configured to perform a difference calculation on the target distance matrix and the target template matrix according to a preset rule to obtain a target difference matrix, and group 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 sets of matrix element values, wherein the target difference matrix consists of M×N matrix element values, and Q is a positive integer; The third determination unit is used to determine the number of elements in each matrix element value set to obtain Q elements, and determine whether there is a foreign object between the mobile end and the fixed end according to the Q elements, and determine the anti-pinch warning result according to the existence state of the foreign object, wherein the anti-pinch warning result is used to prevent the foreign object from being clamped by the mobile end and the fixed end.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the anti-pinch warning method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Equipment state monitoring method and device, equipment and storage medium

    CN116086537A

  • Anomaly detection in multidimensional sensor data

    US20220067020A1

  • KR20230013818A