Object surface flatness judgment method and device, equipment and medium

By performing noise reduction and convolution operations on the object surface pressure signal, extracting feature vectors and inputting them into the machine learning model, the problem of low efficiency in judging the flatness of the object surface in the existing technology is solved, and a more efficient flatness judgment is achieved.

CN119354131APending Publication Date: 2025-01-24CISDI RES & DEV CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411502808.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the prior art, when judging the flatness of the surface of an object, the calculation amount of signal analysis is large, resulting in low efficiency.

Method used

By controlling the tactile sensor to slide on the surface of the object, it detects the pressure signal, performs signal processing, including noise reduction and convolution operations, extracts the target feature vector, and inputs it into a binary machine learning model to determine flatness.

Benefits of technology

The amount of data of analysis is reduced, and the efficiency of judgment is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119354131A_ABST
    Figure CN119354131A_ABST
Patent Text Reader

Abstract

The invention provides an object surface flatness judgment method and device, equipment and a medium, and the method comprises the steps: controlling a touch sensor to slide on the surface of a to-be-detected object according to a preset track, detecting a pressure signal of a contact surface of the surface of the to-be-detected object and the touch sensor according to a preset frequency; receiving each pressure signal sent by the touch sensor; performing signal processing on each pressure signal to obtain a target feature vector of each pressure signal, the signal processing including feature vector extraction processing based on convolution operation; and inputting the target feature vector into a preset dichotomy machine learning model to obtain information about whether the surface of the to-be-measured object is flat or not. According to the invention, the target feature vector is input into the preset dichotomy machine learning model, and the information of whether the surface of the to-be-detected object is flat is determined based on the target feature vector, so that the efficiency of judging flatness is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of automation technology, and in particular relates to a method, device, equipment and medium for judging the flatness of an object surface. Background Art

[0002] The machine tactile perception method is a perception method that uses a tactile sensor to contact an object, obtain and analyze the pressure and temperature of the contact surface, and judge the physical information such as the texture, material and roughness of the object's surface. In the related technology of automatic surface flatness judgment, after the pressure signal on the surface of the object is collected by the tactile sensor, a large number of pressure signals (the number of pressure signals is positively correlated with the surface area of ​​the object, and the number may reach thousands) are usually directly analyzed using a machine learning model to obtain the flatness information of the object's surface. However, directly analyzing a large number of pressure signals will result in a large amount of signal analysis calculations, resulting in low efficiency in judging flatness. Summary of the invention

[0003] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method, device, equipment and medium for determining the flatness of an object surface, so as to solve the above-mentioned problems.

[0004] The method for determining the flatness of an object surface provided by the present invention comprises:

[0005] Controlling the tactile sensor to slide on the surface of the object to be tested according to a preset trajectory, wherein the tactile sensor is used to detect a pressure signal of a contact surface between the surface of the object to be tested and the tactile sensor according to a preset frequency during the sliding process;

[0006] receiving each pressure signal sent by the tactile sensor;

[0007] Performing signal processing on each of the pressure signals to obtain a target feature vector of each of the pressure signals, wherein the signal processing includes performing feature vector extraction processing based on a convolution operation;

[0008] The target feature vector is input into a preset binary classification machine learning model to obtain information on whether the surface of the object to be tested is flat.

[0009] In one embodiment of the present invention, the signal processing further includes noise reduction processing, and the signal processing of each pressure signal includes:

[0010] Performing noise reduction processing on each of the pressure signals;

[0011] Based on the convolution operation, feature vector extraction is performed on each of the pressure signals after the noise reduction process.

[0012] In one embodiment of the present invention, the signal processing further includes normalization processing, and after performing feature vector extraction processing on each of the pressure signals after noise reduction processing based on the convolution operation, the method further includes:

[0013] The extracted feature vectors are normalized to obtain target feature vectors of the pressure signals.

[0014] In one embodiment of the present invention, the noise reduction process on each of the pressure signals includes:

[0015] Inputting a preset white noise signal and a first pressure signal into a parameter-adjustable digital filter, obtaining a first fitting noise signal output by the parameter-adjustable digital filter with the goal of minimizing the mean square value of an error signal, wherein the error signal is a difference between the first pressure signal and the first fitting noise signal, and the first fitting noise signal is used to fit the noise signal in the first pressure signal, and the first pressure signal is any one of the pressure signals;

