[go: up one dir, main page]

CN112398682B - Internet of things gateway configuration method and device, computer equipment and storage medium - Google Patents

Internet of things gateway configuration method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112398682B
CN112398682B CN202011137133.5A CN202011137133A CN112398682B CN 112398682 B CN112398682 B CN 112398682B CN 202011137133 A CN202011137133 A CN 202011137133A CN 112398682 B CN112398682 B CN 112398682B
Authority
CN
China
Prior art keywords
internet
target
things
gateway
value
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.)
Active
Application number
CN202011137133.5A
Other languages
Chinese (zh)
Other versions
CN112398682A (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.)
Shenzhen Miracle Intelligent Network Co Ltd
Original Assignee
Shenzhen Miracle Intelligent Network Co Ltd
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 Shenzhen Miracle Intelligent Network Co Ltd filed Critical Shenzhen Miracle Intelligent Network Co Ltd
Priority to CN202011137133.5A priority Critical patent/CN112398682B/en
Publication of CN112398682A publication Critical patent/CN112398682A/en
Application granted granted Critical
Publication of CN112398682B publication Critical patent/CN112398682B/en
Active 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a method and a device for configuring an internet of things gateway, computer equipment and a storage medium. The method comprises the following steps: and acquiring an initial internet protocol address of the internet of things gateway. Reading a target coding value of the mechanical encoder through the gateway of the Internet of things; the target coding value is set and obtained in the power-off state of the gateway of the Internet of things. And determining the equipment parameters of the target Internet of things equipment matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things equipment. And generating a target internet protocol address according to the initial internet protocol address and the target coding value. And configuring the gateway of the Internet of things according to the equipment parameters and the target Internet protocol address of the target Internet of things equipment. By adopting the method, the configuration efficiency of the gateway of the Internet of things can be improved.

Description

