Industrial data collection method, electric meter data collection device and electronic equipment

By receiving the communication protocol configuration file issued by the data collection terminal, the industrial data collection gateway automatically configures the adapted communication protocol, solving the problem of cumbersome configuration in the existing technology, improving configuration efficiency and reducing technical requirements.

CN117950351BActive Publication Date: 2024-09-27北京伟联科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410045082.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-11
Publication Date
2024-09-27
Estimated Expiration
2044-01-11

AI Technical Summary

Technical Problem

Existing industrial data collection gateways require professional and technical personnel to perform underlying configuration when configuring communication protocols, which is a cumbersome process and can easily lead to a waste of human resources.

Method used

By receiving the communication protocol configuration file issued by the data collection terminal, the industrial data collection gateway automatically determines and configures the adapted communication protocol, simplifying the configuration process and requiring only simple operations by the operator on the data collection terminal.

Benefits of technology

It reduces the technical requirements for operators, simplifies the communication protocol configuration process of the industrial data collection gateway, improves configuration efficiency, and reduces the waste of human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117950351B
    Figure CN117950351B
Patent Text Reader

Abstract

The present invention discloses an industrial data collection method, an electric meter data collection device and an electronic device. The industrial data collection method includes: receiving a first communication protocol configuration file issued by a data collection terminal; determining a target data collection interface according to the first communication protocol configuration file; connecting the target data collection interface to a data output interface of a target industrial device; determining a first communication protocol corresponding to the target data collection interface according to the first communication protocol configuration file, retrieving the first communication protocol from a preset communication protocol set, and configuring the first communication protocol to the target data collection interface; sending a data collection request instruction to the target industrial device in accordance with the agreement of the first communication protocol to collect industrial data. This data collection method only requires an operator to perform simple operations at the data collection terminal to complete the communication protocol configuration process of the industrial data collection gateway, thereby making the communication protocol configuration process of the industrial data collection gateway simpler.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial data communication technology, and in particular to an industrial data acquisition method, an electric meter data acquisition device, and an electronic device. Background Art

[0002] In industrial activities, statistics of industrial data of various industrial equipment can provide a data basis for industrial decision-making. In order to realize the automatic statistics of industrial data, industrial data collection gateways are generally used to collect industrial data from various industrial equipment at industrial sites, thereby improving the efficiency of industrial data collection.

[0003] Existing industrial data acquisition gateways usually require pre-configuration of the communication protocols of each data acquisition interface of the industrial data acquisition gateway, and then match and connect the industrial data acquisition gateway with the industrial equipment at the industrial site for each data acquisition interface with the configured communication protocol, thereby realizing the collection of industrial data.

[0004] However, when configuring the communication protocol of the data acquisition interface of the existing industrial data acquisition gateway, it is necessary to know in advance the communication protocol used by the industrial equipment corresponding to the industrial data to be collected, and professional technicians must perform the underlying configuration on the data acquisition gateway to achieve this. This configuration process can only be performed on the industrial data acquisition gateway, and it is also necessary to specially configure technicians to perform on-site operations. The configuration process is cumbersome and easily causes a waste of human resources. Therefore, how to make the communication protocol configuration process of the industrial data acquisition gateway simpler has become a technical problem to be solved. Summary of the invention

[0005] The present application provides an industrial data collection method, an electric meter data collection device and an electronic device to solve the problem of the cumbersome configuration process of the existing industrial data collection gateway communication protocol.

[0006] A first aspect of an embodiment of the present application provides an industrial data collection method, which is applied to an industrial data collection gateway. The method includes:

[0007] Receiving a first communication protocol configuration file sent by a data collection terminal;

[0008] Determine a target data acquisition interface according to a first communication protocol configuration file; connect the target data acquisition interface to a data output interface of a target industrial device;

[0009] Determine the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieve the first communication protocol from a preset communication protocol set, and configure the first communication protocol to the target data acquisition interface;

[0010] According to the agreement of the first communication protocol, a data collection request instruction is sent to the target industrial equipment to collect industrial data.

[0011] Preferably, the first communication protocol configuration file includes the correspondence information between the target data acquisition interface of the industrial data acquisition gateway and the communication protocol;

[0012] Determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file includes: determining the first communication protocol corresponding to the target data acquisition interface according to the correspondence relationship information between the target data acquisition interface and the communication protocol of the industrial data acquisition gateway.

[0013] Preferably, the first communication protocol configuration file includes device type information of the target industrial device;

[0014] Determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieving the first communication protocol from a preset communication protocol set, and configuring the first communication protocol to the target data acquisition interface includes:

[0015] Determine an alternative communication protocol set from a preset communication protocol set according to device type information of the target industrial device;

[0016] configuring a first candidate communication protocol in the candidate communication protocol set to a target data acquisition interface;

[0017] Sending first test information to the target industrial device according to the first alternative communication protocol;

[0018] If test completion information fed back by the target industrial equipment according to the first test information is received within the first preset time, the first candidate communication protocol is determined as the first communication protocol corresponding to the target data acquisition interface.

[0019] Preferably, determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieving the first communication protocol from a preset communication protocol set, and configuring the first communication protocol to the target data acquisition interface further comprises:

[0020] If the test completion information fed back by the target industrial equipment according to the first test information is not received within the first preset time, the first alternative communication protocol of the target data acquisition interface is replaced with the second alternative communication protocol in the alternative communication protocol set;

[0021] Sending first test information to the target industrial device according to the second alternative communication protocol;