[0016] The first pressure signal after noise reduction is determined based on the first fitting signal and the first pressure signal.

[0017] In one embodiment of the present invention, the preset sliding trajectory of the tactile sensor matches the sliding trajectory of the convolution operation, and the receiving of each pressure signal sent by the tactile sensor includes:

[0018] Receiving each pressure signal sent by the tactile sensor, and detection time information and spatial distribution information corresponding to each pressure signal;

[0019] The signal processing of each of the pressure signals further includes:

[0020] Determine a two-dimensional pressure signal matrix, wherein the two-dimensional pressure signal matrix includes the pressure signals after noise reduction processing, and the positions of the pressure signals after noise reduction processing in the two-dimensional pressure signal matrix are determined according to the detection time information and spatial distribution information respectively corresponding to the pressure signals;

[0021] The process of performing feature vector extraction on each of the pressure signals after noise reduction based on the convolution operation includes:

[0022] The two-dimensional pressure signal matrix is ​​subjected to feature vector extraction processing based on a convolution operation.

[0023] In one embodiment of the present invention, the feature vector extraction process is performed on the two-dimensional pressure signal matrix based on the convolution operation, including:

[0024] Performing a convolution operation on the two-dimensional pressure signal matrix according to a preset convolution kernel and a specific step size;

[0025] Among them, the number of rows and columns of the preset convolution kernel are both three, and the three rows of parameters in each column of the convolution kernel are the same, the parameter of the third column is a positive number, the parameter of the first column and the parameter of the third column are opposite numbers, and the parameters of the second column are all zero.

[0026] In one embodiment of the present invention, the preset binary classification machine learning model is determined by the following steps:

[0027] Determine a training set and a test set, wherein each training sample in the training set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, the label corresponding to the feature vector is used to characterize whether the surface of the object corresponding to the feature vector is flat, and each test sample in the test set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, and the training samples in the training set are different from the test samples in the test set;

[0028] Performing machine training on the binary classification machine learning model based on the training set to obtain a binary classification machine learning model to be tested;

[0029] The binary classification machine learning model to be tested is parameterized based on the test set to obtain the preset binary classification machine learning model.

[0030] The device for determining the flatness of an object surface provided by the present invention comprises:

[0031] A control module, used to control the tactile sensor to slide on the surface of the object to be tested according to a preset trajectory, wherein the tactile sensor is used to detect a pressure signal of a contact surface between the surface of the object to be tested and the tactile sensor according to a preset frequency during the sliding process;

[0032] A receiving module, used for receiving various pressure signals sent by the tactile sensor;

[0033] A signal processing module, used for performing signal processing on each of the pressure signals to obtain a target feature vector of each of the pressure signals, wherein the signal processing includes performing feature vector extraction processing based on a convolution operation;

[0034] The determination module is used to input the target feature vector into a preset binary classification machine learning model to obtain information on whether the surface of the object to be tested is flat.

[0035] In one embodiment of the present invention, the signal processing further includes noise reduction processing, and the signal processing module includes:

[0036] A noise reduction processing unit, used for performing noise reduction processing on each pressure signal;

[0037] The feature vector extraction unit is used to perform feature vector extraction processing on each pressure signal after noise reduction processing based on a convolution operation.

[0038] In one embodiment of the present invention, the signal processing further includes normalization processing, and the signal processing module specifically includes:

[0039] The normalization processing unit is used to perform normalization processing on the extracted feature vectors to obtain target feature vectors of each pressure signal.

[0040] In one embodiment of the present invention, the noise reduction processing unit is specifically used for:

[0041] Inputting a preset white noise signal and a first pressure signal into a parameter-adjustable digital filter, obtaining a first fitting noise signal output by the parameter-adjustable digital filter with the goal of minimizing the mean square value of an error signal, wherein the error signal is a difference between the first pressure signal and the first fitting noise signal, and the first fitting noise signal is used to fit the noise signal in the first pressure signal, and the first pressure signal is any one of the pressure signals;

[0042] The first pressure signal after noise reduction is determined based on the first fitting signal and the first pressure signal.