Internet of things gateway configuration method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of internet of things, in particular to a method and a device for configuring an internet of things gateway, computer equipment and a storage medium.
Background
With the development of computer technology, the technology of internet of things appears, which means that any object is connected with a network through information sensing equipment according to an agreed protocol, and the object performs information exchange and communication through an information transmission medium to realize functions such as intelligent identification, positioning, tracking, supervision and the like. The realization of the technology of the internet of things depends on the gateway of the internet of things. The gateway of the internet of things is a link for connecting the sensing network and the traditional communication network. As gateway equipment, the gateway of the Internet of things can realize protocol conversion between the sensing network and the communication network and between different types of sensing networks, and can realize wide area interconnection and local area interconnection. In addition, the gateway of the Internet of things further has an equipment management function, all sensing nodes on the bottom layer can be managed through the gateway equipment of the Internet of things, relevant information of all the sensing nodes is known, and remote control is achieved. At present, when an Internet of things gateway is installed and deployed, the Internet of things gateway needs to be powered on and started up, and an IP (Internet Protocol Address) Address and functions of an intelligent gateway are configured according to a network environment and external equipment.
However, in the current configuration method of the internet of things gateway, the internet of things gateway can be configured only after the internet of things gateway needs to be powered on site and other external devices need to be installed, so that the configuration efficiency of the internet of things gateway is low.
Disclosure of Invention
In view of the above, it is necessary to provide an internet of things gateway configuration method, an internet of things gateway configuration device, a computer device, and a storage medium, which can improve the configuration efficiency of an internet of things gateway.
A method for configuring an Internet of things gateway, the method comprising:
acquiring an initial internet protocol address of an internet of things gateway;
reading a target coding value of a mechanical encoder through the gateway of the Internet of things; the target coding value is set in a power-off state of the gateway of the Internet of things;
determining a device parameter of a target Internet of things device matched with the target coding value from a mapping relation list between a preset coding value and the Internet of things device;
generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and configuring the Internet of things gateway according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
In one embodiment, the reading, by the gateway of internet of things, a target code value of a mechanical encoder includes:
determining the position relationship between the mechanical encoder and the gateway of the Internet of things;
when the mechanical encoder is arranged inside the Internet of things gateway, a target encoding value of the mechanical encoder is directly read through an encoding value reader in the Internet of things gateway;
when the mechanical encoder is arranged outside the Internet of things gateway, the mechanical encoder is established with the communication connection of the Internet of things gateway through a reading interface in the mechanical encoder, and a target encoding value of the mechanical encoder is read based on the communication connection and an encoding controller arranged in the mechanical encoder.
In one embodiment, the generating a target internet protocol address according to the initial internet protocol address and the target encoding value includes:
carrying out address field extraction processing on the initial Internet protocol address to obtain at least one address field;
determining a target address field from the at least one address field;
and generating a target internet protocol address according to the target address field and the target coding value.
In one embodiment, the generating a target internet protocol address according to the target address field and the target encoding value includes:
determining a data type of the target encoding value;
when the data type of the target coding value is a decimal type, modifying the initial address value corresponding to the target address field into the target coding value to obtain a target internet protocol address;
and when the data type of the target coding value is a non-decimal type, converting the target coding value into a decimal type target coding value according to a data conversion rule corresponding to the data type, and modifying the initial address value corresponding to the target address field into a decimal type target coding value to obtain the target internet protocol address.
In one embodiment, the method further comprises:
encrypting the configuration file generated after the Internet of things gateway is configured through an encryption key;
when modification operation on the encrypted configuration file is monitored, a decryption key corresponding to the encryption key is obtained;
and decrypting the encrypted configuration file through the decryption key, and modifying the decrypted configuration file.
An internet of things gateway configuration system, the system comprising: the system comprises a mechanical encoder, an Internet of things gateway and a configuration server;
the mechanical encoder is used for setting a target encoding value in the power-off state of the gateway of the Internet of things;
the Internet of things gateway is used for reading a target coding value of the mechanical encoder;
the configuration server is used for acquiring an initial internet protocol address of the gateway of the Internet of things; reading a target coding value of a mechanical encoder through the gateway of the Internet of things; the target coding value is set in a power-off state of the gateway of the Internet of things; determining a device parameter of a target Internet of things device matched with the target coding value from a mapping relation list between a preset coding value and the Internet of things device; generating a target internet protocol address according to the initial internet protocol address and the target coding value; and configuring the gateway of the Internet of things according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
An internet of things gateway configuration device, the device comprising:
the acquisition module is used for acquiring an initial Internet protocol address of the gateway of the Internet of things;
the reading module is used for reading a target coding value of the mechanical encoder through the internet of things gateway; the target coding value is set in a power-off state of the gateway of the Internet of things;
the determining module is used for determining the equipment parameters of the target Internet of things equipment matched with the target coding value from a preset mapping relation list between the coding value and the Internet of things equipment;
the generating module is used for generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and the configuration module is used for configuring the Internet of things gateway according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring an initial internet protocol address of an internet of things gateway;
reading a target coding value of a mechanical encoder through the gateway of the Internet of things; the target coding value is set in a power-off state of the gateway of the Internet of things;
determining a device parameter of a target Internet of things device matched with the target coding value from a mapping relation list between a preset coding value and the Internet of things device;
generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and configuring the gateway of the Internet of things according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring an initial internet protocol address of an internet of things gateway;
reading a target coding value of a mechanical encoder through the gateway of the Internet of things; the target coding value is set in a power-off state of the gateway of the Internet of things;
determining equipment parameters of target Internet of things equipment matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things equipment;
generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and configuring the gateway of the Internet of things according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
According to the method and device for configuring the Internet of things gateway, the computer equipment and the storage medium, the initial Internet protocol address of the Internet of things gateway is obtained, and the target coding value of the mechanical encoder is read through the Internet of things gateway; the target coding value is set in the power-off state of the Internet of things gateway, so that the configuration of the Internet of things gateway does not depend on the power-on state. And determining the device parameters of the target Internet of things device matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things device. And generating a target internet protocol address according to the initial internet protocol address and the target coding value, and configuring the internet of things gateway according to the equipment parameters of the target internet of things equipment and the target internet protocol address. Therefore, the target coding value is set in the mechanical encoder in the power-off state of the Internet of things gateway, so that the Internet of things gateway can still be deployed in the power-off state. And after the Internet of things gateway is electrified, the Internet of things gateway is automatically configured according to the target coding value. Therefore, when the Internet of things gateway on the deployment site is not powered on and other external Internet of things equipment is not installed, the Internet of things gateway can be powered off and configured, the site deployment time is shortened, and the configuration efficiency of the Internet of things gateway is improved.
Drawings
Fig. 1 is an application scenario diagram of a gateway configuration method of the internet of things in an embodiment;
fig. 2 is a schematic flowchart of a gateway configuration method of the internet of things in an embodiment;
FIG. 3A is a diagram illustrating initial encoded values of a mechanical encoder according to one embodiment;
FIG. 3B is a diagram illustrating target encoding values of a mechanical encoder according to an embodiment;
FIG. 4 is a schematic diagram illustrating reading of a target code value when a mechanical encoder is built in an Internet of things gateway in one embodiment;
fig. 5 is a block diagram of an internet of things gateway configuration device in an embodiment;
fig. 6 is a block diagram of a gateway configuration apparatus of the internet of things in another embodiment;
FIG. 7 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for configuring the gateway of the internet of things can be applied to the application environment shown in fig. 1. The application environment includes a mechanical encoder 102, an internet of things gateway 104, and a configuration server 106. The mechanical encoder 102 and the internet of things gateway 104 communicate over a network, and the internet of things gateway 104 and the configuration server 106 communicate over a network. The configuration server 106 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers. Those skilled in the art will understand that the application environment shown in fig. 1 is only a part of the scenario related to the present application, and does not constitute a limitation to the application environment of the present application.
The configuration server 106 obtains an initial internet protocol address of the internet of things gateway 104. The configuration server 106 reads a target coding value of the mechanical encoder 102 through the internet of things gateway 104; the target code value is set when the internet of things gateway 104 is in a power-off state. The configuration server 106 determines a device parameter of the target internet of things device matched with the target coding value from a preset mapping relationship list between the coding value and the internet of things device. The configuration server 106 generates a target internet protocol address based on the initial internet protocol address and the target code value. The configuration server 106 configures the internet of things gateway 104 according to the device parameters of the target internet of things device and the target internet protocol address.
In an embodiment, as shown in fig. 2, a method for configuring an internet of things gateway is provided, which is described by taking the method as an example when the method is applied to the configuration server 106 in fig. 1, and includes the following steps:
s202, an initial Internet protocol address of the Internet of things gateway is obtained.
Wherein the internet protocol address is an IP address. The initial internet protocol address is an initial internet protocol address of the internet of things gateway set when the internet of things gateway leaves a factory.
Specifically, the internet of things gateway is provided with a default initial internet protocol address when leaving a factory, the internet of things gateway can communicate with a configuration server, and the configuration server can obtain the initial internet protocol address of the internet of things gateway from the internet of things gateway.
S204, reading a target code value of the mechanical encoder through the gateway of the Internet of things; the target coding value is set and obtained in the power-off state of the gateway of the Internet of things.
The target coding value is a coding value corresponding to the target internet of things device.
Specifically, a user can set a target coding value of the mechanical encoder in a power-off state of the internet of things gateway, and the mechanical encoder can acquire the target coding value set by the user. The configuration server can monitor the power-on state of the Internet of things gateway in real time, and when the power-on of the Internet of things gateway is monitored, the configuration server can read a target coding value of the mechanical encoder through the Internet of things gateway.
In one embodiment, the mechanical encoder may comprise any one of a dial switch, a coded switch, a potentiometer, and the like.
In one embodiment, as shown in FIG. 3A, the initial code value of the mechanical encoder is "0000". When the internet of things gateway is deployed on site, a user can set the target code value of the mechanical encoder to be "0028" in the power-off state of the internet of things gateway, as shown in fig. 3B. Further, the mechanical encoder may acquire a target encoding value "0028" set by the user.
And S206, determining the device parameters of the target Internet of things device matched with the target code value from the preset mapping relation list between the code value and the Internet of things device.
Specifically, a mapping relationship between at least one code value and at least one internet of things device is preset in the configuration server and stored in a mapping relationship list. When the configuration server acquires the target code value from the internet of things gateway, the configuration server can determine the device parameters of the target internet of things device matched with the target code value from a preset mapping relation list between the code value and the internet of things device.
In one embodiment, the internet of things device may include at least one of a smart light, a temperature sensor, a humidity sensor, a smart refrigerator, a smart air conditioner, and the like. The device parameter may include at least one of a device identifier and device function information of the internet of things device.
And S208, generating a target Internet protocol address according to the initial Internet protocol address and the target coding value.
The target internet protocol address is an internet protocol address of the internet of things gateway which is finally used for managing the target internet of things equipment.
Specifically, the configuration server may determine a correspondence between an address field in the initial internet protocol address and the target encoding value, and generate the target internet protocol address. Wherein the address field is a component field of the internet protocol address.
And S210, configuring the gateway of the Internet of things according to the equipment parameters and the target Internet protocol address of the target Internet of things equipment.
Specifically, after acquiring the device parameter and the target internet protocol address of the target internet-of-things device, the configuration server may generate a configuration file according to the device parameter and the target internet protocol address of the target internet-of-things device, and thus, the configuration of the internet-of-things gateway is completed.
In the configuration method of the Internet of things gateway, an initial Internet protocol address of the Internet of things gateway is obtained, and a target coding value of a mechanical encoder is read through the Internet of things gateway; the target coding value is set in the power-off state of the Internet of things gateway, so that the configuration of the Internet of things gateway does not depend on the power-on state. And determining the device parameters of the target Internet of things device matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things device. And generating a target internet protocol address according to the initial internet protocol address and the target coding value, and configuring the internet of things gateway according to the equipment parameters of the target internet of things equipment and the target internet protocol address. Therefore, the target coding value is set in the mechanical encoder in the power-off state of the Internet of things gateway, so that the Internet of things gateway can still be deployed in the power-off state. And after the Internet of things gateway is electrified, the Internet of things gateway is automatically configured according to the target coding value. Therefore, when the Internet of things gateway on the deployment site is not powered on and other external Internet of things equipment is not installed, the Internet of things gateway can be powered off and configured, the site deployment time is shortened, and the configuration efficiency of the Internet of things gateway is improved.
In an embodiment, step S204, namely, the step of reading the target code value of the mechanical encoder through the internet of things gateway specifically includes: determining the position relationship between a mechanical encoder and an internet of things gateway; when the mechanical encoder is arranged inside the gateway of the Internet of things, a target encoding value of the mechanical encoder is directly read through an encoding value reader in the gateway of the Internet of things; when the mechanical encoder is arranged outside the gateway of the Internet of things, the communication connection between the mechanical encoder and the gateway of the Internet of things is established through a reading interface in the mechanical encoder, and the target encoding value of the mechanical encoder is read based on the communication connection and an encoding controller arranged in the mechanical encoder.
Specifically, the position relationship between the mechanical encoder and the internet of things gateway may include that the mechanical encoder is disposed inside the internet of things gateway and the mechanical encoder is disposed outside the internet of things gateway. The configuration server can determine the position relation between the mechanical encoder and the gateway of the Internet of things. When the mechanical encoder is determined to be arranged inside the Internet of things gateway, the configuration server can directly read the target code value of the mechanical encoder through a code value reader in the Internet of things gateway. When no definite mechanical encoder is arranged outside the gateway of the Internet of things, the configuration server can establish communication connection between the mechanical encoder and the gateway of the Internet of things through a reading interface in the mechanical encoder, and reads a target encoding value of the mechanical encoder based on the communication connection and an encoding controller arranged in the mechanical encoder.
In one embodiment, the read interface may specifically include a digital interface and an analog interface. Examples of the digital Interface include any of SPI (Serial Peripheral Interface), I2C (Inter-Integrated Circuit), USB (Universal Serial Bus), RS485, and RS 232. The analog interface outputs different voltages, for example, depending on the encoding.
In one embodiment, as shown in fig. 4, when the mechanical encoder is disposed outside the internet of things gateway, the internet of things gateway may establish connection and communication with the mechanical encoder through the reading interface, and further, the internet of things gateway may read a target encoding value of the mechanical encoder through an encoding controller inside the mechanical encoder based on the communication connection.
In the above embodiment, the mechanical encoder is arranged in the internet of things gateway, and the mechanical encoder is arranged in the internet of things gateway in a manner of reading the target code value of the mechanical encoder corresponding to two position relationships between the outside of the internet of things gateway, so that the mechanical encoder is more flexibly arranged.
In an embodiment, the step S208 of generating the target internet protocol address according to the initial internet protocol address and the target encoding value specifically includes: carrying out address field extraction processing on the initial Internet protocol address to obtain at least one address field; determining a target address field from the at least one address field; and generating a target internet protocol address according to the target address field and the target coding value.
In particular, the internet protocol address may comprise at least one address field. The configuration server may perform address field extraction processing on the initial internet protocol address to obtain at least one address field. Each address field carries a respective field tag. The configuration server may determine the destination address field from at least one of the address fields according to the field tag carried by the destination address field. Further, the configuration server may generate the target internet protocol address based on the target address field and the target encoding value.
In the above embodiment, the initial internet protocol address is separated into the independent address fields by performing the address field extraction process on the initial internet protocol address, so as to facilitate the separate processing of each address field. And the target address field is determined from the extracted address field, and the target internet protocol address is generated according to the target address field and the target coding value, so that the configuration efficiency of the internet of things gateway is further improved.
In one embodiment, the step of generating the target internet protocol address according to the target address field and the target encoding value specifically includes: determining a data type of a target coding value; when the data type of the target coding value is a decimal type, modifying the initial address value corresponding to the target address field into the target coding value to obtain a target internet protocol address; and when the data type of the target coding value is not a decimal type, converting the target coding value into the decimal type target coding value according to a data conversion rule corresponding to the data type, and modifying the initial address value corresponding to the target address field into the decimal type target coding value to obtain the target Internet protocol address.
The initial address value is a numerical value corresponding to a target address field in the initial internet protocol address.
Specifically, the data type of the target encoding value may include any one of a binary type, an octal type, a decimal type, and a hexadecimal type. The configuration server may determine the data type of the target encoding value. When the data type of the target coding value is a decimal type, the configuration server can directly modify the initial address value corresponding to the target address field into the target coding value. The configuration server may generate the target internet protocol address according to initial address values corresponding to other address fields except the target address field. When the data type of the target coding value is not a decimal type, the target coding value is converted into the decimal type target coding value according to the data conversion rule corresponding to the data type, the initial address value corresponding to the target address field is modified into the decimal type target coding value, and the configuration server can generate the target internet protocol address according to the initial address values corresponding to the other address fields except the target address field.
For example, the initial internet protocol address of the internet of things gateway is "192.168.1.001", and the initial address value corresponding to the destination address field is "001". The target code value read by the configuration gateway is "128" in decimal type, and the configuration server can directly replace "001" with the target code value "128" to obtain the target internet protocol address "192.168.1.128".
In the above embodiment, the target coding values of different data types are processed, so that the data types of the target coding values can be more flexible, and the configuration efficiency of the internet of things gateway is further improved.
In one embodiment, the method for configuring the internet of things gateway specifically further includes: encrypting a configuration file generated after the gateway of the Internet of things is configured through an encryption key; when modification operation on the encrypted configuration file is monitored, a decryption key corresponding to the encryption key is obtained; and decrypting the encrypted configuration file through the decryption key, and modifying the decrypted configuration file.
Specifically, the configuration server may obtain the encryption key, and encrypt the configuration file generated after configuring the internet of things gateway through the encryption key. When a user wants to increase or decrease the internet of things equipment externally connected with the internet of things gateway, the user can modify the encrypted configuration file. The configuration server can monitor the modification operation of the encrypted configuration file in real time, and when the modification operation of the encrypted configuration file is monitored, the configuration server can obtain a decryption key corresponding to the encryption key. The configuration server can decrypt the encrypted configuration file through the decryption key and modify the decrypted configuration file.
In the embodiment, the configuration file is encrypted, so that illegal modification of the configuration file is avoided, and the stability of the internet of things gateway in managing the target internet of things equipment is improved.
It should be understood that although the various steps of fig. 2 are shown in order, the steps are not necessarily performed in order. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternatively with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided an internet of things gateway configuration apparatus 500, including: an obtaining module 501, a reading module 502, a determining module 503, a generating module 504, and a configuring module 505, wherein:
an obtaining module 501, configured to obtain an initial internet protocol address of an internet of things gateway.
A reading module 502, configured to read a target code value of a mechanical encoder through an internet of things gateway; the target coding value is set and obtained in the power-off state of the gateway of the Internet of things.
The determining module 503 is configured to determine, from a mapping relationship list between a preset code value and the internet of things device, a device parameter of the target internet of things device, where the device parameter matches the target code value.
A generating module 504, configured to generate a target internet protocol address according to the initial internet protocol address and the target encoding value.
The configuration module 505 is configured to configure the internet of things gateway according to the device parameter of the target internet of things device and the target internet protocol address.
In one embodiment, the reading module 502 is further configured to determine a position relationship between the mechanical encoder and the internet of things gateway; when the mechanical encoder is arranged inside the gateway of the Internet of things, a target encoding value of the mechanical encoder is directly read through an encoding value reader in the gateway of the Internet of things; when the mechanical encoder is arranged outside the gateway of the Internet of things, the communication connection between the mechanical encoder and the gateway of the Internet of things is established through a reading interface in the mechanical encoder, and the target encoding value of the mechanical encoder is read based on the communication connection and an encoding controller arranged in the mechanical encoder.
In an embodiment, the generating module 504 is further configured to perform address field extraction processing on the initial internet protocol address to obtain at least one address field; determining a target address field from the at least one address field; and generating a target internet protocol address according to the target address field and the target coding value.
In one embodiment, the generation module 504 is further configured to determine a data type of the target encoding value; when the data type of the target coding value is a decimal type, modifying the initial address value corresponding to the target address field into the target coding value to obtain a target internet protocol address; and when the data type of the target coding value is not a decimal type, converting the target coding value into the decimal type target coding value according to a data conversion rule corresponding to the data type, and modifying the initial address value corresponding to the target address field into the decimal type target coding value to obtain the target Internet protocol address.
Referring to fig. 6, in one embodiment, the internet of things gateway configuration apparatus 500 further includes: an encryption module 506, wherein:
the encryption module 506 is configured to encrypt the configuration file generated after the configuration of the internet of things gateway is performed through the encryption key; when modification operation on the encrypted configuration file is monitored, a decryption key corresponding to the encryption key is obtained; and decrypting the encrypted configuration file through the decryption key, and modifying the decrypted configuration file.
The internet of things gateway configuration device acquires an initial internet protocol address of the internet of things gateway and reads a target coding value of the mechanical encoder through the internet of things gateway; the target coding value is set in the power-off state of the Internet of things gateway, so that the configuration of the Internet of things gateway does not depend on the power-on state. And determining the device parameters of the target Internet of things device matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things device. And generating a target internet protocol address according to the initial internet protocol address and the target coding value, and configuring the internet of things gateway according to the equipment parameters of the target internet of things equipment and the target internet protocol address. Therefore, the target coding value is set in the mechanical encoder in the power-off state of the Internet of things gateway, so that the Internet of things gateway can still be deployed in the power-off state. And after the Internet of things gateway is electrified, the Internet of things gateway is automatically configured according to the target coding value. Therefore, when the Internet of things gateway on the deployment site is not powered on and other external Internet of things equipment is not installed, the Internet of things gateway can be powered off and configured, the site deployment time is shortened, and the configuration efficiency of the Internet of things gateway is improved.
For specific limitations of the configuration apparatus of the internet of things gateway, reference may be made to the above limitations on the configuration method of the internet of things gateway, and details are not described here. All or part of the modules in the gateway configuration device of the internet of things can be realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a gateway configuration system of the internet of things is provided, and the system comprises: mechanical encoder, thing networking gateway and configuration server.
And the mechanical encoder is used for setting a target encoding value in the power-off state of the Internet of things gateway.
And the Internet of things gateway is used for reading the target coding value of the mechanical encoder.
The configuration server is used for acquiring an initial Internet protocol address of the gateway of the Internet of things; reading a target coding value of the mechanical encoder through the gateway of the Internet of things; the target coding value is set in the power-off state of the gateway of the Internet of things; determining equipment parameters of target Internet of things equipment matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things equipment; generating a target internet protocol address according to the initial internet protocol address and the target coding value; and configuring the gateway of the Internet of things according to the equipment parameters and the target Internet protocol address of the target Internet of things equipment.
In one embodiment, a computer device is provided, which may be the configuration server 106 of fig. 1, and the internal structure thereof may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing gateway configuration data of the Internet of things. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for configuring an internet of things gateway.
It will be appreciated by those skilled in the art that the configuration shown in fig. 7 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring an initial internet protocol address of an internet of things gateway;
reading a target coding value of the mechanical encoder through the gateway of the Internet of things; the target coding value is set in the power-off state of the gateway of the Internet of things;
determining equipment parameters of target Internet of things equipment matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things equipment;
generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and configuring the gateway of the Internet of things according to the equipment parameters and the target Internet protocol address of the target Internet of things equipment.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining the position relationship between a mechanical encoder and an internet of things gateway;
when the mechanical encoder is arranged in the Internet of things gateway, a target encoding value of the mechanical encoder is directly read through an encoding value reader in the Internet of things gateway;
when the mechanical encoder is arranged outside the gateway of the Internet of things, the communication connection between the mechanical encoder and the gateway of the Internet of things is established through a reading interface in the mechanical encoder, and the target encoding value of the mechanical encoder is read based on the communication connection and an encoding controller arranged in the mechanical encoder.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
carrying out address field extraction processing on the initial Internet protocol address to obtain at least one address field;
determining a target address field from the at least one address field;
and generating a target internet protocol address according to the target address field and the target coding value.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a data type of a target coding value;
when the data type of the target coding value is a decimal type, modifying the initial address value corresponding to the target address field into the target coding value to obtain a target internet protocol address;
and when the data type of the target coding value is a non-decimal type, converting the target coding value into a decimal type target coding value according to a data conversion rule corresponding to the data type, and modifying the initial address value corresponding to the target address field into the decimal type target coding value to obtain the target Internet protocol address.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
encrypting a configuration file generated after the Internet of things gateway is configured through an encryption key;
when modification operation on the encrypted configuration file is monitored, a decryption key corresponding to the encryption key is obtained;
and decrypting the encrypted configuration file through the decryption key, and modifying the decrypted configuration file.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring an initial internet protocol address of an internet of things gateway;
reading a target coding value of a mechanical encoder through an internet-of-things gateway; the target coding value is set in the power-off state of the gateway of the Internet of things;
determining equipment parameters of target Internet of things equipment matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things equipment;
generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and configuring the gateway of the Internet of things according to the equipment parameters and the target Internet protocol address of the target Internet of things equipment.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining the position relationship between a mechanical encoder and an internet of things gateway;
when the mechanical encoder is arranged in the Internet of things gateway, a target encoding value of the mechanical encoder is directly read through an encoding value reader in the Internet of things gateway;
when the mechanical encoder is arranged outside the gateway of the Internet of things, the communication connection between the mechanical encoder and the gateway of the Internet of things is established through a reading interface in the mechanical encoder, and the target encoding value of the mechanical encoder is read based on the communication connection and an encoding controller arranged in the mechanical encoder.
In one embodiment, the computer program when executed by the processor further performs the steps of:
carrying out address field extraction processing on the initial Internet protocol address to obtain at least one address field;
determining a target address field from the at least one address field;
and generating a target internet protocol address according to the target address field and the target coding value.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a data type of a target coding value;
when the data type of the target coding value is a decimal type, modifying the initial address value corresponding to the target address field into the target coding value to obtain a target internet protocol address;
and when the data type of the target coding value is a non-decimal type, converting the target coding value into a decimal type target coding value according to a data conversion rule corresponding to the data type, and modifying the initial address value corresponding to the target address field into the decimal type target coding value to obtain the target Internet protocol address.
In one embodiment, the computer program when executed by the processor further performs the steps of:
encrypting a configuration file generated after the Internet of things gateway is configured through an encryption key;
when modification operation on the encrypted configuration file is monitored, a decryption key corresponding to the encryption key is obtained;
and decrypting the encrypted configuration file through the decryption key, and modifying the decrypted configuration file.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for configuring an Internet of things gateway is characterized by comprising the following steps:
acquiring an initial internet protocol address of an internet of things gateway;
reading a target coding value of a mechanical encoder through the gateway of the Internet of things; the target coding value is set in a power-off state of the gateway of the Internet of things;
determining a device parameter of a target Internet of things device matched with the target coding value from a mapping relation list between a preset coding value and the Internet of things device;
generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and configuring the gateway of the Internet of things according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
2. The method according to claim 1, wherein the reading, by the gateway of the internet of things, the target code value of the mechanical encoder comprises:
determining the position relation between the mechanical encoder and the gateway of the Internet of things;
when the mechanical encoder is arranged inside the gateway of the Internet of things, a target encoding value of the mechanical encoder is directly read through an encoding value reader in the gateway of the Internet of things;
when the mechanical encoder is arranged outside the Internet of things gateway, the mechanical encoder is established through a reading interface in the mechanical encoder, the communication connection of the mechanical encoder and the Internet of things gateway is established, and a target encoding value of the mechanical encoder is read based on the communication connection and an encoding controller arranged in the mechanical encoder.
3. The method of claim 1, wherein generating a target internet protocol address based on the initial internet protocol address and the target encoding value comprises:
carrying out address field extraction processing on the initial Internet protocol address to obtain at least one address field;
determining a target address field from the at least one address field;
and generating a target internet protocol address according to the target address field and the target coding value.
4. The method of claim 3, wherein generating a target internet protocol address based on the target address field and the target encoding value comprises:
determining a data type of the target encoding value;
when the data type of the target coding value is a decimal type, modifying the initial address value corresponding to the target address field into the target coding value to obtain a target internet protocol address;
and when the data type of the target coding value is not a decimal type, converting the target coding value into a decimal type target coding value according to a data conversion rule corresponding to the data type, and modifying an initial address value corresponding to the target address field into a decimal type target coding value to obtain a target Internet protocol address.
5. The method according to any one of claims 1 to 4, further comprising:
encrypting the configuration file generated after the Internet of things gateway is configured through an encryption key;
when modification operation on the encrypted configuration file is monitored, a decryption key corresponding to the encryption key is obtained;
and decrypting the encrypted configuration file through the decryption key, and modifying the decrypted configuration file.
6. An internet of things gateway configuration system, the system comprising: the system comprises a mechanical encoder, an Internet of things gateway and a configuration server;
the mechanical encoder is used for setting a target encoding value in the power-off state of the gateway of the Internet of things;
the Internet of things gateway is used for reading a target coding value of the mechanical encoder;
the configuration server is used for acquiring an initial internet protocol address of the internet of things gateway; reading a target coding value of a mechanical encoder through the gateway of the Internet of things; the target coding value is set in a power-off state of the gateway of the Internet of things; determining a device parameter of a target Internet of things device matched with the target coding value from a mapping relation list between a preset coding value and the Internet of things device; generating a target internet protocol address according to the initial internet protocol address and the target coding value; and configuring the gateway of the Internet of things according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
7. An internet of things gateway configuration device, the device comprising:
the acquisition module is used for acquiring an initial Internet protocol address of the gateway of the Internet of things;
the reading module is used for reading a target code value of the mechanical encoder through the gateway of the Internet of things; the target coding value is set in a power-off state of the gateway of the Internet of things;
the determining module is used for determining the equipment parameters of the target Internet of things equipment matched with the target coding value from a mapping relation list between the preset coding value and the Internet of things equipment;
the generating module is used for generating a target internet protocol address according to the initial internet protocol address and the target coding value;
and the configuration module is used for configuring the Internet of things gateway according to the equipment parameters of the target Internet of things equipment and the target Internet protocol address.
8. The apparatus of claim 7, wherein the reading module is further configured to determine a positional relationship between the mechanical encoder and the internet of things gateway; when the mechanical encoder is arranged inside the Internet of things gateway, a target encoding value of the mechanical encoder is directly read through an encoding value reader in the Internet of things gateway; when the mechanical encoder is arranged outside the Internet of things gateway, the mechanical encoder is established with the communication connection of the Internet of things gateway through a reading interface in the mechanical encoder, and a target encoding value of the mechanical encoder is read based on the communication connection and an encoding controller arranged in the mechanical encoder.
9. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor realizes the steps of the method of any of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202011137133.5A 2020-10-22 2020-10-22 Internet of things gateway configuration method and device, computer equipment and storage medium Active CN112398682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011137133.5A CN112398682B (en) 2020-10-22 2020-10-22 Internet of things gateway configuration method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011137133.5A CN112398682B (en) 2020-10-22 2020-10-22 Internet of things gateway configuration method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112398682A CN112398682A (en) 2021-02-23
CN112398682B true CN112398682B (en) 2022-11-15