[0022] If test completion information fed back by the target industrial equipment according to the first test information is received within the first preset time, the second candidate communication protocol is determined as the first communication protocol corresponding to the target data acquisition interface.

[0023] Preferably, the method further comprises:

[0024] Receiving a second communication protocol configuration file sent by the data collection terminal;

[0025] According to the second communication protocol configuration file, the first communication protocol configured by the target data acquisition interface is updated.

[0026] Preferably, after sending the data collection request instruction to the target industrial equipment, the method further includes:

[0027] If no industrial data sent by the target industrial device in response to the data collection request instruction is detected within the second preset time, obtaining the device status of the target industrial device;

[0028] If the device state of the target industrial device is a shutdown state, a prompt message indicating that the target industrial device is shut down is sent to the data collection terminal.

[0029] Preferably, the method further comprises:

[0030] If the device state of the target industrial device is a working state, a test communication protocol is determined from a preset communication protocol set;

[0031] Replacing the first communication protocol of the target data acquisition interface with the test communication protocol;

[0032] Send test information to the target industrial equipment according to the test communication protocol;

[0033] If the test completion information fed back by the target industrial equipment according to the test information is received within the second preset time, a prompt message that the adaptation protocol of the target data acquisition interface is the test communication protocol is sent to the data collection terminal.

[0034] A second aspect of an embodiment of the present application provides an industrial data acquisition device, including:

[0035] A receiving unit, used for receiving a first communication protocol configuration file sent by a data collection terminal;

[0036] A determination unit, used to determine a target data acquisition interface according to a first communication protocol configuration file; the target data acquisition interface is connected to a data output interface of a target industrial device;

[0037] The determination unit is further used to determine the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file;

[0038] A configuration unit, used to retrieve a first communication protocol from a preset communication protocol set, and configure the first communication protocol to a target data acquisition interface;

[0039] The collection unit is used to send a data collection request instruction to the target industrial equipment according to the agreement of the first communication protocol to collect industrial data.

[0040] A third aspect of an embodiment of the present application provides an electronic device, including: a memory and a processor, and the memory and the processor are coupled;

[0041] The memory is used to store one or more computer instructions;

[0042] The processor is used to execute one or more computer instructions to implement any one of the above feasible methods.

[0043] A third aspect of an embodiment of the present application provides a computer-readable storage medium having one or more computer instructions stored thereon, which are executed by a processor to implement any one of the above-mentioned feasible methods.

[0044] The industrial data acquisition method provided in the embodiment of the present application is applied to an industrial data acquisition gateway, and the method includes: receiving a first communication protocol configuration file issued by a data collection terminal; determining a target data acquisition interface according to the first communication protocol configuration file; connecting the target data acquisition interface to a data output interface of a target industrial device; determining a first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieving the first communication protocol from a preset communication protocol set, and configuring the first communication protocol to the target data acquisition interface; and sending a data acquisition request instruction to the target industrial device in accordance with the agreement of the first communication protocol to collect industrial data.

[0045] In this method, a communication protocol set is pre-installed in the industrial data acquisition gateway. When industrial data needs to be collected, it is only necessary to send the first communication protocol configuration file to the industrial data acquisition gateway through the data collection terminal in advance. The industrial data acquisition gateway can automatically configure an adaptive communication protocol for the target data acquisition interface based on the first communication protocol configuration file. This process only requires the operator to perform simple operations on the data collection terminal, which reduces the technical requirements for the operator and makes the communication protocol configuration process of the industrial data acquisition gateway simpler. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a scenario diagram of an industrial data acquisition gateway provided in an embodiment of the present application;

[0047] Figure 2 It is a flow chart of an industrial data collection method provided by an embodiment of the present application;

[0048] Figure 3 is a schematic diagram of a process for determining a first communication protocol provided in an embodiment of the present application;

[0049] Figure 4 It is a structural schematic diagram of an industrial data acquisition device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described clearly and completely below in conjunction with the drawings in the embodiments of the present application. However, the present application can be implemented in many other ways different from the above description. Therefore, based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present application.

[0051] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0052] In industrial activities, statistics of industrial data of various industrial equipment can provide a data basis for industrial decision-making. In order to realize the automatic statistics of industrial data, industrial data collection gateways are generally used to collect industrial data from various industrial equipment at industrial sites, thereby improving the efficiency of industrial data collection.

[0053] Existing industrial data acquisition gateways usually require pre-configuration of the communication protocols of each data acquisition interface of the industrial data acquisition gateway, and then match and connect the industrial data acquisition gateway with the industrial equipment at the industrial site for each data acquisition interface with the configured communication protocol, thereby realizing the collection of industrial data.

[0054] However, when configuring the communication protocol of the data acquisition interface of the existing industrial data acquisition gateway, it is necessary to know in advance the communication protocol used by the industrial equipment corresponding to the industrial data to be collected, and professional technicians must perform the underlying configuration on the data acquisition gateway to achieve this. This configuration process can only be performed on the industrial data acquisition gateway, and it is also necessary to specially configure technicians to perform on-site operations. The configuration process is cumbersome and easily causes a waste of human resources. Therefore, how to make the communication protocol configuration process of the industrial data acquisition gateway simpler has become a technical problem to be solved.