[0043] In one embodiment of the present invention, the preset sliding trajectory of the tactile sensor matches the sliding trajectory of the convolution operation, and the receiving module is specifically used for:

[0044] Receiving each pressure signal sent by the tactile sensor, and detection time information and spatial distribution information corresponding to each pressure signal;

[0045] The signal processing module is further specifically used for:

[0046] Determine a two-dimensional pressure signal matrix, wherein the two-dimensional pressure signal matrix includes the pressure signals after noise reduction processing, and the positions of the pressure signals after noise reduction processing in the two-dimensional pressure signal matrix are determined according to the detection time information and spatial distribution information respectively corresponding to the pressure signals;

[0047] The feature vector extraction unit is specifically used to perform feature vector extraction processing on the two-dimensional pressure signal matrix based on a convolution operation.

[0048] In one embodiment of the present invention, the feature vector extraction unit is specifically used for:

[0049] Performing a convolution operation on the two-dimensional pressure signal matrix according to a preset convolution kernel and a specific step size;

[0050] Among them, the number of rows and columns of the preset convolution kernel are both three, and the three rows of parameters in each column of the convolution kernel are the same, the parameter of the third column is a positive number, the parameter of the first column and the parameter of the third column are opposite numbers, and the parameters of the second column are all zero.

[0051] In one embodiment of the present invention, the preset binary classification machine learning model is determined by the following steps:

[0052] Determine a training set and a test set, wherein each training sample in the training set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, the label corresponding to the feature vector is used to characterize whether the surface of the object corresponding to the feature vector is flat, and each test sample in the test set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, and the training samples in the training set are different from the test samples in the test set;

[0053] Performing machine training on the binary classification machine learning model based on the training set to obtain a binary classification machine learning model to be tested;

[0054] The binary classification machine learning model to be tested is parameterized based on the test set to obtain the preset binary classification machine learning model.

[0055] The electronic device provided by the present invention comprises:

[0056] one or more processors;

[0057] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the electronic device implements the method for determining the flatness of the surface of an object.

[0058] The computer-readable storage medium provided by the present invention stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer is enabled to execute the method for determining the flatness of the surface of an object.

[0059] Beneficial effects of the technical solution: In the technical solution, the pressure signals of each contact surface of the surface of the object to be measured are processed to obtain the target feature vectors of each pressure signal; by analyzing the target feature vectors, the amount of data analyzed can be reduced compared to analyzing the original pressure signals. Based on this, the technical solution inputs the target feature vectors into a preset binary classification machine learning model, and determines whether the surface of the object to be measured is flat based on the target feature vectors, which is conducive to improving the efficiency of judging flatness.

[0060] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0062] Figure 1 is a flow chart of a method for determining the flatness of an object surface shown in an exemplary embodiment of the present application;

[0063] Figure 2 is a block diagram of a device for determining the flatness of an object surface shown in an exemplary embodiment of the present application;

[0064] Figure 3 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0065] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0066] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0067] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0068] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for determining the flatness of an object surface, shown in an exemplary embodiment of the present application. Figure 1As shown, in an exemplary embodiment, the method at least includes steps S110 to S140, which are described in detail as follows:

[0069] Step S110, controlling the tactile sensor to slide on the surface of the object to be measured according to a preset trajectory, wherein the tactile sensor is used to detect a pressure signal of a contact surface between the surface of the object to be measured and the tactile sensor according to a preset frequency during the sliding process.

[0070] Step S120, receiving each pressure signal sent by the tactile sensor.

[0071] Step S130, performing signal processing on each of the pressure signals to obtain a target feature vector of each of the pressure signals, wherein the signal processing includes performing feature vector extraction processing based on a convolution operation.

[0072] Step S140: input the target feature vector into a preset binary classification machine learning model to obtain information on whether the surface of the object to be tested is flat.

[0073] The tactile sensor can sense the pressure information of the contact surface with the object and convert the pressure information into a pressure electrical signal (referred to as a pressure signal for short).

