CN107819621B - Gateway configuration method and device and gateway - Google Patents

Gateway configuration method and device and gateway Download PDF

Info

Publication number
CN107819621B
CN107819621B CN201711078973.7A CN201711078973A CN107819621B CN 107819621 B CN107819621 B CN 107819621B CN 201711078973 A CN201711078973 A CN 201711078973A CN 107819621 B CN107819621 B CN 107819621B
Authority
CN
China
Prior art keywords
gateway
data
parameters
mode
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201711078973.7A
Other languages
Chinese (zh)
Other versions
CN107819621A (en
Inventor
吴文豪
张智伟
林宝伟
任鹏
文武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201711078973.7A priority Critical patent/CN107819621B/en
Publication of CN107819621A publication Critical patent/CN107819621A/en
Application granted granted Critical
Publication of CN107819621B publication Critical patent/CN107819621B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a gateway configuration method and device and a gateway. Wherein, the method comprises the following steps: configuring a first-level parameter of the gateway based on a configuration port of the gateway; the first-level parameters comprise parameters of data before conversion and parameters of data after conversion; data converted by the gateway is divided into pre-conversion data and post-conversion data; configuring a secondary parameter of each frame data aiming at each frame data in the primary parameters; and loading the primary parameters and the secondary parameters to the gateway. The invention completes the relevant parameter setting of the gateway based on the configuration port without the operation of professional technical personnel. Therefore, the workload of gateway development is effectively reduced, and the gateway development period and the development difficulty of the project are reduced.

Description

Gateway configuration method and device and gateway
Technical Field
The invention relates to the technical field of gateways, in particular to a gateway configuration method and device and a gateway.
Background
The gateway function is mainly used for data information acquisition, and often, for each application scenario, the data format to be acquired has a large or small change, and different communication protocols also exist, so that a gateway for protocol conversion needs to be developed for actual situations to acquire data information each time these projects are developed. The disadvantages presented here are two-fold:
(1) aiming at different devices, software development is required each time, wherein the portability is poor;
(2) the software designer of the gateway must be a professional developer, and the requirement on design is high.
Aiming at the problem of how to reduce the development workload of the gateway in the prior art, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a gateway configuration method, a gateway configuration device and a gateway, and aims to solve the problem of reducing the development workload of the gateway in the prior art.
In order to solve the above technical problem, the present invention provides a method for configuring a gateway, wherein the method includes: configuring a first-level parameter of the gateway based on a configuration port of the gateway; the first-level parameters comprise parameters of data before conversion and parameters of data after conversion; data converted by the gateway is divided into pre-conversion data and post-conversion data; configuring a secondary parameter of each frame data aiming at each frame data in the primary parameters; and loading the primary parameters and the secondary parameters to the gateway.
Further, the primary parameter includes the following three parts: frame header part, effective data part and check information part.
Further, the frame header part includes: a data type of each byte and a value of each byte; wherein the data type includes at least one of: device address, effective data length, function code, ID number; the valid data portion includes: mapping relation between data before and after conversion, precision change before and after conversion, numerical value change before and after conversion, and data meaning correlation before and after conversion; the verification information part at least comprises one of the following verification modes: XOL, CRC.
Further, the secondary parameters include the following two parts: working mode, valid data type.
Further, the operation mode includes at least one of: initializing a sending mode, initializing a receiving mode, a sending mode in operation, a receiving mode in operation, a sending mode per se and a receiving mode per se; the valid data type refers to a unit of valid data, the unit including at least one of: word, Byte, Bit.
Further, loading the primary parameters and the secondary parameters to the gateway is implemented by at least one of the following ways: a mode of burning a program to a gateway on site and a mode of configuring parameters to the gateway on site communication.
Further, the configuration port is integrated with the gateway; alternatively, the configuration port is an add-on port of the gateway.
Further, the configuration port is at least one of: application software, a display, a touch screen and a communication interface.
The invention also provides a gateway configuration device, wherein the device comprises: the first configuration module is used for configuring the first-level parameters of the gateway based on the configuration port of the gateway; the first-level parameters comprise parameters of data before conversion and parameters of data after conversion; data converted by the gateway is divided into pre-conversion data and post-conversion data; the second configuration module is used for configuring the secondary parameter of each frame data aiming at each frame data in the primary parameters; and the loading module is used for loading the primary parameters and the secondary parameters to the gateway.
Further, the primary parameter includes the following three parts: frame header part, effective data part and check information part.
Further, the secondary parameters include the following two parts: working mode, valid data type.
The present invention also provides a gateway, wherein the gateway comprises: configuring a port and an application software module; the method comprises the following steps that an operation interface of an application software module is provided with a pre-conversion configuration window and a post-conversion configuration window; the pre-conversion configuration window is used for configuring parameters of pre-conversion data of the gateway and secondary parameters of each frame data in the parameters; the converted configuration window is used for configuring parameters of converted data of the gateway and secondary parameters of data of each frame in the parameters.
By applying the technical scheme of the invention, the data are classified and matched with the designed configuration port, the relevant parameter setting of the gateway is completed based on the configuration port, and professional technical personnel are not required to operate. Therefore, the workload of gateway development is effectively reduced, and the gateway development period and the development difficulty of the project are reduced.
Drawings
Fig. 1 is a flowchart of a configuration method of a gateway according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a configuration of a first level parameter according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a two-level parameter configuration according to an embodiment of the present invention;
fig. 4 is a block diagram of a configuration apparatus of a gateway according to an embodiment of the present invention;
fig. 5 is a flow chart of gateway configuration according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and the examples, but without limiting the invention.
Example one
Fig. 1 is a flowchart of a configuration method of a gateway according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, configuring first-level parameters of a gateway based on a configuration port of the gateway; the first-level parameters comprise parameters of data before conversion and parameters of data after conversion; data converted by the gateway is divided into pre-conversion data and post-conversion data;
step S102, aiming at each frame data in the primary parameters, configuring a secondary parameter of each frame data;
and step S103, loading the primary parameters and the secondary parameters to the gateway.
In the embodiment, data is classified and matched with the designed configuration port, and the relevant parameter setting of the gateway is completed based on the configuration port without the operation of professional technicians. Therefore, the workload of gateway development is effectively reduced, and the gateway development period and the development difficulty of the project are reduced.
The gateway of the invention realizes the field programmable generalized gateway by a configuration mode, effectively enhances the universality and greatly reduces the program development workload of the gateway. The communication mode of the gateway interface of this embodiment may be various, such as 485, CAN, ethernet, etc., which are used more in the industry at present, and one end of the acquisition (before conversion) and one end of the forwarding (after conversion) may be configured as different physical ports, which are computer application software, and certainly, the ports are not limited to computer application software, and may be a display, a touch screen, a communication interface, etc. The port can be integrated with the gateway or added to the gateway, namely an additional port of the gateway.
In this embodiment, data to be converted by the gateway is divided into pre-conversion data and post-conversion data by configuring parameters, and the parameters of the pre-conversion data and the parameters of the post-conversion data may be referred to as first-level parameters. Fig. 2 is a schematic diagram of a configuration of a primary parameter according to an embodiment of the present invention, and as shown in fig. 2, the primary parameter includes three parts, namely a frame header, valid data, and a check. Specifically, the method comprises the following steps:
(1) the frame header part, the information of which is generally a fixed byte length and a fixed value or range value, can freely configure the type and specific value of each byte according to the data format on a specific physical link. For example, according to the standard Modbus protocol, the first byte is the device address, the second byte is the function code, the third and fourth bytes are the data address to be accessed, and the fifth and sixth bytes are the number of data to be accessed. The data type and specific data of each byte are configured according to the format. The data type includes the content related to various protocols such as device address, effective data length, function code, ID number, etc. among the specific configurable parameters.
(2) The effective data part is used for configuring a position mapping relation of the data before conversion corresponding to the data after conversion according to the application condition; the relationship of change in the numerical value, for example: a certain byte of the protocol A before conversion is 0x01, and after conversion, the byte needs to be represented by 0 xaa; the precision of the numerical value changes, for example, the original value is 0.0001, only 0.01 is needed after conversion, and the configuration is reduced by 100 times; the meaning of data is related to the record, for example, the meaning of some data in the protocol needs to be represented by two bytes, and some can be represented by only one byte. The parameters given in fig. 2 are only a few examples, and in particular the part of configurable parameters relates to the transformation relations of all valid data.
(3) And checking part, wherein the part of information only needs to select a checking mode, such as XOL, CRC and the like.
Next, for each frame of data in the primary parameters, the secondary parameters of each frame of data are configured. Fig. 3 is a schematic diagram of a configuration of secondary parameters according to an embodiment of the present invention, and as shown in fig. 3, the secondary parameters include an operation mode and a valid data type. Specifically, the method comprises the following steps:
(1) the working modes mainly comprise an initialization sending mode, an initialization receiving mode, a sending mode in operation and a receiving mode in operation, the four modes are mainly used for data conversion, sending and receiving are in one-to-one correspondence, the initialization sending mode and the initialization receiving mode are used when the gateway carries out initialization communication on the equipment, and the sending mode in operation and the receiving mode in operation are used for operation of finishing initialization of the gateway. For some gateways' own data processing, the operation mode also includes own sending mode and own receiving mode, fig. 3 shows 6 operation modes, but the invention includes not only these six, but also all the modes related to sending and receiving.
(2) The valid data type, i.e., the data type of valid data, refers to the unit of valid data, such as Word, Byte, and Bit, to which the header frame of the current configuration refers.
After the first-level parameters and the second-level parameters are configured, the first-level parameters and the second-level parameters are loaded to the gateway, and the method can be realized by at least one of the following modes: a mode of burning a program to a gateway on site and a mode of configuring parameters to the gateway on site communication.
Example two
Corresponding to the configuration method of the gateway introduced in fig. 1, the present embodiment provides a configuration apparatus of the gateway, as shown in fig. 4, the configuration apparatus of the gateway includes:
a first configuration module 10, configured to configure a first-level parameter of a gateway based on a configuration port of the gateway; the first-level parameters comprise parameters of data before conversion and parameters of data after conversion; data converted by the gateway is divided into pre-conversion data and post-conversion data;
a second configuration module 20, connected to the first configuration module 10, for configuring the secondary parameter of each frame data for each frame data in the primary parameters;
and a loading module 30 connected to the second configuration module 20 for loading the primary parameters and the secondary parameters to the gateway.
In the embodiment, data are classified and matched with the designed configuration port, and relevant parameter setting is completed through the configuration port without operation of professional technicians. Therefore, the workload of gateway development is effectively reduced, and the gateway development period and the development difficulty of the project are reduced.
In this embodiment, data to be converted by the gateway is divided into pre-conversion data and post-conversion data by configuring parameters, and the parameters of the pre-conversion data and the parameters of the post-conversion data may be referred to as first-level parameters. The first configuration module 10 configures a primary parameter, where the primary parameter includes a frame header, valid data, and a check. The frame header part includes: a data type of each byte and a value of each byte; wherein the data type includes at least one of: device address, effective data length, function code, ID number; the valid data portion includes: mapping relation between data before and after conversion, precision change before and after conversion, numerical value change before and after conversion, and data meaning correlation before and after conversion; the verification information part at least comprises one of the following verification modes: XOL, CRC.
Next, the second configuration module 20 configures the secondary parameter of each frame data for each frame data in the primary parameters. The secondary parameters include the following two components: working mode, valid data type. The working mode at least comprises one of the following modes: initializing a sending mode, initializing a receiving mode, a sending mode in operation, a receiving mode in operation, a sending mode per se and a receiving mode per se; the valid data type refers to a unit of valid data, the unit including at least one of: word, Byte, Bit.
EXAMPLE III
This embodiment provides a gateway, which includes: configuring a port and an application software module; the gateway provides a configuration port for a user to set, and a configuration window before conversion and a configuration window after conversion are provided on an operation interface of the special application software module. The pre-conversion configuration window is used for configuring parameters of pre-conversion data of the gateway and secondary parameters of each frame data in the parameters; the converted configuration window is used for configuring parameters of converted data of the gateway and secondary parameters of each frame data in the parameters.
The embodiment realizes the field programmable generalized gateway, effectively enhances the universality and greatly reduces the program development workload of the gateway.
Fig. 5 is a flow chart of gateway configuration according to an embodiment of the present invention, and as shown in fig. 5, the flow chart includes:
(1) a user inputs information through a configuration port;
(2) setting a physical port for acquiring data before conversion and a physical port for forwarding data after conversion;
(3) configuring information of each header frame according to a protocol;
(4) configuring a checking mode;
(5) configuring an operation mode (also referred to as an operation state) and a valid data type of each header frame;
(6) setting the mapping relation from the data before conversion to the data after conversion, the data precision change after conversion, the change after conversion and the correlation of data meaning; then, storing the configuration information and continuing to configure the next device;
(7) and after the configuration is finished, outputting the configuration information and loading the configuration information to the gateway.
The universal gateway of the invention not only supports the data conversion of a single device, for example, the gateway needs to collect the data of a plurality of devices and forward the data to the Ethernet, but the devices are all in the Modbus protocol-based format, but the contents in the specific protocol are different. A user only needs to configure and store all the information in fig. 2 and fig. 3 through a configuration port, multiple devices repeat the configuration operation in fig. 5, the gateway automatically marks and processes multiple configurations, and finally loads the configurations to the gateway after the configuration is completed.
In this embodiment, as described above, through the provided configuration port, data parameter configuration can be performed on site, and finally, the function of the field programming universal gateway is implemented. Through the universal gateway of the embodiment, a user can realize the gateway of any special occasion only by configuring parameters.
From the above description, it can be seen that the present invention provides a field programmable universal gateway and a gateway design scheme, which greatly reduce the development workload of the gateway program. The universal gateway can be used only by using a special configuration port to complete field programming. The difficulty of gateway design is reduced, and finally the cost is indirectly reduced.
Of course, the above is a preferred embodiment of the present invention. It should be noted that, for a person skilled in the art, several modifications and refinements can be made without departing from the basic principle of the invention, and these modifications and refinements are also considered to be within the protective scope of the invention.

Claims (10)

1. A method for configuring a gateway, the method comprising:
configuring a first-level parameter of the gateway based on a configuration port of the gateway; the first-level parameters comprise parameters of data before conversion and parameters of data after conversion; data converted by the gateway is divided into pre-conversion data and post-conversion data;
configuring a secondary parameter of each frame data aiming at each frame data in the primary parameters; wherein the secondary parameters include: an operation mode and a valid data type, wherein the operation mode at least comprises one of the following modes: initializing a sending mode, initializing a receiving mode, a sending mode in operation, a receiving mode in operation, a sending mode per se and a receiving mode per se; the initialization sending mode and the initialization receiving mode are used when the gateway performs initialization communication on equipment, the running sending mode and the running receiving mode are used for running after the gateway initialization is finished, and the self sending mode and the self receiving mode are used for self data processing of the gateway;
and loading the primary parameters and the secondary parameters to the gateway.
2. The method of claim 1, wherein the primary parameters include the following three components: frame header part, effective data part and check information part.
3. The method of claim 2,
the frame header part includes: a data type of each byte and a value of each byte; wherein the data type includes at least one of: device address, effective data length, function code, ID number;
the valid data portion includes: mapping relation between data before and after conversion, precision change before and after conversion, numerical value change before and after conversion, and data meaning correlation before and after conversion;
the verification information part at least comprises one of the following verification modes: XOR check XOR, cyclic redundancy check CRC.
4. The method of claim 1,
the valid data type refers to a unit of valid data, the unit including at least one of: word, Byte, Bit.
5. The method of claim 1, wherein loading the primary parameters and the secondary parameters into the gateway is performed by at least one of:
a mode of burning a program to a gateway on site and a mode of configuring parameters to the gateway on site communication.
6. The method of claim 1, wherein the configuration port is integral with the gateway; alternatively, the configuration port is an add-on port of the gateway.
7. The method of claim 1, wherein the configuration port is at least one of: application software, a display, a touch screen and a communication interface.
8. An apparatus for configuring a gateway, the apparatus comprising:
the first configuration module is used for configuring the first-level parameters of the gateway based on the configuration port of the gateway; the first-level parameters comprise parameters of data before conversion and parameters of data after conversion; data converted by the gateway is divided into pre-conversion data and post-conversion data;
the second configuration module is used for configuring the secondary parameter of each frame data aiming at each frame data in the primary parameters; wherein the secondary parameters include: an operation mode and a valid data type, wherein the operation mode at least comprises one of the following modes: initializing a sending mode, initializing a receiving mode, a sending mode in operation, a receiving mode in operation, a sending mode per se and a receiving mode per se; the initialization sending mode and the initialization receiving mode are used when the gateway performs initialization communication on equipment, the running sending mode and the running receiving mode are used for running after the gateway initialization is finished, and the self sending mode and the self receiving mode are used for self data processing of the gateway;
and the loading module is used for loading the primary parameters and the secondary parameters to the gateway.
9. The apparatus of claim 8, wherein the primary parameter comprises the following three components: frame header part, effective data part and check information part.
10. A gateway, characterized in that the gateway comprises: the connected configuration port and the application software module; the configuration port is used for a user to input setting information, and an operation interface of the application software module is provided with a configuration window before conversion and a configuration window after conversion;
the pre-conversion configuration window is used for configuring parameters of pre-conversion data of the gateway and secondary parameters of each frame data in the parameters; wherein the secondary parameters include: an operation mode and a valid data type, wherein the operation mode at least comprises one of the following modes: initializing a sending mode, initializing a receiving mode, a sending mode in operation, a receiving mode in operation, a sending mode per se and a receiving mode per se; the initialization sending mode and the initialization receiving mode are used when the gateway performs initialization communication on equipment, the running sending mode and the running receiving mode are used for running after the gateway initialization is finished, and the self sending mode and the self receiving mode are used for self data processing of the gateway;
the converted configuration window is used for configuring parameters of converted data of the gateway and secondary parameters of data of each frame in the parameters.
CN201711078973.7A 2017-11-06 2017-11-06 Gateway configuration method and device and gateway Expired - Fee Related CN107819621B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711078973.7A CN107819621B (en) 2017-11-06 2017-11-06 Gateway configuration method and device and gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711078973.7A CN107819621B (en) 2017-11-06 2017-11-06 Gateway configuration method and device and gateway

Publications (2)

Publication Number Publication Date
CN107819621A CN107819621A (en) 2018-03-20
CN107819621B true CN107819621B (en) 2020-04-21

Family

ID=61603807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711078973.7A Expired - Fee Related CN107819621B (en) 2017-11-06 2017-11-06 Gateway configuration method and device and gateway

Country Status (1)

Country Link
CN (1) CN107819621B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519288A (en) * 2019-09-02 2019-11-29 珠海格力电器股份有限公司 Communication protocol configuration method, device and configuration system of data converter

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050239445A1 (en) * 2004-04-16 2005-10-27 Jeyhan Karaoguz Method and system for providing registration, authentication and access via broadband access gateway
CN100568875C (en) * 2005-12-31 2009-12-09 中兴通讯股份有限公司 A kind of method that on the Linux protocol stack, realizes port triggering function
CN103139059B (en) * 2013-02-19 2015-10-21 中国矿业大学 Gateway is resolved in Coal Mine Electromechanical Equipment data acquisition
CN105939253A (en) * 2016-04-14 2016-09-14 江汉大学 Industrial wireless gateway device and protocol conversion method thereof

Also Published As

Publication number Publication date
CN107819621A (en) 2018-03-20

Similar Documents

Publication Publication Date Title
CN108769165B (en) Data processing method in Internet of things and Internet of things access system
CN109768970B (en) Configurable universal protocol generation method
EP3042254B1 (en) Systems and methods for virtualizing a programmable logic controller
CN107168971B (en) Data processing method and device for webpage application
CN103823698A (en) Method and device for programming and starting FPGA target program and DSP target program
JP2016164775A (en) Field device commissioning system and method
CN106941501B (en) Data communication method and device
EP2746963A1 (en) Method and system for identifying file type
CN111683066A (en) Heterogeneous system integration method and device, computer equipment and storage medium
CN112887451B (en) Domain name resolution method and device and computer equipment
CN103607376A (en) Method and device for compatible protocol
CN112367234B (en) Simulation data generation method, terminal device and computer-readable storage medium
CN103378994A (en) Method and terminal for testing communication equipment
CN104423378A (en) Vehicle electronic control unit calibration
CN116915875B (en) General method for analyzing modbus equipment by Internet of things and modbus system
CN105005543A (en) Interface generation apparatus and method
CN107819621B (en) Gateway configuration method and device and gateway
US20120278058A1 (en) Plc simulator based on reconfigurable components
US10268611B2 (en) Input/output (I/O) binding with automatic international electromechanical commission (IEC) address generation in remote terminal unit (RTU) configuration
CN108600150A (en) The data acquisition flow method of data acquisition platform and internet-of-things terminal cooperation
CN104836639B (en) A kind of data transmission method for transmitting many algorithms parameter
CN107809345B (en) Gateway data checking tool, method and device for checking gateway data
CN112491828B (en) Message analysis method, device, server and storage medium
CN104536887A (en) Communication data detection method and device
KR101725155B1 (en) Method for converting information analyzed from a network database to software architecture design

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200421

CF01 Termination of patent right due to non-payment of annual fee