[0055] In order to solve the technical problem of the cumbersome communication protocol configuration process of the above-mentioned industrial data acquisition gateway, an embodiment of the present application provides an industrial data acquisition method. In this method, a communication protocol set is pre-installed in the industrial data acquisition gateway. When industrial data needs to be collected, it is only necessary to send a first communication protocol configuration file to the industrial data acquisition gateway through the data collection terminal in advance. The industrial data acquisition gateway can automatically configure an adaptive communication protocol for the target data acquisition interface according to the first communication protocol configuration file. This process only requires the operator to perform simple operations on the data collection terminal, which reduces the technical requirements for the operator and makes the communication protocol configuration process of the industrial data acquisition gateway simpler.

[0056] The industrial data collection method provided in this embodiment is applied to the industrial data collection gateway. For details, please refer to Figure 1 , Figure 1 A schematic diagram of a scenario of an industrial data acquisition gateway provided in an embodiment of the present application. In which, one or more data acquisition interfaces may be set in the industrial data acquisition gateway, and the interface types of these data acquisition interfaces may be the same or different.

[0057] Specific examples include Figure 1 As shown, the data transmission interface 5-3 of the industrial data acquisition gateway 5 is connected to the data transmission interface 6-1 of the data collection terminal 6, and the data transmission interface 5-3 of the industrial data acquisition gateway 5 is preset to use the same communication protocol as the data transmission interface 6-2 of the data collection terminal 6, so that information communication can be carried out between the industrial data acquisition gateway 5 and the data collection terminal 6.

[0058] The data acquisition interface 5-1 of the industrial data acquisition gateway 5 is connected to the data output interface 1-1 of the industrial equipment 1 and the data output interface 2-1 of the industrial equipment 2 at the same time, and the data acquisition interface 5-2 of the industrial data acquisition gateway 5 is connected to the data output interface 3-1 of the industrial equipment 3 and the data output interface 4-1 of the industrial equipment 4 at the same time. Among them, the interface types of the data output interface 1-1 of the industrial equipment 1, the data output interface 2-1 of the industrial equipment 2 and the data acquisition interface 5-1 of the industrial data acquisition gateway 5 are consistent. The interface types of the data output interface 3-1 of the industrial equipment 3, the data output interface 4-1 of the industrial equipment 4 and the data acquisition interface 5-2 of the industrial data acquisition gateway 5 are consistent. The data output interface 1-1 of the industrial equipment 1 and the data output interface 2-1 of the industrial equipment 2 use the same communication protocol, and the data output interface 3-1 of the industrial equipment 3 and the data output interface 4-1 of the industrial equipment 4 use the same communication protocol. The communication protocols of the data acquisition interface 5-1 and the data acquisition interface 5-2 of the industrial data acquisition gateway 5 are pre-configured, but are configured using the industrial data acquisition method provided in this embodiment.

[0059] Of course, in a specific implementation, the industrial data acquisition gateway may be provided with only one data acquisition interface, the connection method of the data acquisition interface may also be analogous to the above example, and the industrial data acquisition method provided in this embodiment may be used to configure an adaptive communication protocol.

[0060] The industrial data collection method provided in this embodiment is as follows: Figure 2 As shown, Figure 2 The following is a flow chart of an industrial data collection method provided in an embodiment of the present application. Figure 2 As shown, the method includes steps S101-S104, which are specifically as follows.

[0061] S101, receiving a first communication protocol configuration file sent by a data collection terminal.

[0062] When executing this step, the data acquisition interface of the industrial data acquisition gateway and the data output interface of the industrial equipment are connected through the communication line, and the data transmission interface of the industrial data acquisition gateway and the data transmission interface of the data collection terminal are also connected through the communication line. In addition, the data transmission interface of the industrial data acquisition gateway has been configured with a communication protocol corresponding to the communication protocol type of the data transmission interface of the data collection terminal, while the data acquisition interface of the industrial data acquisition gateway has not yet configured with a communication protocol corresponding to the communication protocol type of the data output interface of the industrial equipment.

[0063] That is to say, in this embodiment, the data transmission interface in the industrial data acquisition gateway used to connect to the data collection terminal is pre-configured with the communication protocol, but the data acquisition interface in the industrial data acquisition gateway used to connect to the industrial equipment does not need to be pre-configured.

[0064] For example, if the communication protocol of the data transmission interface of the data collection terminal is the Modbus communication protocol, the data transmission interface of the industrial data acquisition gateway is also pre-configured as the Modbus communication protocol, but the communication protocols of the data acquisition interfaces of the industrial data acquisition gateway are not preset.

[0065] The first communication protocol configuration file is used to indicate the first communication protocol corresponding to the target data acquisition interface of the industrial data acquisition gateway.

[0066] There are many ways to obtain the first communication protocol configuration file. Exemplarily, the first communication protocol configuration file can be obtained by the user setting up the communication protocol configuration page on the data collection terminal. For example, the user can define the correspondence between each data acquisition interface and the communication protocol of the industrial data acquisition gateway in a web page or a dedicated application on the data collection terminal, so that the first communication protocol configuration file is generated by the data collection terminal. More specifically, the user can define the correspondence between each data transmission interface and the communication protocol of the industrial data acquisition gateway in the communication protocol configuration page displayed on the data collection terminal by checking, inputting, pairing, etc., so as to generate the first communication protocol configuration file.

[0067] The first communication protocol configuration file can also be directly sent to the industrial data acquisition gateway through a preset sending command. For example, the user can inform the technician of the relevant information of the industrial equipment corresponding to the industrial data to be collected in advance, and the technician will prepare the first communication protocol configuration file on other terminals and send it to the user through online transmission such as email. The user downloads or reprints the first communication protocol configuration file to the data collection terminal, and then sends it to the industrial data acquisition gateway through the data collection terminal.