[0074] In the process of sliding on the surface of the object to be measured according to the preset trajectory, the tactile sensor contacts the surface of the object to be measured and has a certain degree of extrusion. In the sliding process of the tactile sensor, it is not necessary to apply pressure to the tactile sensor toward the surface of the object, or a constant pressure can always be applied to the tactile sensor to avoid interference with the flatness judgment of the surface of the object due to unstable pressure. The tactile sensor is used to detect the pressure signal of the contact surface between the surface of the object to be measured and the tactile sensor according to a preset frequency during the sliding process, and the amplitude change between each pressure signal reflects the ups and downs of the surface of the object to be measured. It is worth mentioning that in the sliding process of the tactile sensor, in order to achieve a more uniform distribution of the above-mentioned contact surface detected by the tactile sensor according to the preset frequency on the surface of the object, so that the distribution of each pressure signal in space is more uniform, the tactile sensor can be controlled to slide at a uniform speed according to the preset trajectory.

[0075] The process of processing the pressure signals includes extracting feature vectors based on convolution operation. The convolution operation uses a preset convolution kernel to perform convolution operation, and can extract feature vectors of the pressure signals. Based on the feature vectors, it can determine whether the surface of the object to be measured is flat.

[0076] It is worth mentioning that the above-mentioned preset binary classification machine learning model is obtained through training. In order to enable the model to more accurately output the flatness information of the surface of the object to be measured, the above-mentioned process of determining the target feature vector should be consistent with the process of determining the input data of the binary classification machine learning model during the training process, including the process of controlling the tactile sensor to obtain each pressure signal on the surface of the measured object (that is, the method of determining the preset trajectory is consistent, for example, the preset trajectory is set to be consistent with the sliding trajectory of the convolution operation), and also includes the signal processing process of each pressure signal, that is, the process of determining the input data (target feature vector) of the input binary classification machine model is consistent.

[0077] In order to more clearly understand the technical solution of the embodiments of the present application, the following is an exemplary description of how to determine the input data of the above-mentioned binary classification machine model (that is, how to determine the target feature vector).

[0078] In some embodiments, the feature vector of each pressure signal on the surface of the object can be directly extracted based on the convolution operation, and the feature vector can be used as input data of the binary classification machine model.

[0079] In other embodiments, in order to reduce the impact of noise signals in pressure signals, each pressure signal may be first subjected to denoising processing, and then feature vector extraction processing may be performed on each pressure signal after denoising based on a convolution operation, and the extracted feature vector may be used as input data for a binary classification machine model.

[0080] In other embodiments, in order to reduce the complexity of the input data of the binary classification machine model and realize the standardization of the input data, after extracting the feature vector of each pressure signal after the noise reduction processing based on the convolution operation, the feature vector can also be normalized, and the normalized feature vector is used as the input data of the binary classification machine model. The specific method of normalization processing can be to normalize the feature vector to a range of absolute value 1 according to the maximum and minimum values ​​of all feature vectors extracted by the convolution operation.

[0081] After determining the target feature vector through the above embodiment, the target feature vector is input into a preset binary classification machine learning model to obtain information on whether the surface of the object to be tested is flat, wherein the information on whether the surface is flat may include the probability that the surface of the object to be tested is flat or uneven.

[0082] In the industrial field, a large number of robots or intelligent devices have been applied to the work site. The most widely used perception method is machine vision. However, in special scenarios such as dark, narrow and unstructured environments, the use of machine vision is greatly limited, and it is difficult to quickly and accurately obtain the state information of the object being measured. In this application, on the one hand, machine touch is applied to the industrial field to complete the surface flatness recognition and judgment operations of objects, such as surface defect detection, assembly end face and height difference detection, etc., which can efficiently complete the surface flatness recognition and judgment operations in scenarios where machine vision is limited, and improve the robot's perception dimension and operation ability; on the other hand, this application extracts the target feature vector of each pressure signal, and inputs the target feature vector into a preset two-classification machine learning model to determine whether the surface of the object to be measured is flat according to the target feature vector, which is conducive to improving the efficiency of judging flatness.

[0083] In some embodiments, an adaptive filtering method may be used to perform noise reduction processing on the pressure signals to reduce noise interference in the tactile pressure signals. Hereinafter, a parameter-adjustable digital filter is used as an example to illustrate how to perform noise reduction processing.

[0084] The performing noise reduction processing on each of the pressure signals comprises:

