Intelligent query method, system, device and storage medium for welding parameters based on Text2SQL
Through the intelligent query method of welding parameters based on Text2SQL, the problem of uneven skill levels of welding technicians is solved, and intelligent query of welding parameters is realized, technical threshold is lowered, work efficiency is improved, and industry professionalism is improved.
Patent Information
- Application Number
- CN202411561315.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The skill levels of welding technicians are uneven, and most of them rely on personal experience rather than standardized operations, resulting in unstable welding quality, inefficient efficiency, and problems of false labels and insufficient safety.
The intelligent query method of welding parameters based on Text2SQL is adopted, and through the steps of speech conversion, format cleaning, entity extraction, query dictionary mapping and generation of SQL queries, intelligent query of welding parameters is realized, which lowers the technical threshold and improves work efficiency.
It lowers the technical threshold for welding workers, improves work efficiency, reduces training costs, enhances user experience, and promotes the improvement of internal communication and professionalism in the industry.
Smart Images

Figure CN119088826B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and more specifically, relates to a welding parameter intelligent query method, system, device and storage medium based on Text2SQL. Background Art
[0002] As the welding industry becomes increasingly important in modern industrial production, its application areas continue to expand, covering key industries such as construction, manufacturing, shipbuilding, automobiles, and aerospace. In recent years, the electric welding industry has developed rapidly, and the introduction of external automation and robotics technology has greatly improved welding efficiency and quality. However, the high cost of robots limits their widespread application, and traditional welding equipment still has significant deficiencies in terms of ease of operation and intelligence.
[0003] At present, the welding and cutting industry is facing multiple challenges. On the one hand, the continuous emergence of new welding materials and advanced processes, especially the widespread application of high-strength, lightweight materials such as aluminum alloys and titanium alloys, has put forward higher requirements for welding processes. On the other hand, changes in market demand, such as the lightweight trend in the automotive manufacturing industry, large-scale infrastructure construction, and the rapid development of the new energy field, have all posed new challenges to welding technology.
[0004] However, the fragmentation and inconsistency of the existing industry knowledge system has led to uneven skill levels among welding technicians, most of whom rely on personal experience rather than standardized operations. This not only affects welding quality and reduces welding efficiency, but also breeds industry chaos, such as false labeling and insufficient safety.
[0005] To this end, the present invention provides a Text2SQL welding parameter intelligent query method, system, device and storage medium. Summary of the invention
[0006] In view of the above-mentioned problems existing in the existing technology, the purpose of the present invention is to provide a welding parameter intelligent query method, system, device and storage medium based on Text2SQL, which reduces the technical threshold of welding workers, improves work efficiency, and provides strong support for the intelligent development of the welding and cutting industry.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] A welding parameter intelligent query method based on Text2SQL includes the following steps:
[0009] S1: Voice conversion: Users use voice input to query content on the front end, and the front end calls the back end's voice-to-text interface to input the converted text into the back end of the Text2SQL technology;
[0010] S2: Format cleaning: The converted text input needs to be format cleaned: the Chinese characters in the text input are unified into Arabic numerals, and then the noise words and redundant information in the text input are removed to ensure the standardization of the text after format cleaning;
[0011] S3: Entity extraction: Use the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding to perform named entity recognition (NER) on the normalized text to extract entities of welding materials, welding thickness and welding methods from the text;
[0012] S4: Query dictionary mapping: Map the extracted entities to the corresponding standard professional terms in the welding field in the welding parameter database through the query dictionary to ensure that the SQL query statement can be correctly generated and executed;
[0013] S5: Generate SQL query: according to the mapped standard professional terms in the welding field, use the predefined SQL template, fill the standard professional terms in the welding field into the template to generate the final SQL query statement;
[0014] S6: Query database: Send a query request to the welding parameter database through the generated SQL query statement, and the welding parameter database returns the query result, which includes all the required welding parameters.
[0015] As a further preferred technical solution of the present invention, the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding not only supports Chinese text tasks, but also supports text tasks in other languages. The bidirectional attention neural network model (BERT) supporting Chinese text tasks adopts the pre-trained model BERT-base-Chinese, and correspondingly, the bidirectional attention neural network model (BERT) supporting text tasks in other languages adopts the pre-trained model of the corresponding language.
[0016] As a further preferred technical solution of the present invention, the operation process of the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding includes the following key steps:
[0017] First, the bidirectional attention neural network model (BERT) segments the normalized text and converts each word into a word embedding vector. The bidirectional attention neural network model (BERT) adds a special [CLS] tag at the beginning of the normalized text to capture the semantic information of the entire sentence, and adds a special [SEP] tag at the end of the normalized text to distinguish different normalized texts. Then, the bidirectional attention neural network model (BERT) uses the bidirectional encoder in the Transformer architecture to process the word embedding vector through the self-attention mechanism and the feedforward neural network.
[0018] In the named entity recognition task, the bidirectional attention neural network model (BERT) associates each word in the normalized text with its corresponding entity label. Through training, the model can learn the characteristics of different entities and accurately identify and extract entities in the welding field in practical applications.
[0019] As a further preferred technical solution of the present invention, the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding first collects and organizes the welding parameters in the welding parameter database during the training phase, and the welding parameters include welding materials, welding thickness and welding methods, and then constructs training data according to the formulated query template or the non-formulated query template, that is, the input text of the bidirectional attention neural network model (BERT) during the training phase and the entities that need to be recognized by the model.
[0020] A welding parameter intelligent query system based on Text2SQL, the welding parameter intelligent query system based on Text2SQL implements the welding parameter intelligent query method based on Text2SQL, the welding parameter intelligent query system based on Text2SQL includes a front end displayed to users for browsing and a back end integrated with Text2SQL technology, the back end integrated with Text2SQL technology consists of a voice conversion module, a format cleaning module, an entity extraction module, a spoken dictionary mapping module and a welding parameter database module;
[0021] The voice conversion module is used to complete step S1: voice conversion;
[0022] The format cleaning module is used to complete step S2: format cleaning;
[0023] The entity extraction module is used to complete step S3: entity extraction;
[0024] The spoken language dictionary mapping module and the welding parameter database module are used to cooperate to complete step S4: query dictionary mapping, step S5: generate SQL query and step S6: query database.
[0025] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the intelligent query method for welding parameters based on Text2SQL is implemented.
[0026] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the welding parameter intelligent query method based on Text2SQL is implemented.
[0027] As described above, the welding parameter intelligent query method, system, device and storage medium based on Text2SQL provided by the present invention have the following beneficial effects:
[0028] 1. Lower the technical threshold and promote the popularization of skills: This invention innovatively combines speech recognition, Text2SQL technology with the welding field, proposes a welding parameter intelligent query method based on Text2SQL, and creates a welding parameter intelligent query system and equipment based on Text2SQL. This system and equipment significantly lower the technical threshold for welding workers and on-site managers to use data query tools, making it easy for users who are not familiar with programming or SQL syntax to get started. This change not only promotes the rapid popularization of welding skills, but also effectively shortens the learning curve of novice welders and improves overall work efficiency.
[0029] 2. Improve work efficiency and reduce training costs: The application of this invention enables welders to check and use in actual work scenarios. They only need to input voice commands to quickly obtain ideal welding parameters. This instant feedback mechanism greatly improves work efficiency and reduces duplication of work and rework caused by improper parameter adjustment. At the same time, it lowers the technical threshold, and companies no longer need to invest a lot of resources in comprehensive theoretical training, thereby effectively reducing training costs.
[0030] 3. Enhance user experience and adapt to diverse needs: The present invention fully considers the differences in voice accents and dialects of users in different regions, increases the ability to recognize multiple accents and dialects, and ensures that users around the world can get a good user experience. In addition, it also supports multiple language recognition, such as English, further broadening the user range. This highly personalized design enables the present invention to better adapt to the diverse needs of different users and enhance user satisfaction and loyalty.
[0031] 4. Promote communication within the industry and improve professionalism: In welding and cutting scenarios, technicians are more inclined to communicate in a more free oral manner due to busy work and habit. The present invention solves the problem of "formulaic oral narration" and allows technicians to perform voice input in a more natural and industry-specific way. The present invention can not only accurately identify the key points in user sentences, but also understand and identify professional terms and idioms within the industry, such as "two thicks". This function not only improves the level of intelligence in the welding industry, but also helps promote communication within the industry and improve overall professionalism.
[0032] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0034] Figure 1 It is a flowchart of a Text2SQL welding parameter intelligent query method of the present invention;
[0035] Figure 2 This is an example diagram of the application of the Text2SQL technology of the present invention;
[0036] Figure 3 It is a schematic diagram of the operation of the bidirectional attention neural network model (BERT) supporting Chinese text tasks of the present invention;
[0037] Figure 4 Schematic diagram of the operation of the bidirectional attention neural network model (BERT) supporting English text tasks of the present invention. DETAILED DESCRIPTION
[0038] The following is a description of the implementation of the present invention by means of specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.
[0039] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions that the present invention can be implemented, so they have no substantial technical significance. Any modification of the structure, change in the proportional relationship, or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the effects that the present invention can produce and the purposes that can be achieved. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" quoted in this specification are only for the convenience of description, and are not used to limit the scope of the implementation of the present invention. The change or adjustment of the relative relationship should also be regarded as the scope of the implementation of the present invention without substantial changes in the technical content. The specific structure can be described with reference to the drawings of the patent application.
[0040] The present invention provides a Text2SQL welding parameter intelligent query method, system, device and storage medium. The Text2SQL welding parameter intelligent query method comprises the following steps:
[0041] S1: Voice conversion: Users use voice input to query content on the front end, and the front end calls the back end's voice-to-text interface to input the converted text into the back end of the Text2SQL technology;
[0042] S2: Format cleaning: The converted text input needs to be format cleaned: the Chinese characters in the text input are unified into Arabic numerals, and then the noise words and redundant information in the text input are removed to ensure the standardization of the text after format cleaning;
[0043] S3: Entity extraction: Use the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding to perform named entity recognition (NER) on the normalized text to extract entities of welding materials, welding thickness and welding methods from the text;
[0044] S4: Query dictionary mapping: Map the extracted entities to the corresponding standard professional terms in the welding field in the welding parameter database through the query dictionary. For example, "aluminum silicon 5" corresponds to "Al-Si-5" in the welding parameter database to ensure that the SQL query statement can be correctly generated and executed;
[0045] S5: Generate SQL query: according to the mapped standard professional terms in the welding field, use the predefined SQL template, fill the standard professional terms in the welding field into the template to generate the final SQL query statement;
[0046] S6: Query database: Send a query request to the welding parameter database through the generated SQL query statement, and the welding parameter database returns the query result, which includes all the required welding parameters.
[0047] The backend of the integrated Text2SQL technology uses the Text2SQL technology in natural language processing (NLP) to query the welding parameters in the welding parameter database using natural language. The Text2SQL technology is designed to convert natural language queries into structured query language (SQL), so that users can interact with the database through natural language without having to master complex SQL syntax, which greatly reduces the threshold for database queries. Examples of the application of the Text2SQL technology are as follows: Figure 2 shown.
[0048] The core of the backend that integrates the Text2SQL technology uses a bidirectional attention neural network model (BERT) that has been fine-tuned in the welding field to perform named entity recognition (NER) on input natural language queries. The bidirectional attention neural network model (BERT) has powerful language understanding capabilities by extracting the contextual representation of bidirectional attention. It can accurately identify entities in specific fields from natural language, and the neural network model BERT is supervised and fine-tuned on welding field data to adapt to parameter query scenarios in the welding field.
[0049] The bidirectional attention neural network model (BERT) fine-tuned in the welding field not only supports Chinese text tasks, but also supports text tasks in other languages. The bidirectional attention neural network model (BERT) supporting Chinese text tasks uses the pre-trained model BERT-base-Chinese, such as Figure 3 As shown in the figure, the bidirectional attention neural network model (BERT) that supports text tasks in other languages adopts the pre-trained model of the corresponding language. For example, in order to support the welding usage scenarios in English-speaking areas, the bidirectional attention neural network model (BERT) also constructs English welding field fine-tuning data according to the habits of English queries, and adopts the pre-trained model BERT-base-uncased dedicated to English text, as shown in the figure. Figure 4 shown.
[0050] It should be noted that:
[0051] The pre-trained model BERT-base-Chinese or the pre-trained model BERT-base-uncased used by the bidirectional attention neural network model (BERT) that supports Chinese text tasks both contain 12 layers of Transformer encoders, each of which is composed of a multi-head self-attention mechanism and a feedforward neural network; each layer contains 12 self-attention heads, which enable the model to pay attention to the words before and after it when calculating the representation of a word, thereby capturing richer contextual information; the hidden layer size of each layer is 768 dimensions, and the embedded representation of all words is processed by multiple layers of encoders to become a 768-dimensional vector; the pre-trained model BERT-base-Chinese or the pre-trained model BERT-base-uncased has a total of about 110 million trainable parameters, which are continuously adjusted during the training process to adapt to queries in the field of electric welding.
[0052] The operation process of the bidirectional attention neural network model (BERT) fine-tuned in the welding field includes the following key steps:
[0053] First, the bidirectional attention neural network model (BERT) segments the normalized text and converts each word into a word embedding vector. The bidirectional attention neural network model (BERT) adds a special [CLS] tag at the beginning of the normalized text to capture the semantic information of the entire sentence, and adds a special [SEP] tag at the end of the normalized text to distinguish different normalized texts. Then, the bidirectional attention neural network model (BERT) uses the bidirectional encoder in the Transformer architecture to process the word embedding vector through the self-attention mechanism and the feedforward neural network.
[0054] In the named entity recognition task, the bidirectional attention neural network model (BERT) associates each word in the normalized text with its corresponding entity label. Through training, the model can learn the characteristics of different entities and accurately identify and extract entities in the welding field in practical applications.
[0055] During the training phase, the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding first collects and organizes the welding parameters in the welding parameter database, which include welding materials, welding thickness and welding methods, and then constructs training data based on a formulated query template (the query parameter name is explicitly provided) or a non-formulated query template (a spoken expression, in which the query parameter name is not directly provided), i.e., the input text of the bidirectional attention neural network model (BERT) during the training phase and the entities that need to be recognized by the model.
[0056] It should be noted that: during the training phase, the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding uses non-formulaic query templates to train entities to recognize, which is applicable to the phenomenon that the industry uses oral communication with a high degree of freedom. Through step S4: querying dictionary mapping, step S5: generating SQL queries, and step S6: querying the database, the welding parameters of standard professional terms in the field of electric welding are output, solving the problem of "formulaic oral communication".
[0057] A welding parameter intelligent query system based on Text2SQL, the welding parameter intelligent query system based on Text2SQL implements the welding parameter intelligent query method based on Text2SQL, the welding parameter intelligent query system based on Text2SQL includes a front end displayed to users for browsing and a back end integrated with Text2SQL technology, the back end integrated with Text2SQL technology consists of a voice conversion module, a format cleaning module, an entity extraction module, a spoken dictionary mapping module and a welding parameter database module;
[0058] The voice conversion module is used to complete step S1: voice conversion;
[0059] The format cleaning module is used to complete step S2: format cleaning;
[0060] The entity extraction module is used to complete step S3: entity extraction;
[0061] The spoken language dictionary mapping module and the welding parameter database module are used to cooperate to complete step S4: query dictionary mapping, step S5: generate SQL query and step S6: query database.
[0062] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the intelligent query method for welding parameters based on Text2SQL is implemented.
[0063] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the welding parameter intelligent query method based on Text2SQL is implemented.
[0064] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A welding parameter intelligent query method based on Text2SQL, characterized in that: The following steps are involved: S1: Voice conversion: Users use voice input to query content on the front end, and the front end calls the voice-to-text interface of the back end to input the converted text into the back end of the integrated Text2SQL technology; S2: Format cleaning: The converted text input needs to be format cleaned: the Chinese characters in the text input are unified into Arabic numerals, and then the noise words and redundant information in the text input are removed to ensure the standardization of the text after format cleaning; S3: Entity extraction: Use the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding to perform named entity recognition (NER) on the normalized text to extract the entities of welding materials, welding thickness and welding methods from the text; S4: Query dictionary mapping: Map the extracted entities to the corresponding standard professional terms in the welding field in the welding parameter database through the query dictionary to ensure that the SQL query statement can be correctly generated and executed; S5: Generate SQL query: according to the mapped standard professional terms in the welding field, use the predefined SQL template, fill the standard professional terms in the welding field into the template to generate the final SQL query statement; S6: query database: send a query request to the welding parameter database through the generated SQL query statement, and the welding parameter database returns the query result, which includes all the required welding parameters; The operation process of the bidirectional attention neural network model (BERT) fine-tuned in the welding field includes the following key steps: First, the bidirectional attention neural network model (BERT) segments the normalized text and converts each word into a word embedding vector. The bidirectional attention neural network model (BERT) adds a special [CLS] tag at the beginning of the normalized text to capture the semantic information of the entire sentence, and adds a special [SEP] tag at the end of the normalized text to distinguish different normalized texts. Then, the bidirectional attention neural network model (BERT) uses the bidirectional encoder in the Transformer architecture to process the word embedding vector through the self-attention mechanism and the feedforward neural network. The bidirectional attention neural network model (BERT) associates each word in the normalized text with its corresponding entity label in the named entity recognition task. Through training, the model can learn the characteristics of different entities and accurately identify and extract entities in the welding field in practical applications. During the training phase, the bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding first collects and organizes the welding parameters in the welding parameter database, where the welding parameters include welding materials, welding thickness and welding methods, and then constructs training data based on a formulated query template or a non-formulated query template, i.e., the input text of the bidirectional attention neural network model (BERT) during the training phase and the entities that need to be recognized by the model.
2. According to claim 1, a welding parameter intelligent query method based on Text2SQL is characterized in that: The bidirectional attention neural network model (BERT) fine-tuned in the field of electric welding not only supports Chinese text tasks, but also supports text tasks in other languages. The bidirectional attention neural network model (BERT) supporting Chinese text tasks adopts the pre-trained model BERT-base-Chinese, and correspondingly, the bidirectional attention neural network model (BERT) supporting text tasks in other languages adopts the pre-trained model of the corresponding language.
3. A welding parameter intelligent query system based on Text2SQL, characterized in that: The welding parameter intelligent query system based on Text2SQL implements a welding parameter intelligent query method based on Text2SQL as described in any one of claims 1 to 2, and the welding parameter intelligent query system based on Text2SQL includes a front end displayed to users for browsing and a back end integrated with Text2SQL technology, and the back end integrated with Text2SQL technology is composed of a voice conversion module, a format cleaning module, an entity extraction module, a spoken dictionary mapping module and a welding parameter database module; The voice conversion module is used to complete step S1: voice conversion; The format cleaning module is used to complete step S2: format cleaning; The entity extraction module is used to complete step S3: entity extraction; The spoken language dictionary mapping module and the welding parameter database module are used to cooperate to complete step S4: query dictionary mapping, step S5: generate SQL query and step S6: query database.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the welding parameter intelligent query method based on Text2SQL described in any one of claims 1 to 2 is implemented.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the welding parameter intelligent query method based on Text2SQL as described in any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Chinese query table selection method based on attention mechanism and BiLSTM
CN117743363A
Large model fine tuning method of track domain knowledge base and scene adaptation system
CN118606439A