[0068] The specific content of the first communication configuration file can be set differently according to the requirements. For example, the first configuration file may include the correspondence information between the target data acquisition interface and the communication protocol of the industrial data acquisition gateway, or the correspondence information between each data acquisition interface and the communication protocol of the industrial data acquisition gateway, or the device type information of the target industrial device, etc., which are not specifically limited here.

[0069] After receiving the first communication protocol configuration file, the industrial data acquisition gateway proceeds to the next step.

[0070] S102. Determine a target data acquisition interface according to a first communication protocol configuration file; and connect the target data acquisition interface to a data output interface of a target industrial device.

[0071] After receiving the first communication protocol configuration file, the industrial data acquisition gateway identifies the information content in the first communication protocol configuration file and determines the target data acquisition interface according to the identification result. The target data acquisition interface is the data acquisition interface connected to the data output interface of the target industrial device.

[0072] Specifically, the first communication protocol configuration file may include the identity information of the target data acquisition interface. After the industrial data acquisition gateway receives the first communication protocol configuration file, it identifies the identity information of the target data acquisition interface in the first communication protocol configuration file, thereby determining the target data acquisition interface from various data acquisition interfaces based on the identity information of the target data acquisition interface.

[0073] Since different types of data acquisition interfaces correspond to different communication protocols, in the case where there is only one different type of data acquisition interface on the industrial data acquisition gateway, the first communication protocol configuration file may not include the identity information of the target data acquisition interface, but directly determine the interface type that matches the communication protocol in the first communication protocol configuration file based on the protocol type of the communication protocol in the first communication protocol configuration file, thereby determining the target data acquisition interface.

[0074] After the target data acquisition interface is determined, the first communication protocol corresponding to the target data acquisition interface is further determined and the communication protocol is configured, as shown in the next step.

[0075] S103: Determine the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieve the first communication protocol from a preset communication protocol set, and configure the first communication protocol to the target data acquisition interface.

[0076] The communication protocol set includes multiple communication protocols and is pre-stored in the industrial data acquisition gateway. When the first communication protocol corresponding to the target data acquisition interface is determined, the first communication protocol is retrieved from the communication protocol set, and then the first communication protocol is retrieved from the communication protocol set and configured to the target data acquisition interface. In addition, the communication protocol set can be updated and modified to change the communication protocol type stored in the communication protocol set.

[0077] The first communication protocol configuration file is equivalent to a program that configures the first communication protocol to the target data acquisition interface, which enables the industrial data acquisition gateway to automatically complete the entire parameter configuration process, which can be implemented specifically by an automatic configuration program (such as batch processing). The first communication protocol is a file that defines the rules, formats and agreements for data exchange between the communicating parties. When the first communication protocol is called, the protocol file of the first communication protocol is directly called. The protocol file describes the specifications of various messages, commands, data structures and other communication elements, so that different systems, software or devices can correctly understand and process each other's communications. The configuration file is mainly used to customize and configure the behavior and settings of the system, software or device to meet specific needs and environments, such as the target data acquisition interface in this application. The protocol file is the definition of the communication protocol, and the first communication protocol configuration file belongs to the configuration file. The configuration file is the parameter configuration of the system, software or device.

[0078] The configuration file of the communication interface is a file used to configure and customize the communication interface. It contains some parameters and settings to specify the behavior, connection information, network configuration, etc. of the communication interface. The configuration file can exist in text files, XML, JSON or other formats. Their specific format and content depend on the specific communication interface and application.

[0079] In order to enable the target data acquisition interface to collect data normally, an interface driver is also required. The interface driver refers to a software component or module that controls and manages a specific hardware or software interface. It acts as a bridge between the interface and the operating system or application, and enables the operating system or application to interact and communicate with the specific interface by providing appropriate interface functions and calling methods. Configuration files and interface drivers are two concepts that work with each other. The settings and parameters in the configuration file need to be read and parsed by the interface driver, and then the driver initializes and configures the corresponding communication interface according to the content in the configuration file. The interface driver is responsible for implementing the communication logic and data exchange between the communication interface and the operating system or application, and the configuration file provides customization and settings for this process.

[0080] The step of configuring the first communication protocol to the target data acquisition interface is to select and determine a communication protocol that is compatible with the target data acquisition interface and automatically complete parameter configuration. Ultimately, the interface driver corresponding to the first communication protocol configured with appropriate parameters can provide services for the target data interface.

[0081] After the first communication protocol is configured to the target data acquisition interface, the configuration process of the communication protocol is completed and the next step can be performed.

[0082] S104: According to the first communication protocol, a data collection request instruction is sent to the target industrial equipment to collect industrial data.

[0083] After completing the configuration of the communication protocol, data collection can be started. Specifically, the industrial data collection gateway can send a data collection request instruction to the target industrial device through the target data collection interface in accordance with the agreement of the first communication protocol under the command of the data collection terminal.

[0084] Since the first communication protocol is also the communication protocol adopted by the data output interface of the target industrial equipment, the target industrial equipment can identify the data collection request instruction, and then send the industrial data specified by the data collection request instruction to the industrial data collection gateway in accordance with the agreement of the first communication protocol. After receiving the industrial data information text sent by the target industrial data, the industrial data collection gateway sends the industrial data to the data collection terminal in accordance with the agreement of the communication protocol of the data transmission interface through protocol conversion and other means, thereby completing the data collection process.