[0085] Inputting a preset white noise signal and a first pressure signal into a parameter-adjustable digital filter, obtaining a first fitting noise signal output by the parameter-adjustable digital filter with the goal of minimizing the mean square value of an error signal, wherein the error signal is a difference between the first pressure signal and the first fitting noise signal, and the first fitting noise signal is used to fit the noise signal in the first pressure signal, and the first pressure signal is any one of the pressure signals;

[0086] Based on the first fitting signal and the first pressure signal, the first pressure signal after noise reduction processing is determined.

[0087] In the embodiment of the present application, the preset white noise signal S noise is an artificial signal, which includes a relatively large range of noise signals. The first pressure signal is the expected signal S raw , the expected signal S raw The modified fitted noise signal output by the digital filter The difference between them is the error signal S etr , error signal S err is the pressure signal after noise reduction.

[0088]

[0089] Wherein, W is an adjustable parameter of the above parameter-adjustable digital filter.

[0090] The input of the parameter adjustable digital filter is the above white noise signal S noise and the expected signal S raw , the filter uses the error signal S err The mean square value (E{|S err | 2}) Iteratively optimize the filter parameter W as the minimum target and output the corresponding fitting noise signal (ie the first fitting noise signal).

[0091] Iteratively optimizing the filter parameter W with the above goal can obtain the same raw The noise signal in is closer to the fitted noise signal Therefore, the error signal S after optimization can be err Directly determined as the noise-reduced pressure signal S tactile That is, after the optimization is completed, the noise-reduced pressure signal S tactile =S err .

[0092] In the embodiment of the present application, the above method is used to perform noise reduction processing on the pressure signal, which can achieve a better noise reduction processing effect when the noise signal in the pressure signal is unknown.

[0093] In some embodiments, the preset sliding track of the tactile sensor matches the sliding track of the convolution operation, and the receiving each pressure signal sent by the tactile sensor includes:

[0094] Receiving each pressure signal sent by the tactile sensor, and detection time information and spatial distribution information corresponding to each pressure signal;

[0095] The signal processing of each of the pressure signals further includes:

[0096] Determine a two-dimensional pressure signal matrix, wherein the two-dimensional pressure signal matrix includes the pressure signals after noise reduction processing, and the positions of the pressure signals after noise reduction processing in the two-dimensional pressure signal matrix are determined according to the detection time information and spatial distribution information respectively corresponding to the pressure signals;

[0097] The process of performing feature vector extraction on each of the pressure signals after noise reduction based on the convolution operation includes:

[0098] The two-dimensional pressure signal matrix is ​​subjected to feature vector extraction processing based on a convolution operation.

[0099] In this implementation, the convolution operation includes sliding of the convolution kernel, and the sliding trajectory of the convolution kernel is generally: first sliding from left to right; when sliding to the right edge of the matrix, moving down to the next row, and then continuing to slide from left to right; the above sliding process is repeated until the convolution kernel covers all parts of the matrix.

[0100] The preset sliding trajectory of the tactile sensor in the embodiment of the present application matches the sliding trajectory of the convolution operation, that is, the tactile sensor first slides from the upper left corner to the upper right corner of the object surface, and when it slides to the right edge of the object surface, it moves down to the next row, and then continues to slide from left to right until the sliding ends.

[0101] When the tactile sensor slides along the above trajectory, it can detect the contact surface pressure signal according to the preset frequency, and can also output the detection time information and spatial distribution information corresponding to the pressure signal. Based on the above information, the above two-dimensional pressure signal matrix can be determined. Specifically, according to the spatial distribution information corresponding to the N pressure signals, it can be obtained that the N pressure signals are detected when the tactile sensor slides to the Mth row, and they are sorted from small to large according to the detection time. 1~ A n , then the Mth row of data in the two-dimensional pressure signal matrix is ​​the denoised pressure signal A sorted from small to large in time. 1 ~An.

[0102] The two-dimensional pressure signal matrix determined in the above manner can obtain richer information. For example, based on the changes in the previous and next data of each row, the temporal changes in tactile pressure can be obtained, and based on the position of the data in the two-dimensional pressure signal matrix, the distribution of the pressure signal in the spatial dimension can be obtained.

