A method and device for counting the output of water heater tanks with model identification function
Using Hall current sensors and voltage sensors to detect data during the welding process, combined with industrial intelligence algorithms, the problem of counting errors and model identification during the welding process is solved, and accurate statistics and model identification of the output of the electric water heater liner are achieved. Improved statistical accuracy and efficiency.
Patent Information
- Application Number
- CN202111652004.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing technology cannot accurately count the output when welding the inner tank of the electric water heater. There are problems such as arc breakage and artificial interruption that lead to counting errors, and the output of different models of water heater tanks cannot be identified.
Hall current sensors and voltage sensors are used to detect the current and voltage data during the welding process. Through the Internet of Things decoding and shaping processing, combined with industrial intelligent algorithms, the status of the welding machine is determined and the total welding time is recorded, so as to realize the monitoring of various types of water heater tanks. Accurate statistics of production.
It achieves real-time and accurate counting of the welding process, reduces human errors, can accurately identify and count the output of various types of water heater tanks, and improves the accuracy and efficiency of statistics.
Smart Images

Figure CN114239790B
Abstract
Description
Technical Field
[0001] The invention relates to the field of monitoring, and in particular to a method and a device for counting the output of water heater tanks with a model identification function. Background Art
[0002] When producing related parts of electric water heaters, such as the inner tank of electric water heaters, it is necessary to count the output and identify the model of the inner tank of electric water heaters. The existing statistical method is to count through the PLC built into the welding machine. During the welding process, the PLC will send control commands to the welding machine and fixtures, such as the fixture closing, welding machine power on, welding power off, fixture closing, etc. After a complete working cycle, the PLC will regard it as a tank body, and then accumulate the daily production data, display the accumulated results on the external screen of the special machine, and the employees will copy and record the accumulated results every day.
[0003] However, the above-mentioned method of counting by PLC has the following problems: all tanks that have undergone a complete working cycle will be counted to account for the production, but in the actual welding process, there are situations such as arc breaking and artificial interruption of the working cycle. If the arc breaks during the welding process, the welding process will continue until the entire welding process is completed. In this way, the tanks with broken arcs during the welding process will be counted. After the tanks with broken arcs during the welding process are checked and discovered by the employees, they will be put back into the tooling and re-welded, which will cause the PLC to count repeatedly.
[0004] For another example, if after welding is completed, the worker manually interrupts the welding work cycle to check the welding quality or for other reasons, such as manually taking out the tank for inspection and then manually putting it back into the production line, the PLC will not count, but at this time, the welding has actually been completed, so an omission occurs.
[0005] In addition, different models of water heater tanks have different sizes and specifications. By counting the working cycles, only the total output of the line can be obtained, and it is impossible to accurately count the output of water heater tanks of various sizes and specifications. Summary of the invention
[0006] In order to solve the above technical problems, the present invention proposes a method and device for counting the production of water heater tanks with a model identification function. The method and device are used to solve the technical problems in the prior art that the water heater model cannot be identified and the water heater tank production cannot be accurately counted.
[0007] According to a first aspect of the present invention, a method for counting the output of water heater tanks with a model identification function is provided, the method comprising the following steps:
[0008] Step S101: A Hall current sensor and a voltage sensor are configured for the welding machine. The ring of the Hall current sensor is sleeved on the cable of the current output end of the welding machine. The Hall current sensor detects the current of the welding circuit of the welding machine. The voltage sensor is connected in parallel with the power supply of the welding machine to detect the voltage of the main circuit of the welding machine. The Hall current sensor and the voltage sensor simulate the detected data into a weak current analog signal, and the Internet of Things Gateway decodes the weak current analog signal to obtain current and voltage data. The decoded current data, voltage data, and gas flow data are used as the water heater tank welding process data, and the process data is time series data.
[0009] Step S102: dividing the process data of the water heater inner tank welding into a plurality of process data segments, performing shaping processing on the current and voltage time series data in each process data segment, and determining the welding machine state corresponding to each process data segment based on the processed current data and voltage data;
[0010] Step S103: setting variables F, S, and T, where F is used to mark whether the arc has been started, S is used to mark the arc starting time point, and T is used to mark the total welding time. The initial value of variable F is false, the initial value of S is -1, and the initial value of T is -1;
[0011] Step S104: determine whether the welding machine status corresponding to all process data segments has been counted, if so, proceed to step S106; if not, obtain the welding machine status corresponding to a process data segment that has not been counted in chronological order, and proceed to step S105;
[0012] Step S105: If the welding machine state corresponding to the process data segment that has not been counted is the arc starting welding stage, set the variable F to true, and set the variable S to the time point corresponding to the arc starting position in the process data segment; then proceed to step S104;
[0013] If the welding machine state corresponding to the process data segment that has not been counted is the standby state or the welding state, the variable value remains unchanged; go to step S104;
[0014] If the welding machine state corresponding to the process data segment that has not been counted is the arc-ending time period, if the value of the variable F is true, then the time point corresponding to the arc-ending position in the process data segment is obtained, and the difference between the time point corresponding to the arc-ending position and the variable S is used as the total welding time, and the variable T is set to the total welding time;
[0015] If the total welding time is less than 20 seconds, the total number of tanks is not counted and the process goes to step S103;
[0016] If the total welding time is greater than or equal to 20 seconds, the total number of tanks is increased by 1 in the database, the tank identification of the newly counted tank and the total welding time corresponding to the tank identification are recorded, and the process goes to step S103;
[0017] Step S106: Obtain all tank identifications recorded in the database and the total welding time corresponding to the tank identifications, and identify the tanks with a total welding time difference of less than 2 seconds as the same model of water heater tanks; count and display the number of water heater tanks of each model and the identifications of each model of water heater tanks.
[0018] According to a second aspect of the present invention, a water heater tank production statistics device with a model identification function is provided, the device comprising:
[0019] Data acquisition module: configured as a welding machine equipped with a Hall current sensor and a voltage sensor, the ring of the Hall current sensor is sleeved on the cable of the current output end of the welding machine, and the Hall current sensor detects the current of the welding circuit of the welding machine; the voltage sensor is connected in parallel with the power supply of the welding machine to detect the voltage of the main circuit of the welding machine; the Hall current sensor and the voltage sensor simulate the detected data into a weak current analog signal, and the weak current analog signal is decoded by the Internet of Things Gateway to obtain current and voltage data; the decoded current data, voltage data, and gas flow data are used as the water heater tank welding process data, and the process data is time series data;
[0020] A welding machine state determination module: configured to divide the process data of the water heater inner tank welding into a plurality of process data segments, perform shaping processing on the current and voltage time series data in each process data segment, and determine the welding machine state corresponding to each process data segment based on the processed current data and voltage data;
[0021] Initialization module: configured to set variables F, S, and T. F is used to mark whether the arc has been started, S is used to mark the arc starting time point, and T is used to mark the total welding time. The initial value of variable F is false, the initial value of S is -1, and the initial value of T is -1.
[0022] Judgment module: configured to judge whether the welding machine status corresponding to all process data segments has been counted, if so, trigger the statistics module; if not, obtain the welding machine status corresponding to a process data segment that has not been counted in chronological order, and trigger the status statistics module;
[0023] State statistics module: if the welding machine state corresponding to the process data segment that has not been counted is the arc starting welding stage, the variable F is set to true, and the variable S is set to the time point corresponding to the arc starting position in the process data segment; trigger the judgment module;
[0024] If the welding machine state corresponding to the process data segment that has not been counted is the standby state or the welding state, the variable value remains unchanged; triggering the judgment module;
[0025] If the welding machine state corresponding to the process data segment that has not been counted is the arc-ending time period, if the value of the variable F is true, then the time point corresponding to the arc-ending position in the process data segment is obtained, and the difference between the time point corresponding to the arc-ending position and the variable S is used as the total welding time, and the variable T is set to the total welding time;
[0026] If the total welding time is less than 20 seconds, the total number of tanks will not be counted and the initialization module will be triggered;
[0027] If the total welding time is greater than or equal to 20 seconds, the total number of tanks is increased by 1 in the database, the tank identification of the newly counted tank and the total welding time corresponding to the tank identification are recorded, and the initialization module is triggered;
[0028] Statistics module: configured to obtain all tank identifications recorded in the database and the total welding time corresponding to the tank identifications, and identify tanks with a total welding time difference of less than 2 seconds as water heater tanks of the same model; count and display the number of water heater tanks of each model and the identifications of each model of water heater tanks.
[0029] According to a third aspect of the present invention, there is provided a water heater tank production statistics system with a model identification function, comprising:
[0030] A processor, which is used to execute multiple instructions;
[0031] A memory for storing a plurality of instructions;
[0032] The plurality of instructions are used to be stored by the memory, and loaded and executed by the processor to implement the water heater tank production statistics method with model identification function as described above.
[0033] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the water heater tank production statistics method with model identification function as described above.
[0034] According to the above scheme of the present invention, the method of the present invention collects data of arc signals during welding and combines industrial intelligent algorithms to design a water heater tank production statistics method with model identification function, which can accurately count the production of water heater tanks of various models, so as to correctly calculate the production line capacity and realize the refined management of factory materials. It provides an unmanned, real-time statistical counting scheme for on-site arc welding quality inspection, which makes up for the low accuracy of the existing technology, does not require workers to record manually, and reduces the workload of workers while improving the counting accuracy.
[0035] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention, and the present invention is described by providing the following accompanying drawings. In the accompanying drawings:
[0037] Figure 1 A schematic diagram of a flow chart of a method for counting the output of water heater tanks with a model identification function according to an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a data acquisition device according to an embodiment of the present invention.
[0039] Reference numerals:
[0040] 1: Industrial router; 2: Voltage sensor; 3: Current sensor; 4: Edge computing gateway; 5: Welding gun DETAILED DESCRIPTION
[0041] First combine Figure 1 The following is a flow chart of a method for counting the output of water heater tanks with a model identification function according to an embodiment of the present invention. Figure 1-Figure 2 As shown, the method comprises the following steps:
[0042] Step S101: A Hall current sensor and a voltage sensor are configured for the welding machine. The ring of the Hall current sensor is sleeved on the cable of the current output end of the welding machine. The Hall current sensor detects the current of the welding circuit of the welding machine. The voltage sensor is connected in parallel with the power supply of the welding machine to detect the voltage of the main circuit of the welding machine. The Hall current sensor and the voltage sensor simulate the detected data into weak current analog signals, and the weak current signals are decoded by the Internet of Things Gateway to obtain current and voltage data. The decoded current data, voltage data, and gas flow data are used as the water heater tank welding process data, and the process data is time series data.
[0043] Step S102: dividing the process data of the water heater inner tank welding into a plurality of process data segments, performing shaping processing on the current and voltage time series data in each process data segment, and determining the welding machine state corresponding to each process data segment based on the processed current data and voltage data;
[0044] Step S103: setting variables F, S, and T, where F is used to mark whether the arc has been started, S is used to mark the arc starting time point, and T is used to mark the total welding time. The initial value of variable F is false, the initial value of S is -1, and the initial value of T is -1;
[0045] Step S104: determine whether the welding machine status corresponding to all process data segments has been counted, if so, proceed to step S106; if not, obtain the welding machine status corresponding to a process data segment that has not been counted in chronological order, and proceed to step S105;
[0046] Step S105: If the welding machine state corresponding to the process data segment that has not been counted is the arc starting welding stage, set the variable F to true, and set the variable S to the time point corresponding to the arc starting position in the process data segment; then proceed to step S104;
[0047] If the welding machine state corresponding to the process data segment that has not been counted is the standby state or the welding state, the variable value remains unchanged; go to step S104;
[0048] If the welding machine state corresponding to the process data segment that has not been counted is the arc-ending time period, if the value of the variable F is true, then the time point corresponding to the arc-ending position in the process data segment is obtained, and the difference between the time point corresponding to the arc-ending position and the variable S is used as the total welding time, and the variable T is set to the total welding time;
[0049] If the total welding time is less than 20 seconds, the total number of tanks is not counted and the process goes to step S103;
[0050] If the total welding time is greater than or equal to 20 seconds, the total number of tanks is increased by 1 in the database, the tank identification of the newly counted tank and the total welding time corresponding to the tank identification are recorded, and the process goes to step S103;
[0051] Step S106: Obtain all tank identifications recorded in the database and the total welding time corresponding to the tank identifications, and identify the tanks with a total welding time difference of less than 2 seconds as the same model of water heater tanks; count and display the number of water heater tanks of each model and the identifications of each model of water heater tanks.
[0052] The step S101, as Figure 2As shown, the welding machine is equipped with a Hall current sensor and a voltage sensor. The input ring of the Hall current sensor is sleeved on the cable ring at the current output end of the welding machine. The Hall current sensor detects the current of the circuit of the welding machine; the voltage sensor is connected in parallel with the power supply of the welding machine to detect the voltage of the main circuit of the welding machine. In this embodiment, the Hall current sensor is a current sensor used to detect the current of the circuit of the welding machine. The installation method of the voltage sensor is to connect in parallel to the positive and negative poles of the power supply, and measure the main circuit voltage by using the principle that the voltage of the parallel circuit is equal to the voltage of the main circuit. In this embodiment, the main parameters of the current sensor are: the diameter of the welding gun power cable is 20mm, the input current is 0-500A, and the output signal is 0-5V. The main parameters of the voltage sensor are: input voltage 0-100V, output signal: 0-5V.
[0053] The sensor simulates the measured data into a 0-5V weak current signal and transmits it to the IoT gateway. The IoT gateway decodes the received simulated weak current signal and outputs the final measured current and voltage data.
[0054] In this embodiment, the welding machine is equipped with a Hall sensor and a voltage sensor to simulate the detected data into a weak current signal, and the Internet of Things gateway decodes the weak current signal. The decoded current and voltage data can collect the arc signal during the welding process.
[0055] The step S102: dividing the process data of the water heater inner tank welding into a plurality of process data segments, performing shaping processing on the current and voltage time series data in each process data segment, and determining the welding machine state corresponding to each process data segment based on the processed current data and voltage data, including:
[0056] Step S1021: Divide the process data of the water heater inner tank welding into a plurality of process data segments in units of 2 seconds;
[0057] Step S1022: performing shaping processing on the current and voltage time series data in each process data segment; the shaping processing refers to:
[0058] Mean filtering is used to cut peaks and fill valleys in the original current and voltage time series data in the process data segment. The specific method is to evenly select multiple sampling points for the process data segment, take three adjacent sampling points as a group, and divide the sampling points of the process data segment into multiple groups; for each group, the average value of the three sampling points in the group is calculated, and the original current and voltage time series data in the process data segment corresponding to the group is replaced by the average value of the three sampling points in the group.
[0059] After shaping, the current and voltage time series data in each process data segment are shaped into square waves.
[0060] Step S1023: For each shaped process data segment, the following operations are performed:
[0061] Obtain the current and voltage time series data after the shaping process of the process data segment, add the processed current and voltage time series data corresponding to the same time point, use the addition result as the electrical signal, and obtain the electrical signal sequence in time sequence;
[0062] For each electrical signal in the electrical signal sequence, it is determined whether the electrical signal is greater than a welding threshold, and if it is greater than or equal to the welding threshold, the electrical signal is updated to 1; if it is less than the welding threshold, the electrical signal is updated to 0;
[0063] After all the electrical signals of the electrical signal sequence are processed, the updated electrical signals are spliced in time order to generate updated time series data of the process data segment, wherein the updated time series data is time series data composed of 0 and 1; the updated time series data of the process data segment is derived, that is, the result of the derivation from the position where 0 rises to 1 is 1, and the result of the derivation from the position where 1 falls to 0 is -1; the results of the derivation are summed to obtain the final summation result of the process data segment;
[0064] If the final summation result of the process data segment is 0, it is determined that the welding machine state corresponding to the process data segment is the standby state or the welding state; if the final summation result of the process data segment is greater than or equal to 1, it is determined that the welding machine state corresponding to the process data segment is the arc starting welding stage; if the final summation result of the process data segment is less than or equal to -1, it is determined that the welding machine state corresponding to the process data segment is the arc ending time period.
[0065] The principle of taking the derivative and then summing the derivative results is as follows: the electrical signal corresponding to the addition result before the derivative is a square wave. Since the electrical signal corresponding to the addition of the current and voltage timing data is 1 during welding, and the electrical signal corresponding to the addition of the current and voltage timing data is 0 when not welding; the result of the derivative from the position where it rises from 0 to 1 is 1, and the result of the derivative from the position where it drops from 1 to 0 is -1. The results of the derivatives of the electrical signals corresponding to the addition of the remaining current and voltage timing data that are constant at 0 or constant at 1 are all 0. The derivative results are summed. If the sum result is greater than or equal to 1, it means that this section of electrical signal data has a point that rises from 0 to 1 (i.e., the arc starting point). If the sum result is less than or equal to -1, it means that this section of data has a point that drops from 1 to 0 (i.e., the arc ending point). This result can be used to identify whether the process data section is arc ending or arc starting.
[0066] In this embodiment, the duration corresponding to each process data segment is 2 seconds. There are multiple time points within 2 seconds. Therefore, by obtaining the processed current data and voltage data of the process data segment, the processed current data and voltage data corresponding to the same time point can be added.
[0067] In this embodiment, the welding threshold value is 10, that is, when the sum of the current and the voltage is greater than 10, it is considered that welding is in progress, otherwise it is considered that the welding is in progress. Generally, the current and voltage are very small when not welding. During normal welding, the current can reach 200A and the voltage can reach about 30V. Through data statistics, it is determined that the welding threshold value is 10.
[0068] In this embodiment, both current and voltage are indicators that reflect whether the welding machine is working. In theory, any data can be used to determine whether the welding machine is working. However, in the actual welding process, there is a short period of time when the current is 0 and the voltage is not 0, or when the voltage is 0 and the current is not 0. In order to avoid misjudgment, the current and voltage time series data are shaped and the processed current and voltage time series data corresponding to the same time point are added for judgment.
[0069] In this embodiment, in step S105, if the total welding time is greater than 20 seconds, it is considered that a complete water heater tank is welded, and the water heater tank type is classified according to the total welding time, and tanks with a total welding time difference of less than 2 seconds are identified as the same model of water heater tank. The purpose of judging the total welding time is to prevent a short-time trial welding from being identified as a complete water heater tank.
[0070] In this embodiment, in step S106, the database can store data for a certain period of time, aggregate and count the data in units of days, and display the statistical results in real time.
[0071] The embodiment of the present invention further provides a water heater tank production statistics device with a model identification function, the device comprising:
[0072] Data acquisition module: configured as a welding machine equipped with a Hall current sensor and a voltage sensor, the ring of the Hall current sensor is sleeved on the cable of the current output end of the welding machine, and the Hall current sensor detects the current of the welding circuit of the welding machine; the voltage sensor is connected in parallel with the power supply of the welding machine to detect the voltage of the main circuit of the welding machine; the Hall current sensor and the voltage sensor simulate the detected data into a weak current analog signal, and the weak current analog signal is decoded by the Internet of Things Gateway to obtain current and voltage data; the decoded current data, voltage data, and gas flow data are used as the water heater tank welding process data, and the process data is time series data;
[0073] A welding machine state determination module: configured to divide the process data of the water heater inner tank welding into a plurality of process data segments, perform shaping processing on the current and voltage time series data in each process data segment, and determine the welding machine state corresponding to each process data segment based on the processed current data and voltage data;
[0074] Initialization module: configured to set variables F, S, and T. F is used to mark whether the arc has been started, S is used to mark the arc starting time point, and T is used to mark the total welding time. The initial value of variable F is false, the initial value of S is -1, and the initial value of T is -1.
[0075] Judgment module: configured to judge whether the welding machine status corresponding to all process data segments has been counted, if so, trigger the statistics module; if not, obtain the welding machine status corresponding to a process data segment that has not been counted in chronological order, and trigger the status statistics module;
[0076] State statistics module: if the welding machine state corresponding to the process data segment that has not been counted is the arc starting welding stage, the variable F is set to true, and the variable S is set to the time point corresponding to the arc starting position in the process data segment; trigger the judgment module;
[0077] If the welding machine state corresponding to the process data segment that has not been counted is the standby state or the welding state, the variable value remains unchanged; triggering the judgment module;
[0078] If the welding machine state corresponding to the process data segment that has not been counted is the arc-ending time period, if the value of the variable F is true, then the time point corresponding to the arc-ending position in the process data segment is obtained, and the difference between the time point corresponding to the arc-ending position and the variable S is used as the total welding time, and the variable T is set to the total welding time;
[0079] If the total welding time is less than 20 seconds, the total number of tanks will not be counted and the initialization module will be triggered;
[0080] If the total welding time is greater than or equal to 20 seconds, the total number of tanks is increased by 1 in the database, the tank identification of the newly counted tank and the total welding time corresponding to the tank identification are recorded, and the initialization module is triggered;
[0081] Statistics module: configured to obtain all tank identifications recorded in the database and the total welding time corresponding to the tank identifications, and identify tanks with a total welding time difference of less than 2 seconds as water heater tanks of the same model; count and display the number of water heater tanks of each model and the identifications of each model of water heater tanks.
[0082] The embodiment of the present invention further provides a water heater tank production statistics system with a model identification function, including:
[0083] A processor, which is used to execute multiple instructions;
[0084] A memory for storing a plurality of instructions;
[0085] The plurality of instructions are used to be stored by the memory, and loaded and executed by the processor to implement the water heater tank production statistics method with model identification function as described above.
[0086] The embodiment of the present invention further provides a computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the water heater tank production statistics method with model identification function as described above.
[0087] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0088] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0090] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0091] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a physical server, or a network cloud server, etc., and the Ubuntu operating system must be installed) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0092] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for counting the output of water heater tanks with a model identification function, characterized in that: The method comprises the following steps: Step S101: A Hall current sensor and a voltage sensor are configured for the welding machine. The ring of the Hall current sensor is sleeved on the cable of the current output end of the welding machine. The Hall current sensor detects the current of the welding circuit of the welding machine. The voltage sensor is connected in parallel with the power supply of the welding machine to detect the voltage of the main circuit of the welding machine. The Hall current sensor and the voltage sensor simulate the detected data into a weak current analog signal, and the Internet of Things Gateway decodes the weak current analog signal to obtain current and voltage data. The decoded current data, voltage data, and gas flow data are used as the water heater tank welding process data, and the process data is time series data. Step S102: dividing the process data of the water heater inner tank welding into a plurality of process data segments, performing shaping processing on the current and voltage time series data in each process data segment, and determining the welding machine state corresponding to each process data segment based on the processed current data and voltage data; Step S103: setting variables F, S, and T, where F is used to mark whether the arc has been started, S is used to mark the arc starting time point, and T is used to mark the total welding time. The initial value of variable F is false, the initial value of S is -1, and the initial value of T is -1; Step S104: determine whether the welding machine status corresponding to all process data segments has been counted, if so, proceed to step S106; if not, obtain the welding machine status corresponding to a process data segment that has not been counted in chronological order, and proceed to step S105; Step S105: If the welding machine state corresponding to the process data segment that has not been counted is the arc starting welding stage, set the variable F to true, and set the variable S to the time point corresponding to the arc starting position in the process data segment; then proceed to step S104; If the welding machine state corresponding to the process data segment that has not been counted is the standby state or the welding state, the variable value remains unchanged; go to step S104; If the welding machine state corresponding to the process data segment that has not been counted is the arc-ending time period, if the value of the variable F is true, then the time point corresponding to the arc-ending position in the process data segment is obtained, and the difference between the time point corresponding to the arc-ending position and the variable S is used as the total welding time, and the variable T is set to the total welding time; If the total welding time is less than 20 seconds, the total number of tanks is not counted and the process goes to step S103; If the total welding time is greater than or equal to 20 seconds, the total number of tanks is increased by 1 in the database, the tank identification of the newly counted tank and the total welding time corresponding to the tank identification are recorded, and the process goes to step S103; Step S106: Obtain all tank identifications recorded in the database and the total welding time corresponding to the tank identifications, and identify the tanks with a total welding time difference of less than 2 seconds as the same model of water heater tanks; count and display the number of water heater tanks of each model and the identifications of each model of water heater tanks.
2. The method according to claim 1, characterized in that The step S102: dividing the process data of the water heater inner tank welding into a plurality of process data segments, performing shaping processing on the current and voltage time series data in each process data segment, and determining the welding machine state corresponding to each process data segment based on the processed current data and voltage data, including: Step S1021: Divide the process data of the water heater inner tank welding into a plurality of process data segments in units of 2 seconds; Step S1022: performing shaping processing on the current and voltage time series data in each process data segment; the shaping processing refers to: Mean filtering is used to cut peaks and fill valleys in the original current and voltage time series data in the process data segment. Specifically, multiple sampling points are evenly selected for the process data segment, and three adjacent sampling points are taken as a group, and the sampling points of the process data segment are divided into multiple groups; for each group, the average value of the three sampling points in the group is calculated, and the original current and voltage time series data in the process data segment corresponding to the group are replaced with the average value of the three sampling points in the group; Step S1023: For each shaped process data segment, the following operations are performed: Obtain the current and voltage time series data after the shaping process of the process data segment, add the processed current and voltage time series data corresponding to the same time point, use the addition result as the electrical signal, and obtain the electrical signal sequence in time sequence; For each electrical signal in the electrical signal sequence, it is determined whether the electrical signal is greater than a welding threshold, and if it is greater than or equal to the welding threshold, the electrical signal is updated to 1; if it is less than the welding threshold, the electrical signal is updated to 0; After all the electrical signals of the electrical signal sequence are processed, the updated electrical signals are spliced in time order to generate updated time series data of the process data segment, wherein the updated time series data is time series data composed of 0 and 1; the updated time series data of the process data segment is derived, that is, the result of the derivation from the position where 0 rises to 1 is 1, and the result of the derivation from the position where 1 falls to 0 is -1; the results of the derivation are summed to obtain the final summation result of the process data segment; If the final summation result of the process data segment is 0, it is determined that the welding machine state corresponding to the process data segment is the standby state or the welding state; if the final summation result of the process data segment is greater than or equal to 1, it is determined that the welding machine state corresponding to the process data segment is the arc starting welding stage; if the final summation result of the process data segment is less than or equal to -1, it is determined that the welding machine state corresponding to the process data segment is the arc ending time period.
3. The method according to claim 2, characterized in that The welding threshold value is 10, that is, when the sum of the current and the voltage is greater than 10, it is considered that welding is in progress, otherwise it is considered that the machine is in standby.
4. The method according to claim 3, characterized in that In step S106, the database can store data for a certain period of time, aggregate and count the data in units of days, and display the statistical results in real time.
5. A water heater tank production statistics device with model identification function, characterized in that: The device comprises: Data acquisition module: configured as a welding machine equipped with a Hall current sensor and a voltage sensor, the ring of the Hall current sensor is sleeved on the cable of the current output end of the welding machine, and the Hall current sensor detects the current of the welding circuit of the welding machine; the voltage sensor is connected in parallel with the power supply of the welding machine to detect the voltage of the main circuit of the welding machine; the Hall current sensor and the voltage sensor simulate the detected data into a weak current analog signal, and the weak current analog signal is decoded by the Internet of Things Gateway to obtain current and voltage data; the decoded current data, voltage data, and gas flow data are used as the water heater tank welding process data, and the process data is time series data; A welding machine state determination module: configured to divide the process data of the water heater inner tank welding into a plurality of process data segments, perform shaping processing on the current and voltage time series data in each process data segment, and determine the welding machine state corresponding to each process data segment based on the processed current data and voltage data; Initialization module: configured to set variables F, S, and T. F is used to mark whether the arc has been started, S is used to mark the arc starting time point, and T is used to mark the total welding time. The initial value of variable F is false, the initial value of S is -1, and the initial value of T is -1. Judgment module: configured to judge whether the welding machine status corresponding to all process data segments has been counted, if so, trigger the statistics module; if not, obtain the welding machine status corresponding to a process data segment that has not been counted in chronological order, and trigger the status statistics module; State statistics module: if the welding machine state corresponding to the process data segment that has not been counted is the arc starting welding stage, the variable F is set to true, and the variable S is set to the time point corresponding to the arc starting position in the process data segment; trigger the judgment module; If the welding machine state corresponding to the process data segment that has not been counted is the standby state or the welding state, the variable value remains unchanged; triggering the judgment module; If the welding machine state corresponding to the process data segment that has not been counted is the arc-ending time period, if the value of the variable F is true, then the time point corresponding to the arc-ending position in the process data segment is obtained, and the difference between the time point corresponding to the arc-ending position and the variable S is used as the total welding time, and the variable T is set to the total welding time; If the total welding time is less than 20 seconds, the total number of tanks will not be counted and the initialization module will be triggered; If the total welding time is greater than or equal to 20 seconds, the total number of tanks is increased by 1 in the database, the tank identification of the newly counted tank and the total welding time corresponding to the tank identification are recorded, and the initialization module is triggered; Statistics module: configured to obtain all tank identifications recorded in the database and the total welding time corresponding to the tank identifications, and identify tanks with a total welding time difference of less than 2 seconds as water heater tanks of the same model; count and display the number of water heater tanks of each model and the identifications of each model of water heater tanks.
6. The device according to claim 5, characterized in that The welding machine state determination module comprises: A sub-division module: configured to divide the process data of the water heater inner tank welding into a plurality of process data segments in units of 2 seconds; The shaping processing submodule is configured to perform shaping processing on the current and voltage time series data in each process data segment; the shaping processing refers to: Mean filtering is used to cut peaks and fill valleys in the original current and voltage time series data in the process data segment. Specifically, multiple sampling points are evenly selected for the process data segment, and three adjacent sampling points are taken as a group, and the sampling points of the process data segment are divided into multiple groups; for each group, the average value of the three sampling points in the group is calculated, and the original current and voltage time series data in the process data segment corresponding to the group are replaced with the average value of the three sampling points in the group; Signal processing submodule: configured to perform the following operations on each shaped process data segment: Obtain the current and voltage time series data after the shaping process of the process data segment, add the processed current and voltage time series data corresponding to the same time point, use the addition result as the electrical signal, and obtain the electrical signal sequence in time sequence; For each electrical signal in the electrical signal sequence, it is determined whether the electrical signal is greater than a welding threshold, and if it is greater than or equal to the welding threshold, the electrical signal is updated to 1; if it is less than the welding threshold, the electrical signal is updated to 0; After all the electrical signals of the electrical signal sequence are processed, the updated electrical signals are spliced in time order to generate updated time series data of the process data segment, wherein the updated time series data is time series data composed of 0 and 1; the updated time series data of the process data segment is derived, that is, the result of the derivation from the position where 0 rises to 1 is 1, and the result of the derivation from the position where 1 falls to 0 is -1; the results of the derivation are summed to obtain the final summation result of the process data segment; If the final summation result of the process data segment is 0, it is determined that the welding machine state corresponding to the process data segment is the standby state or the welding state; if the final summation result of the process data segment is greater than or equal to 1, it is determined that the welding machine state corresponding to the process data segment is the arc starting welding stage; if the final summation result of the process data segment is less than or equal to -1, it is determined that the welding machine state corresponding to the process data segment is the arc ending time period.
7. The device according to claim 6, characterized in that The welding threshold value is 10, that is, when the sum of the current and the voltage is greater than 10, it is considered that welding is in progress, otherwise it is considered that the machine is in standby.
8. The device according to claim 7, characterized in that The statistical module and the database can store data for a certain period of time, aggregate and count the data in units of days, and display the statistical results in real time.
9. A computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the method as claimed in any one of claims 1 to 4.