Family

ID=74597168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011137133.5A Active CN112398682B (en) 2020-10-22 2020-10-22 Internet of things gateway configuration method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112398682B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412267A (en) * 2021-05-26 2022-11-29 广州视源电子科技股份有限公司 Equipment connection method, device and connection code generation method
CN113518004A (en) * 2021-06-17 2021-10-19 青岛海尔空调电子有限公司 IoT gateway management and control method and system
CN113824599A (en) * 2021-11-01 2021-12-21 珠海格力电器股份有限公司 Equipment networking and control method and device thereof, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1244933A (en) * 1996-10-25 2000-02-16 Ipf股份有限公司 System and method for managing and serving consumer product related information over the internet
CN1886946A (en) * 2003-09-30 2006-12-27 日本电气株式会社 Method for processing encoded data in interconnecting different types of communication networks, and gateway apparatus
CN102685269A (en) * 2012-05-16 2012-09-19 陈为人 Method and device for obtaining broadband dynamic IP (Internet protocol) address in real time

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143188B2 (en) * 2002-06-13 2006-11-28 Nvidia Corporation Method and apparatus for network address translation integration with internet protocol security
JP2005051473A (en) * 2003-07-28 2005-02-24 Sony Corp Network interconnection apparatus, network interconnection method, name resolution apparatus, and computer program
WO2016161564A1 (en) * 2015-04-07 2016-10-13 华为技术有限公司 Gateway device automatic networking method and device
CN109756450B (en) * 2017-11-03 2021-06-15 华为技术有限公司 Method, device and system for communication of Internet of things and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1244933A (en) * 1996-10-25 2000-02-16 Ipf股份有限公司 System and method for managing and serving consumer product related information over the internet
CN1886946A (en) * 2003-09-30 2006-12-27 日本电气株式会社 Method for processing encoded data in interconnecting different types of communication networks, and gateway apparatus
CN102685269A (en) * 2012-05-16 2012-09-19 陈为人 Method and device for obtaining broadband dynamic IP (Internet protocol) address in real time

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
浅谈三网融合技术;林国刚;《卫星电视与宽带多媒体》;20120820(第16期);全文 *
王朝晖 ; 孙敬伟 ; 王金辉.大容量综合媒体网关的设计与实现.《电力系统通信》.2012, *