[0085] If the communication protocol of the target industrial device is updated, or the target industrial device connected to the target data acquisition interface is replaced, the communication protocol of the target data acquisition interface needs to be updated synchronously. A specific implementation method may be that after receiving the second communication protocol configuration file sent by the data collection terminal, the industrial data acquisition gateway updates the first communication protocol configured by the target data acquisition interface according to the second communication protocol configuration file.

[0086] The above is the basic method of the industrial data collection method provided in this embodiment. In a specific implementation mode, each step can be refined, expanded, deformed, and the order can be changed based on the above basic industrial data collection method.

[0087] To further introduce the industrial data collection method of this embodiment in detail, the following further describes it based on the above basic method.

[0088] The first communication protocol configuration file is used to determine the first communication protocol of the target data acquisition interface. When the strategy for determining the first communication protocol is different, the specific content of the first communication protocol configuration file will also be different. The following examples illustrate two strategies for determining the first communication protocol.

[0089] The first strategy for determining the first communication protocol is: determining the first communication protocol corresponding to the target data acquisition interface according to the corresponding relationship between the target data acquisition interface and the communication protocol.

[0090] This strategy for determining the first communication protocol is applicable to the case where the communication protocol of the data acquisition interface of the target industrial device is known. Specifically, the target data acquisition interface of the industrial data acquisition gateway is connected to the data acquisition interface of the target industrial device, and the target data acquisition interface is known. If the communication protocol of the data acquisition interface of the target industrial device is also known, then the communication protocol of the data acquisition interface of the target industrial device should be the first communication protocol. The user can directly define the correspondence between the target data acquisition interface and the first communication protocol on the data collection terminal or other devices according to the communication protocol type of the target data acquisition interface and the data acquisition interface of the target industrial device, thereby generating a first communication protocol configuration file.

[0091] Specifically, the first communication protocol configuration file may include the correspondence information between the target data acquisition interface and the first communication protocol, and the first communication protocol configuration file may also include the correspondence information between each data acquisition interface of the industrial data acquisition gateway and the communication protocol.

[0092] The first communication protocol configuration file includes the correspondence information between the target data acquisition interface and the communication protocol, which means that the first communication protocol configuration file only indicates the communication protocol corresponding to the target data acquisition interface, but does not indicate the communication protocols corresponding to other data acquisition interfaces.

[0093] That is, when the user edits the first communication protocol configuration file, he only defines the correspondence between the target data acquisition interface and the communication protocol, but does not define the correspondence between other data acquisition interfaces and communication protocols.

[0094] When the first communication protocol configuration file includes correspondence information between the target data acquisition interface and the communication protocol, determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file includes: determining the first communication protocol corresponding to the target data acquisition interface according to the correspondence information between the target data acquisition interface and the communication protocol.

[0095] When defining the correspondence between the target data acquisition interface and the communication protocol, the user can first establish the correspondence between the target data acquisition interface and the target industrial device, and then define the communication protocol of the data output interface of the target industrial device, so that the first communication protocol configuration file includes the correspondence between the target data acquisition interface and the target industrial device, and the communication protocol information corresponding to the target industrial device. When determining the first communication protocol according to the first communication protocol configuration file, the communication protocol of the target industrial device corresponding to the target data acquisition interface is directly determined as the first communication protocol.

[0096] The first communication protocol configuration file includes the correspondence information between each data acquisition interface and the communication protocol of the industrial data acquisition gateway, which means that the first communication protocol configuration file indicates the communication protocol corresponding to all the data acquisition interfaces of the industrial data acquisition gateway. That is, when the user edits the first communication protocol configuration file, he directly defines the correspondence between all the data acquisition interfaces and the communication protocol of the industrial data acquisition gateway.

[0097] When the first communication protocol configuration file includes the correspondence information between each data acquisition interface of the industrial data acquisition gateway and the communication protocol, determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file includes: determining the first communication protocol corresponding to the target data acquisition interface according to the correspondence information between each data acquisition interface of the industrial data acquisition gateway and the communication protocol.

[0098] Specifically, the correspondence between the target data acquisition interface and the communication protocol is searched from the correspondence between each data acquisition interface and the communication protocol of the industrial data acquisition gateway, and then the communication protocol corresponding to the target data acquisition interface is determined as the first communication protocol.

[0099] The second strategy for determining the first communication protocol is: determining the first communication protocol corresponding to the target data acquisition interface according to the device type of the target industrial device.

[0100] This strategy for determining the first communication protocol is applicable to the case where the communication protocol of the data acquisition interface of the target industrial device is unknown. Specifically, the target data acquisition interface of the industrial data acquisition gateway is connected to the data acquisition interface of the target industrial device, the target data acquisition interface is known, and the device type of the target industrial device is also known. When the user is unknown about the communication protocol type of the data acquisition interface of the target industrial device, the user can define the correspondence between the target data acquisition interface and the device type of the target industrial device, thereby generating a first communication protocol configuration file.

[0101] In this embodiment, the first protocol configuration file includes the device type information of the target industrial device connected to the target data acquisition interface. At this time, according to the first communication protocol configuration file, the first communication protocol corresponding to the target data acquisition interface is determined, the first communication protocol is retrieved from the preset communication protocol set, and the first communication protocol is configured to the target data acquisition interface. The process is as shown in step S201-step S204. For details, see Figure 3 , Figure 3 A schematic diagram of a process for determining a first communication protocol provided in an embodiment of the present application is as follows.