[0103] In some embodiments, the step of performing feature vector extraction processing on the two-dimensional pressure signal matrix based on a convolution operation includes:

[0104] Performing a convolution operation on the two-dimensional pressure signal matrix according to a preset convolution kernel and a specific step size;

[0105] Among them, the number of rows and columns of the preset convolution kernel are both three, and the three rows of parameters in each column of the convolution kernel are the same, the parameter of the third column is a positive number, the parameter of the first column and the parameter of the third column are opposite to each other, and the parameter of the third column is a positive number, and the parameters of the second column are all zero.

[0106] The above preset convolution kernels are as follows:

[0107] Convolution Kernel

[0108] According to the above content, in the two-dimensional pressure signal matrix, the change of tactile pressure in time can be obtained based on the change of the previous and next data of each row, and the distribution of the pressure signal in the spatial dimension can be obtained based on the position of the pressure signal in the two-dimensional pressure signal matrix. Therefore, the above-mentioned convolution kernel performs convolution calculation with the two-dimensional pressure signal matrix according to a specific step size, and the extracted eigenvector can reflect the change of the pressure signal in the time dimension and the distribution of the change in the spatial dimension.

[0109] It is worth mentioning that the parameter K in the above convolution kernel can be a positive integer. To simplify the calculation, the value of k can be 1.

[0110] In some embodiments, the preset binary classification machine learning model is determined by the following steps:

[0111] Determine a training set and a test set, wherein each training sample in the training set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, the label corresponding to the feature vector is used to characterize whether the surface of the object corresponding to the feature vector is flat, and each test sample in the test set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, and the training samples in the training set are different from the test samples in the test set;

[0112] Performing machine training on the binary classification machine learning model based on the training set to obtain a binary classification machine learning model to be tested;

[0113] The binary classification machine learning model to be tested is parameterized based on the test set to obtain the preset binary classification machine learning model.

[0114] The training set and the test set can be divided according to a predetermined ratio, that is, after determining a plurality of samples, the order of the samples can be disrupted, and a specific ratio of the samples can be divided into the training set, and the remaining samples can be divided into the test set. Each sample includes a set of feature vectors and labels corresponding to the feature vectors. The labels corresponding to the feature vectors are manually determined based on the feature vectors to reflect whether the surface of the object associated with the feature vector is flat. In some embodiments, adjacent binary digits can be used as the judgment result of whether the surface of the object is flat, that is, adjacent binary digits can be used to represent different labels.

[0115] It is worth mentioning that the determination of the feature vector in the sample can refer to the above-mentioned embodiment of determining the target feature vector, and to avoid repetition, it will not be described in detail.

[0116] The above-mentioned binary classification machine learning model can select a suitable binary classification machine learning model according to the size of the sample, such as a support vector machine, a Bayesian classifier, a decision tree or a random forest, etc. If the sample size is small, a model with fewer parameters can be selected. In the process of training the above-mentioned binary classification machine learning model with a training set, the input is the feature vector in the training set and its corresponding label, so that the model automatically learns the mapping relationship between the two. After the training of the binary classification machine learning model is completed, the binary classification machine learning model to be tested is obtained. The binary classification machine learning model to be tested is verified with a test set, and the model configuration can be optimized and the model parameters can be adjusted according to the verification results. The optimized model is the above-mentioned preset binary classification machine learning model. The preset binary classification machine learning model takes the feature vector of the pressure signal as input and takes the information on whether the surface of the object being tested is flat as output.

[0117] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0118] Figure 2 It is a block diagram of a device for determining the flatness of an object surface shown in an exemplary embodiment of the present application.

[0119] like Figure 2 As shown, the device comprises:

[0120] The control module 210 is used to control the tactile sensor to slide on the surface of the object to be tested according to a preset trajectory, and the tactile sensor is used to detect the pressure signal of the contact surface between the surface of the object to be tested and the tactile sensor according to a preset frequency during the sliding process;

[0121] The receiving module 220 is used to receive various pressure signals sent by the tactile sensor;

[0122] A signal processing module 230, configured to perform signal processing on each of the pressure signals to obtain a target feature vector of each of the pressure signals, wherein the signal processing includes performing feature vector extraction processing based on a convolution operation;