Also Published As

Publication number Publication date
CN112398682A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
CN112398682B (en) Internet of things gateway configuration method and device, computer equipment and storage medium
CN109412937B (en) Gateway, LoRa network system, gateway operation method and storage medium
CN110932842A (en) System on chip for performing virtual private network functions and system including the same
CN113169861B (en) Disposable cipher book encryption for industrial wireless instrument
CN104850091A (en) Secure power supply for an industrial control system
CN111061678A (en) Service data processing method and device, computer equipment and storage medium
CN110011959A (en) Date storage method, data query method and system
CN108389124B (en) Data processing method, data processing device, computer equipment and storage medium
CN107872315B (en) Data processing method and intelligent terminal
CN116070526A (en) A construction method of digital twin model of energy system based on internet of things
US11848929B2 (en) IMEI storage
JP6659462B2 (en) Data transmission / reception method and sensing system
CN109995782B (en) Information processing method, device, system and computer storage medium
US20210273922A1 (en) Method for re-registering a smart electricity meter
US11601494B2 (en) Method for transferring data from a device to a data management means, switching unit, device and system
US20190349348A1 (en) Registry apparatus, agent device, application providing apparatus and corresponding methods
US20240283646A1 (en) Method in a secure element
CN110888892A (en) Block synchronization method, device and storage medium
CN111667190B (en) Electric power construction grounding monitoring method, device and server
CN111125645B (en) Method, system, device, computer equipment and medium for processing execution program
JP6613916B2 (en) Processing method determination device, portable information processing device, IC card, processing method determination method, and processing method determination program
KR20180028705A (en) Security element operating with wireless router, the wireless router, and method of forming internet network using the security element
CN111199596A (en) Intelligent door lock control method, device and system
US20220156359A1 (en) Provisioning system and method
CN110995837A (en) Underground cable collected data uploading method and system based on block chain

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