Electric welding machine control method and device, computer equipment, readable storage medium and program product
By receiving and processing audio signals, welder control instructions are generated to control the welding machine, the safety hazards in the operation of the welding machine are solved and safer and more accurate operation is achieved.
Patent Information
- Application Number
- CN202410974726.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-08
AI Technical Summary
The existing welding machine operation has safety risks and cannot control the safety of the welding machine from the source, especially due to physical contact and potential wrong operations caused by manual operation.
By receiving the audio signals to be processed, a target filter is built to filter, identify voice information and generate welding machine control instructions, reduce physical contact between the operator and the welding machine, reduce safety risks and avoid incorrect operations.
Through voice control of the welding machine, the safety risks brought by manual operation are reduced, the safety and accuracy of the operation are improved, and the safety of the working environment is ensured.
Smart Images

Figure CN118918886A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric welding machines, and in particular to an electric welding machine control method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] Electric welding machine is an electrical device widely used in the connection of metal materials. It melts the welding material through the high temperature generated by arc discharge to achieve a firm connection between metal parts. The arc is formed when gas discharges between two electrodes. This process not only releases strong light and heat, but also is accompanied by ultraviolet and infrared radiation, as well as possible metal vapor and harmful gases. Therefore, there is a certain risk when using an electric welding machine.
[0003] At present, in order to ensure safety, a series of precautions must be taken when operating electric welders, such as welding clothes, gloves and protective masks. However, there may be improper operations, which cannot guarantee the safety of electric welders from the source. Summary of the invention
[0004] Based on this, it is necessary to provide a welding machine control method, device, computer equipment, computer readable storage medium and computer program product to improve the safety of controlling the welding machine in response to the above technical problems.
[0005] In a first aspect, the present application provides a welding machine control method, comprising:
[0006] receiving an audio signal to be processed;
[0007] Constructing a target filter according to the audio signal to be processed, and using the target filter to filter the audio signal to be processed;
[0008] Recognizing the filtered audio signal to be processed to obtain voice information;
[0009] If the voice information includes welding machine control information, generating welding machine control instructions according to the welding machine control information;
[0010] The welding machine control instruction is sent to the welding machine; the welding machine is used to perform the welding task according to the welding machine control instruction. In one embodiment, the target filter is constructed according to the audio signal to be processed, including:
[0011] Substituting the audio signal to be processed into an initial filter to obtain reference audio information;
[0012] The difference between the reference audio information and the target signal is calculated, and the coefficient of the initial filter is adjusted according to the difference to obtain a target filter.
[0013] In one embodiment, the audio signal to be processed and the target signal include a plurality of target frames; and the step of calculating the difference between the reference audio information and the target signal includes:
[0014] Calculating the difference between each target frame in the reference audio information and each target frame in the target signal to obtain a discrete difference data set;
[0015] The absolute values of the discrete differences in the discrete difference data set are accumulated and summed to obtain the difference between the reference audio information and the target signal.
[0016] In one embodiment, adjusting the coefficients of the initial filter according to the difference to obtain a target filter includes:
[0017] Calculate an adjustment gradient according to the difference, and use the adjustment gradient to update the coefficient;
[0018] The audio signal to be processed is filtered using the initial filter after the coefficient is updated to obtain the new reference audio information, and the difference between the new reference audio information and the target signal is calculated. If the difference between the new reference audio information and the target signal does not meet the preset conditions, the step of updating the coefficients is performed until the difference between the new reference audio information and the target signal meets the preset conditions to obtain the target filter.
[0019] In one embodiment, calculating the coefficients of the initial filter according to the difference to obtain the target filter includes:
[0020] Calculate the mean square error of the difference to obtain a cost loss function;
[0021] The target variable in the cost loss function is derived to obtain the coefficients of the initial filter.
[0022] In one embodiment, the step of identifying the filtered audio signal to be processed to obtain voice information includes:
[0023] Extracting features from the audio signal to be processed to obtain audio features;
[0024] The audio features are input into a pre-trained acoustic model to obtain a phoneme probability distribution, and the phoneme probability distribution is recognized through a language model to obtain the speech text.
[0025] In one embodiment, the training process of the acoustic model includes:
[0026] Acquire first sample data; the first sample data carries a voice tag;
[0027] Inputting the first sample data into a first initial model to obtain a predicted text;
[0028] A first target loss function is calculated according to the predicted text and the voice tag, and the parameters of the first initial model are optimized using the first target loss function to obtain the acoustic model.
[0029] In one embodiment, the language model training process includes:
[0030] Acquire second sample data; the second sample data carries the text label;
[0031] Inputting the second sample data into a second initial model to obtain a predicted text;
[0032] A second objective loss function is calculated based on the predicted text and the text label, and the parameters of the second initial model are optimized using the second objective loss function to obtain the language model. In one embodiment, the welding machine control information includes one or more of the current of manual welding, the current of argon arc welding, and the wire feeding speed and voltage of gas shielded welding.
[0033] In a second aspect, the present application also provides a welding machine control device, comprising:
[0034] A receiving module, used for receiving an audio signal to be processed;
[0035] A filtering module, used to construct a target filter according to the audio signal to be processed, and use the target filter to filter the audio signal to be processed;
[0036] A recognition module, used for recognizing the filtered audio signal to be processed to obtain voice information;
[0037] An instruction generating module, for generating an electric welding machine control instruction according to the electric welding machine control information if the voice information includes the electric welding machine control information;
[0038] The control module is used to send the electric welder control instruction to the electric welder; the electric welder performs the welding task according to the electric welder control instruction.
[0039] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0041] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.
[0042] The above-mentioned welding machine control method, device, computer equipment, computer-readable storage medium and computer program product construct a target filter according to the audio signal to be processed, and use the target filter to filter the audio signal to be processed. The filter whose parameters are dynamically adjusted according to the audio signal to be processed is used to remove noise or interference, so as to better remove the noise in the audio signal to be processed. Further, the filtered audio signal to be processed is recognized to obtain voice information, and according to the welding machine control information included in the voice information, a control instruction is generated according to the control information, and finally the control instruction is sent to the welding machine, so that the welding machine performs the welding task according to the control instruction, so that the physical contact between the operator and the welding machine can be reduced by controlling the welding machine by voice, and the safety risks caused by manual operation can be reduced. At the same time, accurate voice recognition and control instruction generation can also avoid erroneous operation and ensure the safety of the working environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 An application environment diagram of an electric welding machine control method in an embodiment;
[0045] Figure 2 A schematic diagram of a flow chart of a method for controlling an electric welding machine in one embodiment;
[0046] Figure 3 A schematic diagram of a flow chart of coefficient adjustment in one embodiment;
[0047] Figure 4 A structural block diagram of an electric welding machine control device in one embodiment;
[0048] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] The welding machine control method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the electric welder 102 communicates with the remote controller 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The remote controller 104 receives the audio signal to be processed, constructs a target filter according to the audio signal to be processed, and uses the target filter to filter out the noise in the audio signal to be processed, and then recognizes the filtered audio signal to be processed and the voice to obtain the voice information. Finally, the remote controller generates a control instruction according to the voice information and sends it to the electric welder 102, and the electric welder 102 performs the welding task according to the electric welder control instruction. Among them, the remote controller 104 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, remote controls, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc.
[0051] In an exemplary embodiment, Figure 2 As shown, a welding machine control method is provided, and the method is applied to Figure 1 The remote controller 104 in FIG. 1 is taken as an example to illustrate, including the following steps 202 to 210. Among them:
[0052] Step S202: receiving an audio signal to be processed.
[0053] The audio signal to be processed refers to the original audio data that has been captured but not yet processed and analyzed in the audio processing process. Specifically, it is the audio signal received from a microphone or other audio input device without any modification or processing.
[0054] The remote controller is equipped with a microphone array, which receives the audio signal to be processed. Selecting a suitable microphone array can improve the capture capability and directionality of voice signals. The microphone array can enhance the target sound and suppress background noise through beamforming technology.
[0055] Furthermore, the remote controller is in a dormant state before receiving the audio signal to be processed, and wakes up from the dormant state after receiving the audio signal to be processed.
[0056] Exemplarily, when any microphone on the microphone array receives vibration, each microphone is configured with a vibration detection function, and when an audio signal (vibration) is detected, the remote controller wakes up from the sleep state.
[0057] For example, when the remote controller does not receive the audio signal to be processed within a preset time period, the remote controller changes from the awake state to the sleep state. The preset time period is a pre-set condition for controlling the remote controller to enter the sleep state, which can be set according to the actual control scenario and is not specifically limited in this embodiment.
[0058] Step S204: construct a target filter according to the audio signal to be processed, and use the target filter to filter the audio signal to be processed.
[0059] In this embodiment, a target filter is constructed according to the audio signal to be processed, so that the parameters of the filter can be dynamically adjusted according to the audio signal to be processed, and then the target is used to filter the audio signal to be processed, which can better process the noise of the audio signal to be processed.
[0060] Optionally, the coefficients of the filter may be solved according to the audio signal to be processed to obtain a target filter.
[0061] Furthermore, a target signal may be set, that is, a signal in an ideal state, and then the coefficients of the filter may be solved according to the difference between the audio signal to be processed and the target signal to obtain the target filter.
[0062] Exemplarily, an ideal target signal is generated, which represents the speech signal in an ideal situation without noise interference. Then, an initial filter is selected, which can be any one of a zero filter, a random filter, and a unit impulse response filter. Then, the difference between the audio signal to be processed and the target signal is calculated, and the coefficient of the filter is iteratively updated according to the difference and the audio signal to be processed, so that the error signal is gradually reduced, thereby obtaining the target filter.
[0063] Step S206: Recognize the filtered audio signal to be processed to obtain voice information.
[0064] In this embodiment, the trained model is used to recognize the audio signal to be processed to obtain voice information, that is, to obtain text output.
[0065] Exemplarily, features are extracted from the audio signal to be processed, including cepstral coefficients (MFCC), linear prediction coefficients (LPC), and Mel energy spectrogram (MEL), and then MFCC features are calculated. The MFCC features are then normalized to reduce the differences between features and improve the generalization ability of the model. Finally, they are input into the acoustic model and language model for recognition to obtain speech information.
[0066] Step S208: if the voice information includes welding machine control information, generate welding machine control instructions according to the welding machine control information.
[0067] First, it is necessary to identify the key instructions and parameters in the voice information. This requires the use of NLP technology, such as named entity recognition, to map the identified instructions and parameters to specific welding machine control instructions, and finally generate formatted control instructions so that the welding machine can understand and execute them.
[0068] For example, when the voice information contains information such as "start welding", "stop welding", "set current to 120 amps", etc., the specific control instructions are extracted, and then the commands and parameters, such as "start welding" and "current to 120 amps", are extracted, and the commands and parameters are mapped to specific electric welding machine control instructions to generate formatted control instructions.
[0069] In this way, the welding machine control information in the voice information is converted into control instructions that the welding machine can understand and execute.
[0070] Step S210, sending the electric welding machine control instruction to the electric welding machine; the electric welding machine is used to perform the welding task according to the electric welding machine control instruction.
[0071] Optionally, before sending the electric welder control instruction to the electric welder, it is necessary to select a communication protocol and interface between the remote controller and the electric welder, and then implement the communication interface.
[0072] Exemplarily, any one of serial communication (such as RS-232, RS-485), Ethernet communication, and wireless communication (such as Wi-Fi, Bluetooth) can be used as the communication protocol and interface between the remote controller and the electric welder. Then, the communication interface between the remote controller and the electric welder is implemented. The reliability of communication and the accuracy of data transmission are ensured. For example, communication parameters such as baud rate, data bit, stop bit, etc. are configured to initialize the communication port, and then the formatted control instruction is sent to the electric welder through the communication interface. After the electric welder executes the instruction, feedback information is sent to confirm the execution of the instruction.
[0073] Optionally, when the remote controller is connected to the electric welder through communication and the communication interface is realized, the generated control instruction is sent to the electric welder, and after the electric welder receives the control instruction, it performs the corresponding welding task according to the instruction. The control system of the electric welder needs to be able to parse the received control instruction and perform specific operations.
[0074] Furthermore, after the generated control instruction is sent to the electric welder, the confirmation information of the electric welder can be waited for after sending the instruction to ensure that the instruction has been successfully received and started to be executed, so as to ensure the accuracy of the instruction and the reliability of communication.
[0075] For example, the welding machine control information in the voice information is "set the current to 120 amperes", and the welding machine control information is parsed into a control instruction, such as "CMD_SET_CURRENT:120", and "CMD_SET_CURRENT:120" is sent to the welding machine through the communication interface. After receiving the control instruction, the welding machine adjusts the welding current to 120 amperes and starts the welding task.
[0076] In the above-mentioned electric welding machine control method, a target filter is constructed according to the audio signal to be processed, and the audio signal to be processed is filtered using the target filter. The filter whose parameters are dynamically adjusted according to the audio signal to be processed is used to remove noise or interference, so as to better remove the noise in the audio signal to be processed. Further, the filtered audio signal to be processed is recognized to obtain voice information, and according to the electric welding machine control information included in the voice information, a control instruction is generated according to the control information, and finally the control instruction is sent to the electric welding machine, so that the electric welding machine performs the welding task according to the control instruction, so that the physical contact between the operator and the electric welding machine can be reduced by controlling the electric welding machine through voice, and the safety risks caused by manual operation can be reduced. At the same time, accurate voice recognition and control instruction generation can also avoid wrong operation and ensure the safety of the working environment.
[0077] Furthermore, in one embodiment, the above-mentioned construction of the target filter based on the audio signal to be processed includes: substituting the audio signal to be processed into the initial filter to obtain reference audio information; calculating the difference between the reference audio information and the target signal, and adjusting the coefficient of the initial filter according to the difference to obtain the target filter.
[0078] First, an initial filter needs to be selected and the audio signal to be processed is input into the initial filter to obtain reference audio information. Then, the difference between the reference audio information and the target signal is calculated to obtain an error signal. The error signal reflects the deviation between the reference audio information and the target signal. Finally, the error signal is used to adjust the coefficients of the initial filter in order to gradually reduce the error signal, thereby making the reference audio information closer to the target signal.
[0079] In this way, an effective target filter can be constructed by substituting the audio signal to be processed into the initial filter, calculating the difference between the reference audio information and the target signal, and adjusting the filter coefficient according to the difference. This process continuously adjusts the filter coefficient through an iterative optimization algorithm, so that the reference audio information gradually approaches the target signal to obtain the target filter, thereby achieving efficient noise filtering and speech signal extraction.
[0080] Furthermore, the audio signal to be processed and the target signal include multiple target frames; the above-mentioned calculation of the difference between the reference audio information and the target signal includes: calculating the difference between each target frame in the reference audio information and each target frame in the target signal to obtain the difference between the reference audio information and the target signal.
[0081] In this embodiment, the audio signal to be processed and the target signal need to be divided into multiple target frames according to a preset frame length, wherein the preset frame length is pre-set, for example, 25ms or 50ms, and there will be a certain overlap between the target frames to ensure the continuity and integrity of the signal.
[0082] For each frame of audio signal, including the reference audio frame and the target frame, their difference is calculated. Assuming that the reference audio signal has n target frames and the target signal also has n target frames, the difference between each target frame in the reference audio information and each target frame in the target signal is calculated, and then the absolute value of the accumulated and discrete differences is used to estimate the error, as shown in formula (1)
[0083] e[n]=d[n]-y[n] Formula (1)
[0084] Wherein, d[n] is the target signal, y[n] is the reference audio information, and each target frame is calculated according to formula (1) to obtain the difference between each target frame in the reference audio information and each target frame in the target signal.
[0085] Furthermore, after obtaining the difference, it is determined whether the difference satisfies a preset condition, wherein the preset condition refers to a pre-set condition for determining whether the filter needs to be iterated. If the condition is satisfied, the coefficients of the initial filter are no longer updated, and the target filter is output.
[0086] Optional, combined Figure 3 , Figure 3 This is a coefficient adjustment diagram in an embodiment, in which an initial filter with updated coefficients is used to filter an audio signal to be processed to obtain new reference audio information, and the difference between the new reference audio information and the target signal is calculated. If the difference between the new reference audio information and the target signal does not meet the preset conditions, the step of updating the coefficients is performed until the difference between the new reference audio information and the target signal meets the preset conditions to obtain the target filter.
[0087] Exemplarily, an initial filter is selected, which may be an all-zero filter or an initial coefficient selected based on experience. Then, the audio signal to be processed is substituted into the initial filter to obtain reference audio information, as shown in formula (1), and the difference between the reference audio information and the target signal is calculated. If the difference between the reference audio information and the target signal does not meet the preset condition, the gradient is adjusted according to the difference, for example, using an error-based least mean square (LMS) algorithm, as shown in formula (2):
[0088] f[n+1]=f[n]+μe[n]x[n] Formula (2)
[0089] Among them, e[n] = d[n] - y[n], d[n] is the target signal, y[n] is the filter output, x[n] is the input signal, and μ is the learning rate.
[0090] The updated filter coefficients are used to filter the audio signal to be processed to obtain new reference audio information, and then the difference between the new reference audio information and the target signal is used to update the filter coefficients according to the new difference, and the iteration continues until the difference meets the preset condition. After multiple iterative updates, when the difference between the reference audio information and the target signal meets the preset condition (for example, the error reaches or is lower than the set threshold), the current filter coefficients are the required target filter.
[0091] In this way, by continuously adjusting the filter coefficients, the difference between the filter output and the target signal is gradually reduced, and finally a target filter that can effectively remove noise is obtained.
[0092] Furthermore, in other embodiments, the above-mentioned calculation of the coefficients of the initial filter based on the difference to obtain the target filter includes: calculating the mean square error of the difference to obtain a cost loss function; and differentiating the target variable in the cost loss function to obtain the coefficients of the initial filter.
[0093] Among them, the cost loss function can be calculated according to formula (3).
[0094] J = E{e 2 [n]}=E{d[n]-y[n]} 2 =E{d[n]-f T x[n]} 2 Formula (3)
[0095] in,
[0096] y[n]=f T x[n] Formula (4)
[0097] Where f is the coefficient vector of the filter.
[0098]
[0099] Next, the derivative of the cost loss function with respect to f is solved according to formula (5), and it is set equal to 0 to find the minimum value.
[0100]
[0101] This is, the optimal filter coefficient f opt The expression of the autocorrelation matrix R xx and the cross-correlation matrix R dx Calculated.
[0102] In one embodiment, the above-mentioned identification of the filtered audio signal to be processed to obtain speech information includes: extracting features of the audio signal to be processed to obtain audio features; inputting the audio features into a pre-trained acoustic model to obtain a phoneme probability distribution, and identifying the phoneme probability distribution through a language model to obtain speech text.
[0103] First, the audio signal after filtering is feature extracted. The audio features include Mel-frequency cepstral coefficients (MFCC), Mel-frequency cepstral spectrogram, power spectral density, etc. These features can effectively capture the spectral characteristics and time changes of the speech signal. The extracted audio features are input into the pre-trained acoustic model, which maps the audio features to the probability distribution of phonemes (speech units). The acoustic model outputs the phoneme probability distribution at each time step. These probabilities represent the probability of each possible phoneme (such as / ɑ / , / k / , / s / , etc.) appearing at each time point. The phoneme probability distribution output by the acoustic model is input into the language model. The language model is used to further optimize the probability of the phoneme sequence based on contextual information to identify the most likely speech text.
[0104] In the above embodiment, the collaborative work of the acoustic model and the language model is combined to effectively convert the audio signal into text information.
[0105] Among them, the training process of the acoustic model includes: obtaining first sample data; the first sample data carries a voice label; inputting the first sample data into the first initial model to obtain predicted phonemes; calculating the first target loss function based on the predicted phonemes and voice labels, and using the first target loss function to optimize the parameters of the first initial model to obtain an acoustic model.
[0106] First, sample data with voice tags are obtained, and the voice tags are used to guide the model to learn the mapping relationship between audio signals and phonemes. The first sample data with voice tags is input into the first initial model. Among them, the second initial model can be an untrained or partially trained deep neural network model, such as any one of a convolutional neural network (CNN), a recurrent neural network (RNN) or a transformer model (Transformer), which is not specifically limited in this embodiment. The second initial model processes the input audio signal and outputs a prediction factor. The predicted phoneme is inferred by the model based on the current parameters. The phoneme sequence predicted by the model is compared with the real voice tag, and the first target loss function is calculated. The first target loss function measures the difference between the phoneme predicted by the model and the actual label. In this embodiment, the loss function can be any one of the cross entropy loss and CTC (connected temporal classification) loss. Then, according to the calculated first target loss function, an optimization algorithm, such as a gradient descent algorithm, is used to update and optimize the parameters of the model. By continuously optimizing the parameters, the model can more accurately map the audio signal to the corresponding text, and finally obtain an optimized acoustic model.
[0107] In the above embodiment, by obtaining sample data with speech tags and inputting it into the initial acoustic model for training and optimization, an efficient acoustic model can be finally obtained.
[0108] Among them, the training process of the language model includes: obtaining second sample data; the second sample data carries a text label; inputting the second sample data into the second initial model to obtain a predicted text; calculating a second target loss function based on the predicted text and the text label, and using the second target loss function to optimize the parameters of the second initial model to obtain a language model.
[0109] First, obtain second sample data with text labels, each second sample data includes a text sequence and a corresponding label, and the text label is used to guide the model to learn the relationship between the text sequence. Input the second sample data with text labels into the second initial language model. The second initial model can be an untrained or partially trained deep neural network model, such as a recurrent neural network (RNN), a long short-term memory network (LSTM) or a transformer model (Transformer), which is not specifically described in this embodiment. The second initial model processes the input second sample data and outputs a predicted text, which is inferred by the model based on the current parameters. Compare the predicted text output by the model with the real text label, and calculate the second target loss function. The second target loss function measures the difference between the text predicted by the model and the actual label, and the second target loss function can be a cross entropy loss. According to the calculated second target loss function, an optimization algorithm, such as a gradient descent algorithm, is used to update and optimize the parameters of the second initial model. By continuously optimizing the parameters, the model can more accurately map the input text sequence to the corresponding output sequence, and finally obtain an optimized language model.
[0110] In the above embodiment, by obtaining sample data with text labels and inputting them into the initial language model for training and optimization, an efficient language model can be finally obtained.
[0111] Furthermore, in one embodiment, the above-mentioned generation of control instructions based on control information includes: determining the task type based on the control information and a preset mapping table; extracting command parameters from the control information through a preset regular expression; verifying the command parameters, and generating control instructions based on the command parameters and the task type after the command parameters are successfully verified.
[0112] The preset mapping table is pre-set and used to determine the task type. The preset mapping table contains the task types corresponding to different control information.
[0113] The preset regular expression is pre-set and used to extract the required command parameters from the control information. The regular expression can accurately match and extract specific patterns and parameters in the control information.
[0114] First, the task type and command parameters are obtained from the control information, and then the command parameters are verified. After the command parameters are successfully verified, the control instructions are generated according to the command parameters and the task type. The verification process of the command parameters is to ensure the safety of the welding machine during the welding process.
[0115] For example, assuming that the control information is "the current of manual welding is 120A; the current of argon arc welding is 80A; the wire feeding speed of gas shielded welding is 10m / min, and the voltage is 25V", the control information is subjected to named entity recognition to obtain the entities of manual welding, current, argon arc welding, wire feeding speed, and voltage, and then combined with the preset mapping table to determine the task type.
[0116] For example, regular expressions are used to extract manual welding current: "Manual welding: current 120A", regular expression: "Manual welding: current (\d+)A", argon arc welding current: "argon arc welding: current 80A", regular expression: "argon arc welding: current (\d+)A", gas shielded welding wire feeding speed and voltage: "gas shielded welding: wire feeding speed 10m / min, voltage 25V", regular expression: "gas shielded welding: wire feeding speed (\d+)m / min, voltage (\d+)V".
[0117] Exemplarily, check whether the manual welding current is a positive integer, such as 120; check whether the argon arc welding current is a positive integer, such as 80; check whether the gas shielded welding wire feeding speed is a positive integer, such as 10, and whether the voltage is a positive integer, such as 25.
[0118] In the above embodiment, by determining the task type from the control information, extracting the command parameters and verifying them, an accurate and safe control instruction can be generated. This process ensures the effectiveness and safety of the control instruction and can guide the electric welder to efficiently perform the specified welding task.
[0119] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0120] Based on the same inventive concept, the embodiment of the present application also provides a welding machine control device for implementing the welding machine control method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more welding machine control device embodiments provided below can refer to the limitations of the welding machine control method above, and will not be repeated here.
[0121] In an exemplary embodiment, Figure 4 As shown, a welding machine control device is provided, including: a receiving module 410, a filtering module 420, an identification module 430, an instruction generation module 440 and a control module 450, wherein:
[0122] The receiving module is used to receive the audio signal to be processed.
[0123] The filtering module is used to construct a target filter according to the audio signal to be processed, and use the target filter to filter the audio signal to be processed.
[0124] The recognition module is used to recognize the filtered audio signal to be processed to obtain voice information.
[0125] The instruction generation module is used to generate an electric welding machine control instruction according to the electric welding machine control information if the voice information includes the electric welding machine control information.
[0126] The control module is used to send the electric welder control instruction to the electric welder; the electric welder performs the welding task according to the electric welder control instruction.
[0127] In one embodiment, the filtering module includes:
[0128] The first calculation unit is used to substitute the audio signal to be processed into the initial filter to obtain reference audio information.
[0129] The filter construction unit is used to calculate the difference between the reference audio information and the target signal, and adjust the coefficient of the initial filter according to the difference to obtain the target filter.
[0130] In one embodiment, the filter construction unit comprises:
[0131] The difference calculation unit is used to calculate the difference between each target frame in the reference audio information and each target frame in the target signal to obtain a discrete difference data set.
[0132] The difference acquisition unit is used to accumulate and sum the absolute values of each discrete difference in the discrete difference data set to obtain the difference between the reference audio information and the target signal.
[0133] In one embodiment, the filter construction unit comprises:
[0134] The gradient calculation unit is used to calculate the adjustment gradient according to the difference and use the adjustment gradient to update the coefficient.
[0135] The coefficient updating unit is used to filter the audio signal to be processed using the initial filter after the coefficient is updated, obtain new reference audio information, and calculate the difference between the new reference audio information and the target signal. If the difference between the new reference audio information and the target signal does not meet the preset conditions, the step of updating the coefficient is executed until the difference between the new reference audio information and the target signal meets the preset conditions to obtain the target filter.
[0136] In one embodiment, the filter construction unit comprises:
[0137] The function calculation unit is used to calculate the mean square error of the difference and obtain the cost loss function.
[0138] The solving unit is used to derive the target variable in the cost loss function to obtain the coefficients of the initial filter.
[0139] In one embodiment, the identification module includes:
[0140] The audio recognition unit is used to extract features from the audio signal to be processed to obtain audio features.
[0141] The language recognition unit is used to input the audio features into a pre-trained acoustic model to obtain the phoneme probability distribution, and recognize the phoneme probability distribution through the language model to obtain the speech text.
[0142] In one embodiment, the above-mentioned device includes an audio recognition module, and the audio recognition module is used to train the acoustic model.
[0143] In one embodiment, the acoustic module comprises:
[0144] The first sample acquisition unit is used to acquire first sample data; the first sample data carries a voice tag.
[0145] The first prediction unit is used to input the first sample data into the first initial model to obtain the predicted text.
[0146] The first training unit is used to calculate a first target loss function according to the predicted text and the voice tag, and optimize the parameters of the first initial model using the first target loss function to obtain an acoustic model.
[0147] In one embodiment, the above-mentioned device includes a language recognition module, and the language recognition module is used to train a language model.
[0148] In one embodiment, the language recognition module includes:
[0149] The second sample acquisition unit acquires second sample data; the second sample data carries a text label.
[0150] The second remote unit is used to input the second sample data into the second initial model to obtain the predicted text.
[0151] The second training unit is used to calculate a second target loss function according to the predicted text and the text label, and optimize the parameters of the second initial model using the second target loss function to obtain a language model.
[0152] In one embodiment, the instruction generation module includes:
[0153] The type determination unit is used to determine the task type according to the control information and the preset mapping table.
[0154] The parameter extraction unit is used to extract command parameters from the control information through a preset regular expression.
[0155] The instruction verification unit is used to verify the command parameters and generate control instructions according to the command parameters and task type after the command parameters are successfully verified.
[0156] Each module in the above-mentioned welding machine control device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0157] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store audio signals to be processed. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a welding machine control method is implemented.
[0158] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0159] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: receiving an audio signal to be processed; constructing a target filter according to the audio signal to be processed, and filtering the audio signal to be processed using the target filter; recognizing the filtered audio signal to be processed to obtain voice information; if the voice information includes welding machine control information, generating a welding machine control instruction according to the welding machine control information; sending the welding machine control instruction to the welding machine; the welding machine is used to perform a welding task according to the welding machine control instruction.
[0160] In one embodiment, when the processor executes the computer program, the following steps are also implemented: substituting the audio signal to be processed into the initial filter to obtain reference audio information; calculating the difference between the reference audio information and the target signal, and calculating the coefficient of the initial filter based on the difference to obtain the target filter.
[0161] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the difference between each target frame in the reference audio information and each target frame in the target signal to obtain a discrete difference data set; accumulating and summing the absolute values of each discrete difference in the discrete difference data set to obtain the difference between the reference audio information and the target signal.
[0162] In one embodiment, when the processor executes the computer program, the following steps are also implemented: using the initial filter with updated coefficients to filter the audio signal to be processed to obtain new reference audio information, and calculating the difference between the new reference audio information and the target signal; if the difference between the new reference audio information and the target signal does not meet the preset conditions, executing the step of updating the coefficients until the difference between the new reference audio information and the target signal meets the preset conditions to obtain the target filter.
[0163] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the mean square error of the difference to obtain a cost loss function; and deriving the target variable in the cost loss function to obtain the coefficients of the initial filter.
[0164] In one embodiment, when the processor executes the computer program, the following steps are also implemented: feature extraction is performed on the audio signal to be processed to obtain audio features; the audio features are input into a pre-trained acoustic model to obtain a phoneme probability distribution, and the phoneme probability distribution is recognized through a language model to obtain speech text.
[0165] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining first sample data; the first sample data carries a voice tag; inputting the first sample data into a first initial model to obtain predicted phonemes; calculating a first target loss function based on the predicted phonemes and the voice tags, and using the first target loss function to optimize the parameters of the first initial model to obtain an acoustic model.
[0166] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining second sample data; the second sample data carries a text label; inputting the second sample data into a second initial model to obtain a predicted text; calculating a second target loss function based on the predicted text and the text label, and using the second target loss function to optimize the parameters of the second initial model to obtain a language model.
[0167] In one embodiment, when the processor executes the computer program, it also implements the following steps: determining the task type based on the control information and the preset mapping table; extracting the command parameters from the control information through a preset regular expression; verifying the command parameters, and after the command parameters are successfully verified, generating a control instruction based on the command parameters and the task type.
[0168] In one embodiment, the processor further implements the following steps when executing the computer program: the electric welder control information includes controlling one or more of the current of manual welding, the current of argon arc welding, the wire feeding speed and voltage of gas shielded welding.
[0169] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving an audio signal to be processed; constructing a target filter according to the audio signal to be processed, and using the target filter to filter the audio signal to be processed; recognizing the filtered audio signal to be processed to obtain voice information; if the voice information includes welding machine control information, generating a welding machine control instruction according to the welding machine control information; sending the welding machine control instruction to the welding machine; the welding machine is used to perform a welding task according to the welding machine control instruction.
[0170] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: substituting the audio signal to be processed into the initial filter to obtain reference audio information; calculating the difference between the reference audio information and the target signal, and calculating the coefficients of the initial filter based on the difference to obtain the target filter.
[0171] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: calculating the difference between each target frame in the reference audio information and each target frame in the target signal to obtain a discrete difference data set; accumulating and summing the absolute values of each discrete difference in the discrete difference data set to obtain the difference between the reference audio information and the target signal.
[0172] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the initial filter with updated coefficients to filter the audio signal to be processed to obtain new reference audio information, and calculating the difference between the new reference audio information and the target signal; if the difference between the new reference audio information and the target signal does not meet the preset conditions, executing the step of updating the coefficients until the difference between the new reference audio information and the target signal meets the preset conditions to obtain the target filter.
[0173] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the mean square error of the difference to obtain a cost loss function; and differentiating the target variable in the cost loss function to obtain the coefficients of the initial filter.
[0174] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: feature extraction is performed on the audio signal to be processed to obtain audio features; the audio features are input into a pre-trained acoustic model to obtain a phoneme probability distribution, and the phoneme probability distribution is recognized through a language model to obtain speech text.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining first sample data; the first sample data carries a voice tag; inputting the first sample data into a first initial model to obtain predicted phonemes; calculating a first target loss function based on the predicted phonemes and the voice tags, and using the first target loss function to optimize the parameters of the first initial model to obtain an acoustic model.
[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining second sample data; the second sample data carries a text label; inputting the second sample data into a second initial model to obtain a predicted text; calculating a second target loss function based on the predicted text and the text label, and using the second target loss function to optimize the parameters of the second initial model to obtain a language model.
[0177] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the task type based on the control information and the preset mapping table; extracting the command parameters from the control information through a preset regular expression; verifying the command parameters, and after the command parameters are successfully verified, generating a control instruction based on the command parameters and the task type.
[0178] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the electric welding machine control information includes controlling one or more of the current of manual welding, the current of argon arc welding, the wire feeding speed and voltage of gas shielded welding.
[0179] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: receiving an audio signal to be processed; constructing a target filter according to the audio signal to be processed, and using the target filter to filter the audio signal to be processed; recognizing the filtered audio signal to be processed to obtain voice information; if the voice information includes welding machine control information, generating a welding machine control instruction according to the welding machine control information; sending the welding machine control instruction to the welding machine; the welding machine is used to perform a welding task according to the welding machine control instruction.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: calculating the difference between each target frame in the reference audio information and each target frame in the target signal to obtain a discrete difference data set; accumulating and summing the absolute values of each discrete difference in the discrete difference data set to obtain the difference between the reference audio information and the target signal.
[0181] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the initial filter with updated coefficients to filter the audio signal to be processed to obtain new reference audio information, and calculating the difference between the new reference audio information and the target signal; if the difference between the new reference audio information and the target signal does not meet the preset conditions, executing the step of updating the coefficients until the difference between the new reference audio information and the target signal meets the preset conditions to obtain the target filter.
[0182] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the mean square error of the difference to obtain a cost loss function; and differentiating the target variable in the cost loss function to obtain the coefficients of the initial filter.
[0183] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: feature extraction is performed on the audio signal to be processed to obtain audio features; the audio features are input into a pre-trained acoustic model to obtain a phoneme probability distribution, and the phoneme probability distribution is recognized through a language model to obtain speech text.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining first sample data; the first sample data carries a voice tag; inputting the first sample data into a first initial model to obtain predicted phonemes; calculating a first target loss function based on the predicted phonemes and the voice tags, and using the first target loss function to optimize the parameters of the first initial model to obtain an acoustic model.
[0185] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining second sample data; the second sample data carries a text label; inputting the second sample data into a second initial model to obtain a predicted text; calculating a second target loss function based on the predicted text and the text label, and using the second target loss function to optimize the parameters of the second initial model to obtain a language model.
[0186] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the task type based on the control information and the preset mapping table; extracting the command parameters from the control information through a preset regular expression; verifying the command parameters, and after the command parameters are successfully verified, generating a control instruction based on the command parameters and the task type.
[0187] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the electric welding machine control information includes controlling one or more of the current of manual welding, the current of argon arc welding, the wire feeding speed and voltage of gas shielded welding.
[0188] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0189] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0190] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A welding machine control method, characterized in that: The method comprises: receiving an audio signal to be processed; Constructing a target filter according to the audio signal to be processed, and using the target filter to filter the audio signal to be processed; Recognizing the filtered audio signal to be processed to obtain voice information; If the voice information includes welding machine control information, generating welding machine control instructions according to the welding machine control information; The electric welder control instruction is sent to the electric welder; the electric welder is used to perform the welding task according to the electric welder control instruction.
2. The method according to claim 1, characterized in that The step of constructing a target filter according to the audio signal to be processed comprises: Substituting the audio signal to be processed into an initial filter to obtain reference audio information; The difference between the reference audio information and the target signal is calculated, and the coefficients of the initial filter are calculated according to the difference to obtain the target filter.
3. The method according to claim 2, characterized in that The audio signal to be processed and the target signal include a plurality of target frames; and the calculating the difference between the reference audio information and the target signal includes: Calculating the difference between each target frame in the reference audio information and each target frame in the target signal to obtain a discrete difference data set; The absolute values of the discrete differences in the discrete difference data set are accumulated and summed to obtain the difference between the reference audio information and the target signal.
4. The method according to claim 2, characterized in that: Calculating the coefficients of the initial filter according to the difference to obtain a target filter includes: Calculate an adjustment gradient according to the difference, and use the adjustment gradient to update the coefficient; The audio signal to be processed is filtered using the initial filter after the coefficient is updated to obtain the new reference audio information, and the difference between the new reference audio information and the target signal is calculated. If the difference between the new reference audio information and the target signal does not meet the preset conditions, the step of updating the coefficients is performed until the difference between the new reference audio information and the target signal meets the preset conditions to obtain the target filter.
5. The method according to claim 2, characterized in that: The step of calculating the coefficients of the initial filter according to the difference to obtain a target filter comprises: Calculate the mean square error of the difference to obtain a cost loss function; The target variable in the cost loss function is derived to obtain the coefficients of the initial filter.
6. The method according to claim 1, characterized in that The step of identifying the filtered audio signal to be processed to obtain voice information includes: Extracting features from the audio signal to be processed to obtain audio features; The audio features are input into a pre-trained acoustic model to obtain a phoneme probability distribution, and the phoneme probability distribution is recognized through a language model to obtain the speech text.
7. The method according to claim 6, characterized in that The training process of the acoustic model includes: Acquire first sample data; the first sample data carries a voice tag; Inputting the first sample data into a first initial model to obtain predicted phonemes; Calculating a first target loss function according to the predicted phonemes and the voice tags, and optimizing the parameters of the first initial model using the first target loss function to obtain the acoustic model; The training process of the language model includes: Acquire second sample data; the second sample data carries the text label; Inputting the second sample data into a second initial model to obtain a predicted text; A second objective loss function is calculated according to the predicted text and the text label, and the parameters of the second initial model are optimized using the second objective loss function to obtain the language model.
8. The method according to claim 1, characterized in that The generating a control instruction according to the control information comprises: Determine the task type according to the control information and the preset mapping table; Extracting command parameters from the control information by using a preset regular expression; The command parameters are verified, and after the command parameters are successfully verified, a control instruction is generated according to the command parameters and the task type.
9. The method according to claim 1, characterized in that: The electric welder control information includes one or more of controlling the current of manual welding, the current of argon arc welding, the wire feeding speed and voltage of gas shielded welding.
10. A welding machine control device, characterized in that: The device comprises: A receiving module, used for receiving an audio signal to be processed; A filtering module, used to construct a target filter according to the audio signal to be processed, and use the target filter to filter the audio signal to be processed; A recognition module, used for recognizing the filtered audio signal to be processed to obtain voice information; An instruction generating module, for generating an electric welding machine control instruction according to the electric welding machine control information if the voice information includes the electric welding machine control information; The control module is used to send the electric welder control instruction to the electric welder; the electric welder performs the welding task according to the electric welder control instruction.
