Disclosure of Invention
The embodiment of the invention provides a method for constructing a reconstruction model of an automobile bolt tightening curve and identifying tightening quality, which is used for removing interference noise in the tightening curve.
In a first aspect, an embodiment of the present invention provides a method for constructing a reconstruction model of an automobile bolt tightening curve, including:
obtaining tightening curves of different types of bolts of an automobile under different conditions, wherein the different conditions comprise normal conditions and various abnormal conditions, and each tightening curve comprises interference noise with different degrees;
training a neural network model based on deep learning by utilizing each tightening curve, and taking the trained model as an automobile bolt tightening curve reconstruction model;
wherein the neural network model comprises an encoder and a plurality of decoders, each decoder corresponding to one of the different situations;
the training process comprises the following steps:
the tightening curves of various bolts under different conditions respectively pass through the encoder and the decoder under corresponding conditions;
the output difference of encoders corresponding to different tightening curves of the same bolt is minimized, so that the trained encoder can extract the fixed physical characteristics of the bolt; meanwhile, the tightening curve under each condition and the output difference of the corresponding decoder are minimized, so that each trained decoder can reconstruct the tightening curve after interference elimination under the corresponding condition according to the fixed physical characteristics.
In a second aspect, an embodiment of the present invention provides a method for identifying abnormal tightening of an automobile bolt, including:
acquiring an automobile bolt tightening curve to be identified;
inputting the tightening curve into a trained neural network model, and respectively outputting a plurality of reconstruction curves by decoders corresponding to different conditions in the model;
comparing the reconstructed curves with standard tightening curves under different conditions, and identifying whether the tightening quality corresponding to the tightening curves is abnormal or not and the type of the abnormal condition;
the neural network model is obtained by adopting the method for constructing the reconstruction model of the automobile bolt tightening curve.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the above-mentioned automobile bolt tightening curve reconstruction model construction method or the above-mentioned automobile bolt tightening quality identification method.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the above method for constructing a reconstruction model of an automobile bolt tightening curve, or the above method for identifying an automobile bolt tightening quality.
According to the embodiment of the invention, the neural network model is trained by adopting the tightening curves of the same bolt under different conditions, so that the trained encoder can extract the fixed physical characteristics of the bolt, remove interference noise, and the trained decoder can reconstruct the curves according to the fixed physical characteristics to obtain the tightening curves after interference removal. On the basis, the same training is carried out on different bolts, so that on one hand, the training data volume is increased, and on the other hand, the model is applicable to various bolts without modeling for each new bolt.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the invention, are within the scope of the invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should also be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
Fig. 1 is a flowchart of a method for constructing a reconstruction model of an automobile bolt tightening curve according to an embodiment of the present invention. The method is suitable for the situation that large interference noise exists in an actual tightening curve of the automobile bolt, and curve interference caused by accidental factors is eliminated by constructing a curve reconstruction model. The method is executed by the electronic equipment, as shown in fig. 1, and specifically comprises the following steps:
s110, obtaining tightening curves of different types of bolts of the automobile under different conditions, wherein the different conditions comprise normal conditions and various abnormal conditions, and each tightening curve comprises interference noise with different degrees.
The tightening curve is composed of a sequence of angles and torques for a single tightening process. The step collects tightening curves of various bolts under various typical conditions to form a tightening curve library, and the tightening curve library is used as a data source for subsequent operation. Alternatively, for any one bolt, the normal tightening curve of such a bolt under normal conditions, and the abnormal tightening curves under various abnormal conditions are included in the tightening curve library. The plurality of abnormal tightening conditions may include repeated tightening, stick-slip, hand-off, thread damage, and the like.
The interference noise is larger interference noise caused by accidental factors in assembly, and the noise can be from operation errors, machine damage, environmental influence and the like in assembly, has larger influence on curve morphology and cannot be removed through simple operations such as curve smoothing filtering and the like. Wherein the environmental impact includes ambient humidity, ambient temperature, etc. For example, when the environmental humidity is high, the assembly is easy to slide, so that the tightening curve of the humidity environment is different from the tightening curve in the dry condition to some extent, which will affect the judgment of the tightening quality.
S120, training a neural network model based on deep learning by utilizing each tightening curve; wherein the neural network model includes an encoder and a plurality of decoders, each decoder corresponding to one of the different conditions.
Aiming at the interference, the neural network model is trained through the tightening curve library, so that the trained model can remove interference noise in the tightening curve, and larger curve fluctuation caused by accidental factors is prevented. The internal structure of the model can be seen in fig. 2, wherein solid line boxes represent the layer structures of the model, including the encoder and decoder, and dashed line boxes represent the inputs and outputs of the layers of the model during the training phase. The training objectives of the model can also be seen from fig. 2, namely: the trained encoder can extract the fixed physical characteristics of the bolt from the tightening curve, and the trained decoder can reconstruct the tightening curve after interference removal according to the fixed physical characteristics. In a specific embodiment, the encoder and decoder may select a 3-layer multi-head self-focusing neural network, each layer adopts 8 self-focusing layers to form a multi-head self-focusing layer, a normalization layer is connected to the back of each layer, and a full-connection layer is connected to the back of the last normalization layer to generate a result with a specific size. Illustratively, the fixed physical features may include: fixing features related to bolt structure and/or size (length, radius, etc.).
In order to achieve the above training objective, in this embodiment, the normal tightening curves of different bolts and the abnormal tightening curves under different abnormal conditions are respectively input into the model to perform training (as shown in fig. 2), and the feature extracted by the encoder is continuously approximate to the fixed physical feature of the bolt by restraining the output difference of the encoder corresponding to the same bolt to be minimized, so that the function of extracting the fixed physical feature of the bolt from the tightening curves is finally provided; on the basis, the method and the device have the advantages that the output difference between each tightening curve and the corresponding decoder is restrained to be minimized, so that the reconstructed curve of the decoder and the input curve keep similar forms, and finally the function of reconstructing the tightening curve after interference elimination according to the fixed physical characteristics is achieved. It should be noted that the encoder and decoder may be synchronously trained, and only different loss function terms need to be set for respective training targets. The loss function terms together form a loss function, and the encoder, the decoder and the model can realize the respective functions simultaneously through one training. The loss function term settings of the encoder and decoder are specifically described below.
For the encoder: the tightening curves generated by different bolts have obvious differences due to the differences of physical characteristics such as structures, sizes and the like; but for the same bolt, these physical properties are fixed and unaffected by disturbing noise during assembly. Based on the characteristics, the output difference of the encoders corresponding to the same bolt can be restrained to be minimized through the loss function term in model training, so that the characteristics extracted by the encoder are continuously approximate to the fixed characteristics derived from the physical characteristics such as the structure, the size and the like of the bolt.
Optionally, the following loss function term is constructed:
(1)
wherein ,Fi and Fj And the characteristics of the output of any two tightening curves of the same bolt after passing through the encoder are respectively represented.
Further, according to different situation types, the following loss function terms can be constructed:
(2)
wherein ,Aindicating the number of abnormal situations,Frepresenting the characteristics of the normal tightening curve of the bolt output after passing through the encoder,F i indicating that the same kind of bolt is at the firstiAnd the abnormal tightening curve under abnormal conditions is output after passing through the encoder.
For a decoder: the following loss function term can be constructed:
(3)
wherein M represents the number of tightening curves in the tightening curve library, S k Represent the firstkThe tightening curve is formed by a strip,represent the firstkThe tightening curves sequentially pass through the encoder and the corresponding decoder and then are output.
Further, according to different situation types, the following loss function terms can be constructed:
(4)
wherein ,Sa normal tightening curve of a bolt is shown,representation ofSThe curves output after passing through the encoder and the decoder corresponding to the normal condition in turn,S i indicating that the same kind of bolt is at the firstiAbnormal tightening curve in case of abnormal species, +.>Representation ofS i Sequentially pass through an encoder, the firstiAnd a curve output after the decoder corresponding to the abnormal condition.
In one embodiment, the loss function terms of equation (2) and equation (4) can be extended to each bolt and combined into one complete loss function:
(5)
wherein ,Nrepresenting the number of bolt types included in the tightening curve library,S j represent the firstjThe normal tightening curve of the seed bolt,F j representation ofS j The characteristics of the output after passing through the encoder,representation ofS j The curves output after passing through the encoder and the decoder corresponding to the normal condition in turn,Aindicating the number of abnormal tightening conditions,S i,j represent the firstjThe seed bolt is at the firstiAn abnormal tightening curve in the case of an abnormal condition,F i,j representation ofS i,j Characteristics of the output after passing through the encoder, +.>Representation ofS i,j Sequentially pass through an encoder, the firstiCurve of decoder post-output corresponding to abnormal condition,/->Representing curve reconstruction difference->Weight of->Representing bolt feature extraction Difference->Is a weight of (2).
Through the minimization of the loss function, the minimization of the characteristic difference output by the normal tightening curve of the same bolt and the abnormal tightening curve under each abnormal condition after passing through the encoder can be realized simultaneously, the minimization of the result difference output by the normal tightening curve and the abnormal tightening curve after passing through the encoder and the corresponding decoder in sequence, and the minimization of the result difference output by the abnormal tightening curve under each abnormal condition and the abnormal tightening curve after passing through the encoder and the corresponding decoder in sequence can be realized simultaneously, so that the encoder, the decoder and the model integrally have corresponding functions simultaneously.
Wherein the weight is and />The emphasis point of parameter regulation in model training is determined, and the size of the emphasis point can be specifically set according to actual needs. Alternatively, if the bolt category is far more than the abnormal category, the +.>Regulating the size of->To emphasize the applicability of the model to various bolts; if the abnormal situation is far more than the bolt, the +.>Regulating the size of->To emphasize the applicability of the model to various anomalies.
According to the embodiment, the neural network model is trained by adopting the tightening curves of the same bolt under different conditions, so that the trained encoder can extract the fixed physical characteristics of the bolt, reject interference noise, and reconstruct the curves according to the fixed physical characteristics to obtain the tightening curves after interference removal. On the basis, the same training is carried out on different bolts, so that on one hand, the training data volume is increased, and on the other hand, the model is applicable to various bolts without modeling for each new bolt.
Fig. 3 is a flowchart of a method for identifying abnormal tightening of an automobile bolt according to an embodiment of the present invention. The method is suitable for evaluating the tightening assembly quality through the tightening curve of the automobile bolt, and is executed by the electronic equipment. As shown in fig. 3, the method specifically includes:
s210, acquiring an automobile bolt tightening curve to be identified.
S220, inputting the tightening curve into a trained neural network model, and respectively outputting a plurality of reconstruction curves by decoders corresponding to different conditions in the model.
The neural network model is obtained by adopting the method for constructing the reconstruction model of the automobile bolt tightening curve provided by any embodiment. Since it is not possible to determine which class of conditions the curve to be identified belongs to, the curve is input to each decoder after passing through the encoder, and one of the outputs of the decoders will be able to reproduce the undisturbed curve. The curve form of the remaining encoder outputs will be deformed to a different extent than the original curve.
S230, comparing the reconstructed curves with standard tightening curves under different conditions, and identifying whether the tightening quality corresponding to the tightening curves is abnormal or not and the type of the abnormal condition.
And if the similarity between the reconstruction curve corresponding to the normal condition and the standard tightening curve corresponding to the normal condition is highest, identifying the tightening curve as normal. If the tightening curve of one of the abnormal situations has the highest similarity with the standard tightening curve of the abnormal situation, the tightening curve is identified as belonging to the abnormal situation.
It should be noted that if the reconstructed curves of various cases have high similarity with the standard curves of the respective cases, the reconstructed curves may be further compared with the curves before interference removal, and the case with the highest similarity is the final recognition result. In fact, this situation is very rare.
In the embodiment, based on a pre-constructed neural network model, curve reconstruction is firstly carried out on a curve to be identified, and interference noise caused by operation errors, machine damage, environmental influence and the like in assembly is removed; and comparing the reconstructed curve with the standard curve under each tightening quality condition, so as to identify whether the tightening curve is abnormal or not and the abnormal type, and the identification result is more accurate.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device may be one or more, one processor 60 being taken as an example in fig. 4; the processor 60, the memory 61, the input means 62 and the output means 63 in the device may be connected by a bus or other means, in fig. 4 by way of example.
The memory 61 is used as a computer readable storage medium for storing a software program, a computer executable program and a module, such as program instructions/modules corresponding to the method for constructing a reconstruction model of a tightening curve of an automobile bolt and identifying the tightening quality in the embodiment of the invention. The processor 60 executes various functional applications of the apparatus and data processing by running software programs, instructions and modules stored in the memory 61, i.e., implements the above-described automobile bolt tightening curve reconstruction model construction and tightening quality recognition method.
The memory 61 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 61 may further comprise memory remotely located relative to processor 60, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 62 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output 63 may comprise a display device such as a display screen.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the program is executed by a processor to realize the method for constructing the reconstruction model of the automobile bolt tightening curve or the method for identifying the tightening quality of the automobile bolt.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the C-programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.