[0102] S201. Determine a candidate communication protocol set from a preset communication protocol set according to device type information of a target industrial device.

[0103] Since different types of industrial equipment must use different communication protocols, for example, electric meters often use the DL / T645 communication protocol, which cannot be applied to other industrial equipment. Therefore, this step screens the preset communication protocol set according to the device type information of the target industrial equipment to determine the candidate communication protocol set.

[0104] For example, the device type of the target industrial equipment is an electric meter, and the communication protocols used by the electric meter mainly include DL / T645-1997 communication protocol and DL / T645-2007 communication protocol. Then, a preset communication protocol set is screened to select an alternative communication protocol set, which only includes DL / T645-1997 and DL / T645-2007 communication protocols.

[0105] After the candidate communication protocol set is determined, each communication protocol in the candidate communication protocol set can be sequentially configured to the target data acquisition interface and tested to determine the first communication protocol corresponding to the target data acquisition interface.

[0106] S202: configure the first candidate communication protocol in the candidate communication protocol set to the target data acquisition interface.

[0107] After the candidate communication protocol set is determined, a first candidate communication protocol is selected from the candidate communication protocol set and configured to the target data acquisition interface. When selecting the first candidate communication protocol from the candidate communication protocol set, it can be selected randomly, or according to the arrangement order of each candidate communication protocol in the candidate communication protocol set, or according to the historical number of times the candidate communication protocol is called, or according to the version usage time of the candidate communication protocol, and no specific restrictions are made here.

[0108] After configuring the first candidate communication protocol to the target data acquisition interface, the next step is executed.

[0109] S203: Send first test information to the target industrial device according to the first alternative communication protocol.

[0110] After configuring the first candidate communication protocol to the target data acquisition interface, the first test information is sent to the target industrial device. If the first candidate communication protocol is consistent with the communication protocol of the data output interface of the target industrial device, the target industrial device can read the first test information and provide corresponding feedback, as shown in step S204.

[0111] If the first candidate communication protocol is inconsistent with the communication protocol of the data output interface of the target industrial device, the target industrial device cannot read the first test information and cannot provide corresponding feedback, as specifically shown in step S205.

[0112] S204: If test completion information fed back by the target industrial equipment according to the first test information is received within the first preset time, the first candidate communication protocol is determined as the first communication protocol corresponding to the target data acquisition interface.

[0113] If the target industrial equipment receives the test completion information fed back by the target industrial equipment based on the first test information within the first preset time, it means that the first alternative communication protocol is consistent with the communication protocol of the data output interface of the target industrial equipment, and the first alternative communication protocol is directly determined as the first communication protocol corresponding to the target data acquisition interface.

[0114] S205: If the test completion information fed back by the target industrial equipment according to the first test information is not received within the first preset time, the first alternative communication protocol of the target data acquisition interface is replaced with the second alternative communication protocol in the alternative communication protocol set, and the second alternative communication protocol is tested.

[0115] The process of testing the second alternative communication protocol is: sending first test information to the target industrial equipment in accordance with the agreement of the second alternative communication protocol; if test completion information is received from the target industrial equipment based on the first test information within a first preset time, the second alternative communication protocol is determined as the first communication protocol corresponding to the target data acquisition interface.

[0116] In this step, if the target industrial equipment receives the test completion information fed back by the target industrial equipment according to the first test information within the first preset time, it means that the first alternative communication protocol is inconsistent with the communication protocol of the data output interface of the target industrial equipment. At this time, the first alternative communication protocol is replaced with the second alternative communication protocol for testing. If the second alternative communication protocol can be tested successfully, it means that the second alternative communication protocol is the first communication protocol corresponding to the target data acquisition interface. If the test completion information fed back by the target industrial equipment according to the first test information is not received within the first preset time, it means that the test of the second alternative communication protocol has failed, and other communication protocols in the alternative communication protocol set are further configured to the target data acquisition interface and corresponding tests are performed until the communication protocol adapted to the target data acquisition interface is found or the communication protocols in the alternative communication protocol set are tested.

[0117] In this implementation, the first communication protocol is determined by sequentially configuring each communication protocol in the alternative communication protocol set to the target data acquisition interface and testing it. Of course, there may be a situation where all the alternative communication protocols in the alternative communication protocol set fail to test. At this time, a corresponding prompt message can be sent to the data collection terminal to help the user troubleshoot the tested communication protocols or perform corresponding troubleshooting. Specifically, if all the alternative communication protocols in the alternative communication protocol set are not determined as the first communication protocol, a prompt message indicating that the communication protocol configuration failed is sent to the data collection terminal.

[0118] In addition, after configuring the communication protocol, it may still be impossible to collect industrial data. In this regard, the present embodiment provides an implementation method for dealing with this situation, specifically: after sending a data collection request instruction to the target industrial equipment, if no industrial data sent by the target industrial equipment in response to the data collection request instruction is detected within the second preset time, it is determined based on the equipment status of the target industrial equipment whether the situation is caused by the shutdown of the target industrial equipment or by an error in the configuration of the first communication protocol.

[0119] Specifically, after sending a data collection request instruction to the target industrial equipment, if no industrial data sent by the target industrial equipment in response to the data collection request instruction is detected within a second preset time, the equipment status of the target industrial equipment is obtained; if the equipment status of the target industrial equipment is a shutdown state, a prompt message that the target industrial equipment is shut down is sent to the data collection terminal.