[0123] The determination module 240 is used to input the target feature vector into a preset binary classification machine learning model to obtain information on whether the surface of the object to be measured is flat.

[0124] In one embodiment of the present invention, the signal processing further includes noise reduction processing, and the signal processing module 230 includes:

[0125] A noise reduction processing unit, used for performing noise reduction processing on each pressure signal;

[0126] The feature vector extraction unit is used to perform feature vector extraction processing on each pressure signal after noise reduction processing based on a convolution operation.

[0127] In one embodiment of the present invention, the signal processing further includes normalization processing, and the signal processing module 230 further includes:

[0128] The normalization processing unit is used to perform normalization processing on the extracted feature vectors to obtain target feature vectors of each pressure signal.

[0129] In one embodiment of the present invention, the noise reduction processing unit is specifically used for:

[0130] Inputting a preset white noise signal and a first pressure signal into a parameter-adjustable digital filter, obtaining a first fitting noise signal output by the parameter-adjustable digital filter with the goal of minimizing the mean square value of an error signal, wherein the error signal is a difference between the first pressure signal and the first fitting noise signal, and the first fitting noise signal is used to fit the noise signal in the first pressure signal, and the first pressure signal is any one of the pressure signals;

[0131] The first pressure signal after noise reduction is determined based on the first fitting signal and the first pressure signal.

[0132] In one embodiment of the present invention, the preset sliding trajectory of the tactile sensor matches the sliding trajectory of the convolution operation, and the receiving module 220 is specifically used for:

[0133] Receiving each pressure signal sent by the tactile sensor, and detection time information and spatial distribution information corresponding to each pressure signal;

[0134] The signal processing module 230 is further specifically used for:

[0135] Determine a two-dimensional pressure signal matrix, wherein the two-dimensional pressure signal matrix includes the pressure signals after noise reduction processing, and the positions of the pressure signals after noise reduction processing in the two-dimensional pressure signal matrix are determined according to the detection time information and spatial distribution information respectively corresponding to the pressure signals;

[0136] The feature vector extraction unit is specifically used to perform feature vector extraction processing on the two-dimensional pressure signal matrix based on a convolution operation.

[0137] In one embodiment of the present invention, the feature vector extraction unit is specifically used for:

[0138] Performing a convolution operation on the pressure signal matrix according to a preset convolution kernel and a specific step size;

[0139] Among them, the number of rows and columns of the preset convolution kernel are both three, and the three rows of parameters in each column of the convolution kernel are the same, the parameter of the third column is a positive number, the parameter of the first column and the parameter of the third column are opposite numbers, and the parameters of the second column are all zero.

[0140] In one embodiment of the present invention, the preset binary classification machine learning model is determined by the following steps:

[0141] Determine a training set and a test set, wherein each training sample in the training set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, the label corresponding to the feature vector is used to characterize whether the surface of the object corresponding to the feature vector is flat, and each test sample in the test set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, and the training samples in the training set are different from the test samples in the test set;

[0142] Performing machine training on the binary classification machine learning model based on the training set to obtain a binary classification machine learning model to be tested;

[0143] The binary classification machine learning model to be tested is parameterized based on the test set to obtain the preset binary classification machine learning model.

[0144] It should be noted that the surface flatness judgment device provided in the above embodiment and the surface flatness judgment method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In actual application, the surface flatness judgment device provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.

[0145] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the method for determining the flatness of an object surface provided in the above-mentioned embodiments.

[0146] Figure 3 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 3 The computer system 300 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0147] like Figure 3As shown, the computer system 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0148] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0149] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, various functions defined in the system of the present application are executed.

[0150] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0151] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0152] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0153] Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.

[0154] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in each of the above embodiments.

[0155] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for determining the flatness of an object surface, characterized in that: include: Controlling the tactile sensor to slide on the surface of the object to be tested according to a preset trajectory, wherein the tactile sensor is used to detect a pressure signal of a contact surface between the surface of the object to be tested and the tactile sensor according to a preset frequency during the sliding process; receiving each pressure signal sent by the tactile sensor; Performing signal processing on each of the pressure signals to obtain a target feature vector of each of the pressure signals, wherein the signal processing includes performing feature vector extraction processing based on a convolution operation; The target feature vector is input into a preset binary classification machine learning model to obtain information on whether the surface of the object to be tested is flat.

