Equipment pairing method and device, electronic equipment and storage medium
By obtaining and matching the processing parameters of the equipment to be monitored and the sensors, the equipment pairing relationship is automatically established, and the problem of long-term and low accuracy of equipment pairing in the prior art is solved, and efficient and accurate equipment pairing is achieved.
Patent Information
- Application Number
- CN202411998977.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, the correspondence between configuring and maintaining sensors and devices that need monitoring takes a long time, and the accuracy and efficiency are low.
By obtaining the first processing parameters of the device to be monitored and the parameter signals detected by the sensor, processing and analysis are performed to obtain the second processing parameters, matching the first processing parameters and the second processing parameters to determine the equipment pairing relationship, and establishing the pairing relationship through the equipment identification.
An automated equipment pairing process is realized, saving manual configuration time and improving pairing accuracy and efficiency.
Smart Images

Figure CN119996974A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation control technology, and in particular to a device pairing method, apparatus, electronic device and storage medium. Background Art
[0002] In industrial applications, related equipment can be detected through sensors. In order to accurately know which device's data each sensor collects, and to facilitate troubleshooting and optimize the production process, it is crucial to obtain the corresponding relationship between the sensor and the monitored equipment.
[0003] In related technologies, sensors are usually not directly connected to the internal network (intranet) of enterprises, factories, etc., while the monitored devices and edge devices used to collect sensor data are usually in the intranet environment, which makes it impossible to directly establish the corresponding relationship between sensors and monitored devices through network protocols or automatic discovery mechanisms. In this case, manual intervention is required to manually maintain this corresponding relationship by creating tables or configuration files. In scenarios involving a large number of sensors and devices, it takes a long time and the maintenance accuracy and efficiency of the corresponding relationship are low. Summary of the invention
[0004] In view of this, the present application provides a device pairing method, apparatus, electronic device and storage medium to solve the problem in the related art that it takes a long time to configure and maintain the correspondence between sensors and devices to be monitored, and the maintenance accuracy and efficiency of the correspondence are low.
[0005] A first aspect of an embodiment of the present application provides a device pairing method, which includes: obtaining first processing parameters of multiple monitored devices; obtaining parameter signals detected by a sensor, and processing and analyzing the parameter signals to obtain second processing parameters; if any first processing parameter matches the second processing parameter, determining the monitored device corresponding to any first processing parameter as a first target device; if the number of the first target devices is equal to a preset number, obtaining a first device identifier of the first target device and a sensor identifier of the sensor, and establishing a pairing relationship between the first device identifier and the sensor identifier.
[0006] In some embodiments, the method also includes: if the number of the first target devices is greater than the preset number, obtaining the third processing parameter of the first target device and the fourth processing parameter obtained according to the parameter signal detected by the sensor; if any third processing parameter matches the fourth processing parameter, determining the first target device corresponding to any third processing parameter as the second target device; if the number of the second target devices is equal to the preset number, obtaining the second device identifier of the second target device, and establishing a pairing relationship between the second device identifier and the sensor identifier.
[0007] In some embodiments, the first processing parameter includes a first processing time, and the second processing parameter includes a second processing time. The method further includes: if a time error between the first processing time and the second processing time is less than a preset error, determining that the first processing parameter matches the second processing parameter.
[0008] In some embodiments, the method further includes: taking a statistical value of a difference between the first processing time and the second processing time as the time error; or taking an average value of a difference between the first processing time and the second processing time as the time error.
[0009] In some embodiments, when the monitored equipment performs multiple processing processes, the first processing time includes a first start time and a first end time of each processing process, and the second processing time includes a second start time and a second end time of each processing process. The method also includes: for each processing process, calculating the first absolute difference between the corresponding first start time and the second start time, and the second absolute difference between the first end time and the second end time; determining the sum of the first absolute difference and the second absolute difference as a third absolute difference; based on the multiple processing processes, calculating the cumulative value of all third absolute differences to obtain the difference statistical value; or based on the multiple processing processes, calculating the average value of all third absolute differences to obtain the difference average value.
[0010] In some embodiments, the method further includes: performing waveform conversion on the parameter signal detected by the sensor; and determining the fourth processing parameter based on the converted parameter signal.
[0011] In some embodiments, if the third processing parameter and the fourth processing parameter both include frequency parameters, the method further includes: if the absolute difference between the frequency parameter in the third processing parameter and the frequency parameter in the fourth processing parameter is less than a preset parameter error, determining that the third processing parameter matches the fourth processing parameter.
[0012] The second aspect of an embodiment of the present application provides a device pairing device, which includes: an acquisition module, used to acquire first processing parameters of multiple monitored devices; the acquisition module is also used to acquire parameter signals detected by sensors, and process and analyze the parameter signals to obtain second processing parameters; a judgment module, used to determine the monitored device corresponding to any first processing parameter as a first target device if any first processing parameter matches the second processing parameter; a pairing module, used to acquire the first device identifier of the first target device and the sensor identifier of the sensor if the number of the first target devices is equal to a preset number, and establish a pairing relationship between the first device identifier and the sensor identifier.
[0013] In some embodiments, the acquisition module is also used to acquire the third processing parameter of the first target device and the fourth processing parameter obtained according to the parameter signal detected by the sensor when the number of the first target devices is greater than the preset number; the judgment module is also used to determine the first target device corresponding to any third processing parameter as the second target device if any third processing parameter matches the fourth processing parameter; the pairing module is also used to acquire the second device identifier of the second target device if the number of the second target devices is equal to the preset number, and establish a pairing relationship between the second device identifier and the sensor identifier.
[0014] A third aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned device pairing method when executing the computer-readable instructions.
[0015] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the above-mentioned device pairing method is implemented.
[0016] In a device pairing method provided by an embodiment of the present application, the first processing parameters of multiple monitored devices and the parameter signals detected by the sensor are obtained respectively, and the parameter signals are processed and analyzed to obtain the second processing parameters. By comparing the second processing parameter with the first processing parameter, when any first processing parameter matches the second processing parameter and the number of monitored devices corresponding to any first processing parameter is equal to the preset number, the pairing relationship between the monitored device corresponding to any first processing parameter and the sensor corresponding to the second processing parameter is determined, and the pairing relationship between the first target device and the sensor is represented by the first device identifier of the first target device and the sensor identifier of the sensor. With this method, there is no need to confirm the corresponding relationship between the sensor and the monitored device by labeling and manually building a table, and no additional configuration is required. It only needs to rely on the original data acquisition system. After the sensor is installed, it can be automatically paired to the monitored device; there is no need to additionally operate the monitored device or let the monitored device perform additional test processes to pair it, which can save the time spent on device pairing between the sensor and the monitored device, and effectively improve the accuracy and efficiency of device pairing between the sensor and the monitored device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application 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 drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 It is a structural diagram of a device pairing system provided in an embodiment of the present application.
[0019] Figure 2 It is another structural schematic diagram of the device pairing system provided in an embodiment of the present application.
[0020] Figure 3 It is a structural diagram of sensor identification provided in an embodiment of the present application.
[0021] Figure 4 This is a structural example diagram of a device pairing system provided in an embodiment of the present application.
[0022] Figure 5 It is a flow chart for implementing the device pairing method provided in the embodiment of the present application.
[0023] Figure 6 It is a structural diagram of a device pairing apparatus provided in an embodiment of the present application.
[0024] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.
[0028] For sensors without network interfaces, such as sensors with serial ports or other analog signals, there is usually no Internet Protocol (IP) address or Media Access Control (MAC) address that can be used as the unique identifier of the sensor. In this case, in the process of establishing the pairing relationship between the sensor and the device to be monitored, the sensor can usually only be labeled and maintained manually. In scenarios involving a large number of sensors and devices, this takes a long time and the maintenance accuracy and efficiency of the corresponding relationship are low. In addition, labels are prone to contamination and loss, which will further affect the maintenance efficiency and accuracy of the pairing relationship between the sensor and the device to be monitored.
[0029] In order to solve the above problems, an embodiment of the present application provides a device pairing method, which uses the online interface of the edge device to identify the serial communication type sensor, and identifies the sensor based on the online interface of the edge device. The electronic device obtains the parameter signal detected by the sensor and the first processing parameter of the monitored device respectively, and infers the pairing relationship between the sensor and the monitored device through the causal relationship between the signal analysis and the first processing parameter. Using this method, after the sensor is installed on the monitored device, there is no need to manually maintain which monitored device the sensor is installed on in the intranet, and when the production line needs to be rerouted and the installation position of the sensor needs to be changed, there is no need to adjust any settings. When deploying a large number of sensors, it can effectively save the time of manual configuration, and there is no need to write and run additional test processes or use any trigger commands, which effectively improves the efficiency and accuracy of device pairing.
[0030] The device pairing method provided in the embodiment of the present application can be applied to a device pairing system. Figure 1 As shown, it is a schematic diagram of the structure of the device pairing system 100 provided in the embodiment of the present application. Figure 1 As shown, the device pairing system 100 includes an electronic device 10, a collection device 20, an edge device 30, a device to be monitored 40, and a sensor 50. The electronic device 10, the collection device 20, the edge device 30, and the device to be monitored 40 are communicatively connected. The sensor 50 is installed on the device to be monitored 40, and the sensor 50 is communicatively connected to the edge device 30.
[0031] like Figure 1 and Figure 2As shown, in the process of implementing device pairing, the acquisition device 20 acquires the first processing parameters of multiple monitored devices 40, and sends the first processing parameters to the electronic device 10. The sensor 50 detects the parameter signal of the monitored device 40, and sends the parameter signal to the edge device 30. The edge device 30 receives the parameter signal and sends the parameter signal to the electronic device 10. The electronic device 10 receives the parameter signal, analyzes the parameter signal, and obtains the second processing parameter. When any first processing parameter matches the second processing parameter, the electronic device 10 determines the monitored device 40 corresponding to any first processing parameter as the first target device, and when the number of first target devices is equal to the preset number, the electronic device 10 obtains the first device identifier of the first target device and the sensor identifier of the sensor 50, and establishes a pairing relationship between the first device identifier and the sensor identifier.
[0032] In this embodiment, the electronic device 10 is further used to record and store the pairing relationship between the sensor 50 and the device to be monitored 40 .
[0033] In this embodiment, one edge device 30 can be connected to multiple sensors 50 to collect parameter signals of multiple sensors 50. Multiple sensors 50 can be connected to different serial ports of the edge device 30. For example Figure 3 As shown, the edge device 30 includes a control module 31, a collection module 32 and a serial communication (COM) port. The COM ports include COM1 and COM2. Two sensors 50 are connected to the edge device 30 through COM1 and COM2 respectively. Among them, the control module 31 in the edge device 30 is used to process the commands of the electronic device 10, control the collection module 32, and send the data collected by the sensor 50 to the electronic device 10. The collection module 32 is used to monitor different COM ports to identify the sensor 50 connected to the COM port and receive the data collected by the sensor 50.
[0034] In this embodiment, the IP address of the edge device and the COM serial port number corresponding to the sensor 50 can be used as the identification of the sensor 50, for example: 10.123.134.145-COM1, which is used to identify the sensor 50 connected to the edge device 30 through COM1.
[0035] In this embodiment, the communication connection mode includes wired communication connection and wireless communication connection.
[0036] The device pairing method provided in the embodiment of the present application can be applied to an edge management system, and the edge management system is integrated in the electronic device 10. The electronic device 10 can be any one or more of a server, a computer and the like.
[0037] In some embodiments, the acquisition device 20 is a device for collecting processing data (such as processing parameters, processing sequence, tool change process, etc.) of the monitored device 40. The acquisition device 20 may integrate one or more systems such as a prognostics health management (PHM) system, a supervisory control and data acquisition (SCADA) system, and a shop floor control (SFC) system. The present application does not limit the specific type of the acquisition device 20.
[0038] In this embodiment, the edge device 30 may be a device such as a gateway. The device to be monitored 40 may be a computer numerical control (CNC) machine or other device that needs to be installed with a sensor 50, which is not limited in the embodiment of the present application. The sensor 50 includes but is not limited to a vibration sensor 50, any time series sensor 50, such as a vibration, sound, force, acceleration sensor 50, etc. The present application does not limit the type of the sensor 50.
[0039] Figures 1 to 3 The scenarios shown are only illustrative examples, and the device pairing system 100 provided in the present application may also include other scenarios. For example, in some scenarios, the device pairing system 100 may include an electronic device 10, a collection device 20, a device to be monitored 40 and a sensor 50, but does not include an edge device 30. In some scenarios, the sensor 50 and the edge device 30 can be integrated into a smart device; in some scenarios, the electronic device 10 can collect the first processing parameter of the device to be monitored 40. In other scenarios, the device pairing system 100 may also include other devices. The embodiments of the present application do not limit the specific scenarios of the device pairing system 100.
[0040] The device pairing method provided in the embodiment of the present application can be applied in the production process, for example, to establish a pairing relationship between a vibration sensor and a CNC machine, and can also be extended to establish a corresponding relationship between sensors and other types of equipment when sensors of various time series are installed on other types of equipment for use. The embodiment of the present application is not limited.
[0041] Take the establishment of a pairing relationship between a vibration sensor and a CNC machine as an example. Figure 4 , is a structural example diagram of a device pairing system 100 provided in an embodiment of the present application. Among them, the electronic device 10 is integrated with an edge management system, and the acquisition device 20 is integrated with a PHM system. Figure 4As shown, the gateway is used as the edge device 30, the CNC device is used as the monitored device 40, and the sensor is a vibration sensor. The vibration sensor is connected to the acquisition module 32 in the gateway through the serial port, and different vibration sensors are connected to different acquisition modules 32. The acquisition module 32 is bound to the serial port and connected to the vibration sensor connected to the corresponding serial port in a one-to-one manner.
[0042] In the process of pairing the CNC device with the vibration sensor, the acquisition device 20 acquires the first processing parameters of multiple CNC devices through the PHM system, and sends the first processing parameters to the electronic device 10. The sensor detects the parameter signal of the device to be monitored 40, and sends the parameter signal to the edge device 30. The acquisition module 32 in the edge device 30 monitors the vibration sensor corresponding to the corresponding serial port and receives the parameter signal sent by the vibration sensor. The control module 31 in the edge device 30 obtains the parameter signal from the acquisition module 32 and sends the sensor parameter signal to the electronic device 10. The electronic device 10 receives the parameter signal, analyzes the parameter signal, and obtains the second processing parameter. When any first processing parameter matches the second processing parameter, the electronic device 10 determines the CNC device corresponding to any first processing parameter as the first target device, and when the number of the first target devices is equal to the preset number, the electronic device 10 obtains the first device identifier of the first target device and the sensor identifier of the vibration sensor, and establishes a pairing relationship between the first device identifier and the sensor identifier.
[0043] In this embodiment, if Figure 4 As shown, the gateway may also include a CNC acquisition module 33 for acquiring device information of CNC devices, such as device status.
[0044] See also Figure 5 The figure is a flowchart of the device pairing method provided in the embodiment of the present application. The method is applied to electronic devices. The embodiment of the present application is applied to the method in Figure 1 The electronic device 10 in FIG. 1 is used as an example for explanation. The method includes the following steps.
[0045] S11: Acquire first processing parameters of multiple devices to be monitored.
[0046] In this embodiment, the first processing parameters may include the start time and end time of a single processing, speed parameters, the number of tool switching during processing, etc. The first processing parameters may be used to guide the equipment operation, process adjustment and quality control of the equipment to be monitored during the production process.
[0047] In some embodiments, if a system for collecting processing data of the equipment to be monitored (eg, a PHM system, a SCADA system) is integrated in the electronic device, the electronic device may collect first processing parameters of a plurality of equipment to be monitored.
[0048] In other embodiments, the electronic device may also receive first processing parameters of multiple devices to be monitored collected by the collection device.
[0049] S12: Acquire the parameter signal detected by the sensor, and process and analyze the parameter signal to obtain the second processing parameter.
[0050] In this embodiment, the second processing parameter may include the start time and end time of the processing, etc. The second processing parameter may be used to guide the equipment operation, process adjustment and quality control of the equipment to be monitored during the production process.
[0051] In this embodiment, the sensor can use the piezoelectric effect, thermoelectric effect, photoelectric effect, magnetoelectric effect and other principles to convert the parameters of non-electrical quantities into parameter signals (i.e., electrical signals), and send the parameter signals to the edge device. The edge device receives the parameter signals and sends the parameter signals to the electronic device.
[0052] In some embodiments, after receiving the parameter signal, the electronic device may pre-process the parameter signal, such as signal amplification, filtering, analog-to-digital conversion (converting continuously changing analog signals into discrete digital signals), time synchronization, etc., to ensure the accuracy and stability of the signal, and facilitate subsequent processing and analysis.
[0053] In some embodiments, the electronic device analyzes the parameter signal, which may include time domain analysis of the parameter signal (e.g., calculation of statistical characteristics such as mean, variance, peak, etc.), frequency domain analysis (e.g., revealing the frequency components of the signal through methods such as Fourier transform), and more complex signal processing techniques, such as wavelet analysis, principal component analysis, etc., to deeply understand the signal characteristics of the parameter signal.
[0054] In some embodiments, the electronic device can further derive and calculate the second processing parameter based on the analysis result of the parameter signal in combination with a preset threshold, historical data comparison, machine learning algorithm, etc.
[0055] S13: If any of the first processing parameters matches the second processing parameter, the device to be monitored corresponding to any of the first processing parameters is determined as a first target device.
[0056] In this embodiment, if any first processing parameter is the same as the second processing parameter or the parameter values are close or similar, it is determined that any first processing parameter matches the second processing parameter. In this case, it means that the monitored device corresponding to the second processing parameter may be paired with the sensor corresponding to the first processing parameter, and the sensor corresponding to the first processing parameter may be installed on the monitored device corresponding to the second processing parameter.
[0057] In some embodiments, if any of the first processing parameters is neither the same as nor close to or similar to the second processing parameter, it is determined that any of the first processing parameters is not matched with the second processing parameter.
[0058] In some embodiments of the present application, the first processing parameter includes a first processing time, and the second processing parameter includes a second processing time. If the time error between the first processing time and the second processing time is less than a preset error, it is determined that the first processing parameter matches the second processing parameter.
[0059] In some embodiments, the time error between the first processing time and the second processing time is less than the preset error, indicating that the time error between the first processing time and the second processing time is within the allowable error range. In this case, the electronic device can determine that the first processing parameter matches the second processing parameter.
[0060] In some embodiments, the electronic device may calculate the time error by calculating the statistical value of the difference between the first processing time and the second processing time during the multiple processing processes performed by the monitored device. Alternatively, the electronic device may calculate the time error by calculating the average value of the difference between the first processing time and the second processing time during the multiple processing processes performed by the monitored device. The specific method of calculating the time error between the first processing time and the second processing time is not limited in the embodiments of the present application.
[0061] In some embodiments of the present application, when the monitored device performs multiple processing processes, the first processing time includes the first start time and the first end time of each processing process, and the second processing time includes the second start time and the second end time of each processing process. The electronic device can calculate the difference statistics between the first processing time and the second processing time in the following manner: for each processing process, calculate the first absolute difference between the corresponding first start time and the second start time, and the second absolute difference between the first end time and the second end time; determine the sum of the first absolute difference and the second absolute difference as the third absolute difference; based on multiple processing processes, calculate the cumulative value of all third absolute differences to obtain the difference statistics.
[0062] In some embodiments, the first processing time includes a first start time and a first end time of a single processing of the device to be monitored. The second processing time includes a second start time and a second end time of the single processing detected by the sensor.
[0063] When the difference statistics between the first processing time and the second processing time are used as the time error between the first processing time and the second processing time, the electronic device can set the corresponding preset error as the first error. If the difference statistics are less than the first error, it means that the first processing time and the second processing time corresponding to the multiple processing processes are relatively close, so it is determined that the first processing parameter matches the second processing parameter.
[0064] In some embodiments, the first error is generally different between single processing and multiple processing, and the first error can be calibrated based on processing time data of historical processing, experience values, industry standards, etc.
[0065] In other embodiments, the electronic device may determine the first error by performing statistical analysis on the processing time data of the monitored device during multiple processing processes. For example, the electronic device obtains the statistical value of the difference between the first processing time and the second processing time during five processing processes as the time error between the first processing time and the second processing time. Accordingly, the electronic device may obtain the processing time data of multiple groups of processing processes, each group of processing processes including five processing processes. The electronic device calculates the statistical value of the difference for each group of processing processes. The electronic device may perform data analysis based on the statistical value of the difference corresponding to the multiple groups of processing processes to determine the first error.
[0066] In other embodiments, the electronic device may also determine the first error in other ways. The present application does not limit the specific way of determining the first error.
[0067] In some embodiments, in order to improve the matching accuracy, the electronic device may obtain the first processing time and the second processing time corresponding to the multiple processing processes, and calculate the time error (such as the difference statistic) between the first processing time and the second processing time corresponding to the multiple processing processes. If the time error (such as the difference statistic) is less than the first error, it means that the first processing time and the second processing time corresponding to the multiple processing processes are relatively close, so that it is determined that the first processing parameter matches the second processing parameter.
[0068] In some embodiments, the set of first target devices may be determined according to the following formula.
[0069] .
[0070] Wherein, M represents the set of first target devices; Represents the set of all the equipment to be processed that needs to be compared; Indicates The first starting time of the equipment to be processed in the i-th processing process; :Indicates the equipment to be processed The first end time during the i-th processing; Indicates the equipment to be processed During the i-th processing, the second start time of sensor detection, Indicates the equipment to be processed The second end time of sensor detection during the i-th processing; N represents the number of comparisons; i represents a variable; represents the first error; Indicates the equipment to be processed During the i-th processing, the first absolute difference between the corresponding first start time and the second start time; Indicates the equipment to be processed During the i-th processing, the second absolute difference between the corresponding first end time and the second end time; Indicates the equipment to be processed During the i-th processing, the corresponding third absolute difference; It represents the statistical value of the difference between the first processing time and the second processing time corresponding to the equipment m to be processed.
[0071] In some embodiments of the present application, when the monitored device performs multiple processing processes, the first processing time includes the first start time and the first end time of each processing process, and the second processing time includes the second start time and the second end time of each processing process. The electronic device can calculate the difference statistics between the first processing time and the second processing time in the following manner: for each processing process, calculate the first absolute difference between the corresponding first start time and the second start time, and the second absolute difference between the first end time and the second end time; determine the sum of the first absolute difference and the second absolute difference as the third absolute difference; based on multiple processing processes, calculate the average value of all third absolute differences to obtain the difference average value.
[0072] In some embodiments, the first processing time includes a first start time and a first end time of a single processing of the monitored device. The second processing time includes a second start time and a second end time of the single processing obtained according to the sensor detection parameter signal.
[0073] When the statistical value of the difference between the first processing time and the second processing time is used as the time error between the first processing time and the second processing time, the electronic device can set the corresponding preset error as the second error. If the average value of the difference is less than the second error, it means that the time error between the first processing time and the second processing time corresponding to the multiple processing processes is within the allowable error range, so that it is determined that the first processing parameter matches the second processing parameter.
[0074] In some embodiments, the second error may be user-defined, or may be calibrated based on historical processing time data, empirical values, industry standards, etc. The present application does not limit the specific setting of the second error.
[0075] In other embodiments, the time error between the first processing time and the second processing time may be evaluated in other ways. The embodiment of the present application does not limit the way of time error. For example, the electronic device may also calculate the time error between the first processing time and the second processing time by calculating the time ratio between the first processing time and the second processing time.
[0076] For example, in each processing process, the electronic device calculates a first ratio between the first start time and the second start time and calculates a second ratio between the first end time and the second end time. The electronic device uses the sum of the first ratio and the second ratio as the third ratio. The electronic device can calculate the average value of all third ratios in multiple processing processes to obtain the ratio average value, and use the ratio average value as the time error. Or the electronic device can calculate the statistical value of all third ratios in multiple processing processes to obtain the ratio statistical value, and use the ratio statistical value as the time error.
[0077] In some embodiments, when the electronic device determines that the ratio average is less than the first ratio error, or when the ratio statistic is less than the second ratio error, it can determine whether the error between the first processing time and the second processing time is within the allowable error range, thereby determining that the first processing parameter matches the second processing parameter. The first ratio error and the second ratio error can be customized based on the processing time data of historical processing. The present application does not limit the specific settings of the first ratio error and the second ratio error.
[0078] S14: If the number of the first target devices is equal to the preset number, obtain the first device identifier of the first target device and the sensor identifier of the sensor, and establish a pairing relationship between the first device identifier and the sensor identifier.
[0079] In some embodiments, the preset number can be set according to the ratio between the sensor and the device to be monitored on which the sensor is installed. For example, the ratio between the sensor and the device to be monitored on which the sensor is installed is 1:1, and when determining the device to be monitored that is paired with any sensor, the preset number is set to 1. When the number of the first target device is equal to the preset number, it means that the number of devices to be monitored that match the sensor meets the requirement of the preset ratio, and at this time, the electronic device can obtain the first device identifier of the first target device and the sensor identifier of the sensor, and establish a pairing relationship between the first device identifier and the sensor identifier.
[0080] In some embodiments, the first device identifier may be a device number, a device serial number, a MAC address, or a custom identifier of the first target device, etc. The first device identifier is not limited in the embodiments of the present application.
[0081] In some embodiments, the sensor identifier may be a combination of an IP address of the edge device and a port number of the sensor accessing the edge device, etc. This embodiment of the present application is not limited thereto.
[0082] In some embodiments of the present application, if the number of first target devices is greater than a preset number, the third processing parameter of the first target device and the fourth processing parameter detected by the sensor are obtained; if any third processing parameter matches the fourth processing parameter, the first target device corresponding to any third processing parameter is determined as the second target device; if the number of second target devices is equal to the preset number, the second device identifier of the second target device is obtained, and a pairing relationship between the second device identifier and the sensor identifier is established.
[0083] In some embodiments, the number of the first target devices is greater than the preset number, indicating that some of the first target devices are misidentified as devices to be monitored that match the sensor. In this case, it is necessary to further compare the processing parameters of the first target devices with the processing parameters detected by the sensor to accurately select the devices to be monitored that are paired with the sensor.
[0084] In some embodiments, the third processing parameter is distinguished from the first processing parameter, and the fourth processing parameter is distinguished from the second processing parameter. For example, when the first processing parameter and the second processing parameter are processing time, the third processing parameter and the fourth processing parameter can be frequency parameters, tool change time, processing type and other parameters.
[0085] In some embodiments of the present application, the method further includes: performing waveform conversion on the parameter signal; and determining a fourth processing parameter based on the converted parameter signal.
[0086] In some embodiments, the electronic device can perform waveform conversion on the parameter signal by means of Fourier transform or the like. The electronic device can perform signal analysis on the converted parameter signal to determine the fourth processing parameter. The third processing parameter and the fourth processing parameter need to be related to the characteristics obtained by processing the parameter signal of the sensor.
[0087] In some embodiments of the present application, if the third processing parameter and the fourth processing parameter both include frequency parameters, the method also includes: if the absolute difference between the frequency parameter in the third processing parameter and the frequency parameter in the fourth processing parameter is less than a preset parameter error, determining that the third processing parameter matches the fourth processing parameter.
[0088] In some embodiments, the electronic device may determine the second target device according to the following formula: .
[0089] In the formula, a set representing a second target device; A set representing a first target device; Represents a waveform transformation function, such as but not limited to Fourier transform, wavelet transform, Z transform, etc.; represents the frequency parameter in the fourth processing parameter; Indicates the machine parameter conversion function, such as converting speed into frequency; represents the frequency parameter in the third processing parameter; Indicates the number of devices in the collection; Indicates the preset parameter error, which can be customized based on the historical data of the corresponding parameters.
[0090] In some embodiments of the present application, the third processing parameter may further include the number of switching tools, and the fourth processing parameter may include the number of processing sections. If the number of switching tools is the same as the number of processing sections, it is determined that the third processing parameter matches the fourth processing parameter.
[0091] In some embodiments, the electronic device may segment the parameter signal according to a preset rule to obtain a plurality of processing sections, and determine the number of processing sections.
[0092] In some embodiments, the preset rule may be segmenting the parameter signal based on time, etc. The embodiments of the present application are not limited thereto.
[0093] In a device pairing method provided by an embodiment of the present application, the first processing parameters of multiple monitored devices and the parameter signals detected by the sensor are respectively obtained, and the parameter signals are analyzed to obtain the second processing parameters. By comparing the second processing parameters with the first processing parameters, when any first processing parameter matches the second processing parameter, and the number of monitored devices corresponding to any first processing parameter is equal to the preset number, the pairing relationship between the monitored device corresponding to any first processing parameter and the sensor corresponding to the second processing parameter is determined, and the pairing relationship between the devices is represented by the first device identifier of the first target device and the sensor identifier of the sensor. With this method, there is no need to confirm the correspondence between the sensor and the monitored device by labeling and manually building a table, which can save the time spent on device pairing and effectively improve the accuracy and efficiency of device pairing.
[0094] Please refer to Figure 4 and Figure 5 In a specific embodiment, the monitored device 40 may be a plurality of CNC devices, each of which is equipped with a vibration sensor. The above method is used to match the CNC device and the sensor, and specifically includes the following steps: The CNC equipment continuously processes materials using a tool, and the sensor collects vibration data and uploads it to the electronic device 10 (e.g., an edge management system); The waveform of the signal collected by the cutting sensor is obtained to obtain the processing start and end time of each sheet, and the recorded processing start and end time are read from the collection device 20 (such as the PHM system) for rough matching; If any result shows that one sensor matches multiple CNCs, the number of tools changed in the PHM is read and compared with the number of processing sections cut by the waveform. For example, if the number of tool changes during the operation of a CNC device is 5, and the number of processing sections cut by a sensor waveform is also 5, then the two are consistent. If there are still multiple CNCs that match a certain sensor, the waveform of the sensor's sensing signal is Fourier transformed to convert the time domain to the frequency domain and compared with the speed parameter recorded by the PHM; in this way, a stable 1-to-1 relationship can be obtained.
[0095] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0096] See also Figure 6 , is a structural diagram of the device pairing apparatus provided in the embodiment of the present application, which can implement the details of the device pairing method in the above embodiment and achieve the same effect. Figure 6 As shown, the device pairing device 600 can be applied to an electronic device with a data processing function, and the device pairing device 600 includes: an acquisition module 601, which is used to acquire the first processing parameters of multiple monitored devices; the acquisition module 601 is also used to acquire the parameter signal detected by the sensor, and process and analyze the parameter signal to obtain the second processing parameter; a judgment module 602 is used to determine the monitored device corresponding to any first processing parameter as the first target device if any first processing parameter matches the second processing parameter; a pairing module 603 is used to acquire the first device identifier of the first target device and the sensor identifier of the sensor if the number of first target devices is equal to a preset number, and establish a pairing relationship between the first device identifier and the sensor identifier.
[0097] In some embodiments, the acquisition module 601 is also used to obtain the third processing parameter of the first target device and the fourth processing parameter obtained according to the parameter signal detected by the sensor if the number of the first target devices is greater than a preset number; the judgment module 602 is also used to determine the first target device corresponding to any third processing parameter as the second target device if any third processing parameter matches the fourth processing parameter; the pairing module 603 is also used to obtain the second device identifier of the second target device if the number of the second target devices is equal to the preset number, and establish a pairing relationship between the second device identifier and the sensor identifier.
[0098] In some embodiments, the first processing parameter includes a first processing time, and the second processing parameter includes a second processing time. The judgment module 602 is also used to determine that the first processing parameter matches the second processing parameter if the time error between the first processing time and the second processing time is less than a preset error.
[0099] In some embodiments, the device pairing apparatus 600 further includes: a calculation module for taking a statistical value of a difference between the first processing time and the second processing time as a time error; or taking an average value of a difference between the first processing time and the second processing time as a time error.
[0100] In some embodiments, when the monitored device performs multiple processing processes, the first processing time includes the first start time and the first end time of each processing process, and the second processing time includes the second start time and the second end time of each processing process. The calculation module is also used to calculate the first absolute difference between the corresponding first start time and the second start time, and the second absolute difference between the first end time and the second end time for each processing process; determine the sum of the first absolute difference and the second absolute difference as the third absolute difference; based on multiple processing processes, calculate the cumulative value of all third absolute differences to obtain a difference statistic; or based on multiple processing processes, calculate the average value of all third absolute differences to obtain a difference average value.
[0101] In some embodiments, the device pairing apparatus 600 further includes: a signal processing module for performing waveform conversion on the parameter signal detected by the sensor; and a determination module for determining the fourth processing parameter based on the converted parameter signal.
[0102] In some embodiments, if the third processing parameter and the fourth processing parameter both include frequency parameters, the judgment module 602 is also used to determine that the third processing parameter matches the fourth processing parameter if the absolute difference between the frequency parameter in the third processing parameter and the frequency parameter in the fourth processing parameter is less than a preset parameter error.
[0103] For the specific definition of the device pairing device 600, please refer to the definition of the device pairing method above, which will not be repeated here. Each module in the above-mentioned device pairing device 600 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0104] See also Figure 7 , Figure 7The diagram is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The network where the electronic device 10 is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0105] like Figure 7 As shown, the electronic device 10 includes a communication module 11, a memory 12, a processor 13, an input / output interface 14 and a bus 15. The processor 13 is coupled to the communication module 11, the memory 12 and the input / output interface 14 through the bus 15. The communication module 11 may be a wireless communication module or a mobile communication module. The wireless communication module may provide wireless communication solutions including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the electronic device 10. The mobile communication module may provide wireless communication solutions including 2G / 3G / 4G / 5G, etc., applied to the electronic device 10. The memory 12 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 13, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally called DDR5 SDRAM), etc. The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 13. The non-volatile memory may include a disk storage device and a flash memory. The memory 12 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 13. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 13, the device pairing method executed on the electronic device 10 can be implemented. In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10 . The processor 13 may include one or more processing units, for example, the processor 13 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors. The processor 13 provides computing and control capabilities. For example, the processor 13 is used to execute a computer program stored in the memory 12 to implement the above-mentioned device pairing method. The input / output interface 14 is used to provide a channel for user input or output. For example, the input / output interface 14 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information. The bus 15 is at least used to provide a channel for mutual communication among the communication module 11 , the memory 12 , the processor 13 , and the input / output interface 14 in the electronic device 10 . It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0106] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the device pairing method in the above-mentioned embodiments of the present application. The computer-readable storage medium may be an internal memory of the electronic device described in the above embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external electronic device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A device pairing method, characterized in that: The device pairing method comprises: Acquire first processing parameters of a plurality of devices to be monitored; Acquiring a parameter signal detected by a sensor, and processing and analyzing the parameter signal to obtain a second processing parameter; If any of the first processing parameters matches the second processing parameter, determining the monitored device corresponding to the any of the first processing parameters as the first target device; If the number of the first target devices is equal to the preset number, the first device identifier of the first target device and the sensor identifier of the sensor are obtained, and a pairing relationship between the first device identifier and the sensor identifier is established.
2. The device pairing method according to claim 1, characterized in that: The method further comprises: If the number of the first target devices is greater than the preset number, obtaining a third processing parameter of the first target device and a fourth processing parameter obtained according to the parameter signal detected by the sensor; If any third processing parameter matches the fourth processing parameter, determining the first target device corresponding to the any third processing parameter as the second target device; If the number of the second target devices is equal to the preset number, the second device identifier of the second target device is obtained, and a pairing relationship between the second device identifier and the sensor identifier is established.
3. The device pairing method according to claim 1, characterized in that: The first processing parameter includes a first processing time, the second processing parameter includes a second processing time, and the method further includes: If the time error between the first processing time and the second processing time is less than a preset error, it is determined that the first processing parameter matches the second processing parameter.
4. The device pairing method according to claim 3, characterized in that: The method further comprises: taking a statistical value of a difference between the first processing time and the second processing time as the time error; or An average value of the difference between the first processing time and the second processing time is used as the time error.
5. The device pairing method according to claim 4, characterized in that: In the case where the equipment to be monitored performs multiple processing processes, the first processing time includes a first start time and a first end time of each processing process, and the second processing time includes a second start time and a second end time of each processing process, and the method further includes: For each processing process, calculating a first absolute difference between a corresponding first start time and a second start time, and a second absolute difference between a corresponding first end time and a second end time; determining a sum of the first absolute difference and the second absolute difference as a third absolute difference; Based on the multiple processing processes, calculating the cumulative value of all third absolute differences to obtain the difference statistical value; or Based on the multiple processing processes, the average value of all third absolute differences is calculated to obtain the difference average value.
6. The device pairing method according to claim 2, characterized in that: The method further comprises: Performing waveform conversion on the parameter signal detected by the sensor; Based on the converted parameter signal, the fourth processing parameter is determined.
7. The device pairing method according to claim 6, characterized in that: If the third processing parameter and the fourth processing parameter both include frequency parameters, the method further includes: If the absolute difference between the frequency parameter in the third processing parameter and the frequency parameter in the fourth processing parameter is less than a preset parameter error, it is determined that the third processing parameter matches the fourth processing parameter.
8. A device pairing apparatus, characterized in that: The device pairing apparatus comprises: An acquisition module, used for acquiring first processing parameters of a plurality of devices to be monitored; The acquisition module is further used to acquire the parameter signal detected by the sensor, and process and analyze the parameter signal to obtain the second processing parameter; A judgment module, configured to determine the monitored device corresponding to any first processing parameter as a first target device if any first processing parameter matches the second processing parameter; The pairing module is used to obtain the first device identification of the first target device and the sensor identification of the sensor if the number of the first target devices is equal to a preset number, and to establish a pairing relationship between the first device identification and the sensor identification.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and computer-readable instructions stored in the memory and executable on the processor, wherein the computer-readable instructions, when executed by the processor, implement the device pairing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the device pairing method according to any one of claims 1 to 7 is implemented.