[0120] The device status of the target industrial equipment is obtained by wireless communication or other communication methods that do not pass through the target data collection interface. If the device status is shutdown, industrial data cannot be collected on the target industrial equipment, and a prompt message indicating that the target industrial equipment is down is sent to the data collection terminal to remind the user to check the target industrial equipment.

[0121] If the device status of the target industrial equipment is working, it means that the target industrial equipment is normal, but the communication protocol configuration of the target data acquisition interface is wrong. In this case, you can reselect the communication protocol from the preset communication protocol set for testing to find the correct communication protocol.

[0122] Specifically, if the device status of the target industrial equipment is in the working status, the test communication protocol is first determined from the preset communication protocol set, the first communication protocol of the target data acquisition interface is replaced with the test communication protocol, and then the test information is sent to the target industrial equipment in accordance with the agreement of the test communication protocol. If the test completion information is received from the target industrial equipment based on the test information feedback within the second preset time, a prompt message is sent to the data collection terminal that the adaptation protocol of the target data acquisition interface is the test communication protocol.

[0123] When determining the test communication protocol from the preset communication protocol set, the communication protocol whose correlation with the first communication protocol is greater than the preset threshold value can be specifically determined as the test communication protocol. For example, the target industrial device is an electric meter, the first communication protocol is the DL / T645-1997 communication protocol, the preset communication protocol set also includes the DL / T645-2007 communication protocol, and the correlation between the DL / T645-2007 communication protocol and the DL / T645-1997 communication protocol is greater than the preset threshold value, then the DL / T645-2007 communication protocol is determined as the test communication protocol, and then the DL / T645-1997 communication protocol of the target data acquisition interface is replaced with the DL / T645-2007 communication protocol, and then according to the agreement of the DL / T645-2007 communication protocol, the test information is sent to the target industrial device, so as to verify whether the DL / T645-2007 communication protocol is the communication protocol adapted by the target data acquisition interface.

[0124] In addition, when determining the test communication protocol from the preset communication protocol set, the test communication protocol can also be determined according to the device type of the target industrial device, and corresponding tests can be performed, which is analogous to the process of determining the first communication protocol in steps S201-S204 and will not be elaborated on here.

[0125] In the above-mentioned industrial data collection method, a communication protocol set is pre-installed in the industrial data collection gateway. When industrial data needs to be collected, it is only necessary to send the first communication protocol configuration file to the industrial data collection gateway through the data collection terminal in advance. The industrial data collection gateway can automatically configure an adaptive communication protocol for the target data collection interface based on the first communication protocol configuration file. This process only requires the operator to perform simple operations on the data collection terminal, which reduces the technical requirements for the operator and makes the communication protocol configuration process of the industrial data collection gateway simpler.

[0126] The above embodiments have introduced the industrial data collection method involved in this application in detail. Figure 4 The industrial data acquisition device involved in this application is introduced in detail. Figure 4 A schematic diagram of the structure of an industrial data acquisition device provided in an embodiment of the present application.

[0127] Specifically, the industrial data acquisition device 400 includes:

[0128] A receiving unit 401 is used to receive a first communication protocol configuration file sent by a data collection terminal;

[0129] The determination unit 402 is used to determine a target data acquisition interface according to the first communication protocol configuration file; the target data acquisition interface is connected to a data output interface of the target industrial device;

[0130] The determination unit 402 is further configured to determine the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file;

[0131] The configuration unit 403 is used to retrieve a first communication protocol from a preset communication protocol set and configure the first communication protocol to a target data acquisition interface;

[0132] The collection unit 404 is used to send a data collection request instruction to the target industrial equipment according to the agreement of the first communication protocol to collect industrial data.

[0133] Each unit of the industrial data collection device 400 can implement any feasible industrial data collection method provided in the above embodiments. For details, please refer to the relevant description in the above method embodiments, and no unnecessary details will be given here.

[0134] The embodiment of the present application also provides an electronic device, wherein the electronic device includes a processor and a memory, the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement any feasible method in the aforementioned method embodiment, which can be specifically referred to in the aforementioned method embodiment and will not be repeated here. The electronic device also includes a bus and a communication interface, wherein the processor, the communication interface and the memory are connected via the bus.

[0135] Among them, the memory and the processor are coupled, the memory is used to store one or more computer instructions; the processor is used to execute one or more computer instructions to implement any feasible method as in the aforementioned method embodiments. For details, please refer to the aforementioned method embodiments, which will not be repeated here.

[0136] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are called and executed by a processor, the computer executable instructions prompt the processor to implement any feasible industrial data collection method provided in the above embodiments. The specific implementation can be found in the above method embodiments, which will not be repeated here.

[0137] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0138] In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0139] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An industrial data collection method, applied to an industrial data collection gateway, characterized in that: The method comprises: Receiving a first communication protocol configuration file sent by a data collection terminal; Determining a target data acquisition interface according to the first communication protocol configuration file; the target data acquisition interface is connected to a data output interface of a target industrial device; Determine the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieve the first communication protocol from a preset communication protocol set, and configure the first communication protocol to the target data acquisition interface; According to the agreement of the first communication protocol, sending a data collection request instruction to the target industrial equipment to collect industrial data; If the industrial data sent by the target industrial device in response to the data acquisition request instruction is not detected within the second preset time, obtaining the device status of the target industrial device according to a communication method that does not pass through the target data acquisition interface; If the device state of the target industrial device is a working state, determining a test communication protocol from a preset communication protocol set, wherein the test communication protocol is a communication protocol having a correlation with the first communication protocol greater than a preset threshold; Replacing the first communication protocol of the target data acquisition interface with the test communication protocol; Sending test information to the target industrial device according to the test communication protocol; If the test completion information fed back by the target industrial equipment according to the test information is received within the second preset time, prompt information that the adaptation protocol of the target data acquisition interface is the test communication protocol is sent to the data collection terminal.