2. The method according to claim 1, characterized in that The signal processing further includes noise reduction processing, and the signal processing of each pressure signal includes: Performing noise reduction processing on each of the pressure signals; Based on the convolution operation, feature vector extraction is performed on each of the pressure signals after the noise reduction process.

3. The method according to claim 2, characterized in that The signal processing further includes normalization processing. After performing feature vector extraction processing on each of the pressure signals after noise reduction processing based on the convolution operation, the method further includes: The extracted feature vectors are normalized to obtain target feature vectors of the pressure signals.

4. The method according to claim 2, characterized in that: The performing noise reduction processing on each of the pressure signals comprises: Inputting a preset white noise signal and a first pressure signal into a parameter-adjustable digital filter, obtaining a first fitting noise signal output by the parameter-adjustable digital filter with the goal of minimizing the mean square value of an error signal, wherein the error signal is a difference between the first pressure signal and the first fitting noise signal, and the first fitting noise signal is used to fit the noise signal in the first pressure signal, and the first pressure signal is any one of the pressure signals; Based on the first fitting signal and the first pressure signal, the first pressure signal after noise reduction processing is determined.

5. The method according to any one of claims 2 to 4, characterized in that The preset sliding track of the tactile sensor matches the sliding track of the convolution operation, and the receiving of each pressure signal sent by the tactile sensor includes: Receiving each pressure signal sent by the tactile sensor, and detection time information and spatial distribution information corresponding to each pressure signal; The signal processing of each of the pressure signals further includes: Determine a two-dimensional pressure signal matrix, wherein the two-dimensional pressure signal matrix includes the pressure signals after noise reduction processing, and the positions of the pressure signals after noise reduction processing in the two-dimensional pressure signal matrix are determined according to the detection time information and spatial distribution information respectively corresponding to the pressure signals; The process of performing feature vector extraction on each of the pressure signals after noise reduction based on the convolution operation includes: The two-dimensional pressure signal matrix is ​​subjected to feature vector extraction processing based on a convolution operation.

6. The method according to claim 5, characterized in that The step of performing feature vector extraction processing on the two-dimensional pressure signal matrix based on a convolution operation includes: Performing a convolution operation on the two-dimensional pressure signal matrix according to a preset convolution kernel and a specific step size; Among them, the number of rows and columns of the preset convolution kernel are both three, and the three rows of parameters in each column of the convolution kernel are the same, the parameter of the third column is a positive number, the parameter of the first column and the parameter of the third column are opposite numbers, and the parameters of the second column are all zero.

7. The method according to claim 1, characterized in that The preset binary classification machine learning model is determined by the following steps: Determine a training set and a test set, wherein each training sample in the training set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, the label corresponding to the feature vector is used to characterize whether the surface of the object corresponding to the feature vector is flat, and each test sample in the test set includes a feature vector obtained based on the signal processing and a label corresponding to the feature vector, and the training samples in the training set are different from the test samples in the test set; Performing machine training on the binary classification machine learning model based on the training set to obtain a binary classification machine learning model to be tested; The binary classification machine learning model to be tested is parameterized based on the test set to obtain the preset binary classification machine learning model.

8. A device for determining the flatness of an object surface, characterized in that: include: A control module, used to control the tactile sensor to slide on the surface of the object to be tested according to a preset trajectory, wherein the tactile sensor is used to detect a pressure signal of a contact surface between the surface of the object to be tested and the tactile sensor according to a preset frequency during the sliding process; A receiving module, used for receiving various pressure signals sent by the tactile sensor; A signal processing module, used for performing signal processing on each of the pressure signals to obtain a target feature vector of each of the pressure signals, wherein the signal processing includes performing feature vector extraction processing based on a convolution operation; The determination module is used to input the target feature vector into a preset binary classification machine learning model to obtain information on whether the surface of the object to be tested is flat.

9. A device, characterized in that: include: one or more processors and memory, A computer program is stored in the memory, and when the one or more processors execute the computer program, the device is caused to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, which, when executed by one or more processors, causes the device to perform the method according to any one of claims 1 to 7.