2. The industrial data collection method according to claim 1, characterized in that: The first communication protocol configuration file includes the correspondence information between the target data acquisition interface and the communication protocol of the industrial data acquisition gateway; Determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file includes: determining the first communication protocol corresponding to the target data acquisition interface according to the correspondence information between the target data acquisition interface and the communication protocol of the industrial data acquisition gateway.

3. The industrial data collection method according to claim 1, characterized in that: The first communication protocol configuration file includes device type information of the target industrial device; The step of determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieving the first communication protocol from a preset communication protocol set, and configuring the first communication protocol to the target data acquisition interface includes: Determining a candidate communication protocol set from a preset communication protocol set according to the device type information of the target industrial device; configuring a first candidate communication protocol in the candidate communication protocol set to the target data acquisition interface; Sending first test information to the target industrial device according to the first alternative communication protocol; If test completion information fed back by the target industrial equipment according to the first test information is received within a first preset time, the first candidate communication protocol is determined as the first communication protocol corresponding to the target data acquisition interface.

4. The industrial data collection method according to claim 3, characterized in that: The step of determining the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file, retrieving the first communication protocol from a preset communication protocol set, and configuring the first communication protocol to the target data acquisition interface further includes: If the test completion information fed back by the target industrial equipment according to the first test information is not received within the first preset time, the first alternative communication protocol of the target data acquisition interface is replaced with a second alternative communication protocol in the set of alternative communication protocols; According to the second alternative communication protocol, sending first test information to the target industrial device; If test completion information fed back by the target industrial equipment according to the first test information is received within a first preset time, the second candidate communication protocol is determined as the first communication protocol corresponding to the target data acquisition interface.

5. The industrial data collection method according to claim 1, characterized in that: The method further comprises: Receiving a second communication protocol configuration file sent by the data collection terminal; The first communication protocol configured by the target data acquisition interface is updated according to the second communication protocol configuration file.

6. The industrial data collection method according to claim 1, characterized in that: The method further comprises: If the device state of the target industrial device is a shutdown state, prompt information indicating that the target industrial device is shut down is sent to the data collection terminal.

7. An industrial data acquisition device, characterized in that: include: A receiving unit, used for receiving a first communication protocol configuration file sent by a data collection terminal; A determination unit, configured to determine a target data acquisition interface according to the first communication protocol configuration file; The target data acquisition interface is connected to the data output interface of the target industrial equipment; The determination unit is further used to determine the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file; A configuration unit, configured to retrieve the first communication protocol from a preset communication protocol set, and configure the first communication protocol to the target data acquisition interface; A collection unit, used to send a data collection request instruction to the target industrial equipment according to the agreement of the first communication protocol to collect industrial data; If the industrial data sent by the target industrial device in response to the data acquisition request instruction is not detected within the second preset time, obtaining the device status of the target industrial device according to a communication method that does not pass through the target data acquisition interface; If the device state of the target industrial device is a working state, determining a test communication protocol from a preset communication protocol set, wherein the test communication protocol is a communication protocol having a correlation with the first communication protocol greater than a preset threshold; Replacing the first communication protocol of the target data acquisition interface with the test communication protocol; Sending test information to the target industrial device according to the test communication protocol; If the test completion information fed back by the target industrial equipment according to the test information is received within the second preset time, prompt information that the adaptation protocol of the target data acquisition interface is the test communication protocol is sent to the data collection terminal.

8. An electric meter data acquisition device, characterized in that: include: A receiving unit, used for receiving a first communication protocol configuration file sent by a data collection terminal; A determination unit, configured to determine a target data acquisition interface according to the first communication protocol configuration file; The target data acquisition interface is connected to the data output interface of the target electric meter; The determination unit is further used to determine the first communication protocol corresponding to the target data acquisition interface according to the first communication protocol configuration file; A configuration unit, configured to retrieve the first communication protocol from a preset communication protocol set, and configure the first communication protocol to the target data acquisition interface; A collection unit, configured to send a data collection request instruction to the target electric meter according to the agreement of the first communication protocol, so as to collect industrial data; If the industrial data sent by the target electric meter in response to the data acquisition request instruction is not detected within the second preset time, obtaining the device status of the target electric meter according to a communication method that does not pass through the target data acquisition interface; If the device state of the target electric meter is in working state, determining a test communication protocol from a preset communication protocol set, wherein the test communication protocol is a communication protocol having a correlation with the first communication protocol greater than a preset threshold; Replacing the first communication protocol of the target data acquisition interface with the test communication protocol; Sending test information to the target electric meter according to the test communication protocol; If the test completion information fed back by the target electric meter according to the test information is received within the second preset time, a prompt information indicating that the adaptation protocol of the target data acquisition interface is the test communication protocol is sent to the data collection terminal.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are coupled; The memory is used to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to implement the method according to any one of claims 1-6.

10. A computer-readable storage medium having one or more computer instructions stored thereon, characterized in that: The instruction is executed by a processor to implement the method according to any one of claims 1 to 6.