CN112367195B - Network configuration method, system and device - Google Patents

Network configuration method, system and device Download PDF

Info

Publication number
CN112367195B
CN112367195B CN202011179158.1A CN202011179158A CN112367195B CN 112367195 B CN112367195 B CN 112367195B CN 202011179158 A CN202011179158 A CN 202011179158A CN 112367195 B CN112367195 B CN 112367195B
Authority
CN
China
Prior art keywords
information
address
domain name
network configuration
preset
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
CN202011179158.1A
Other languages
Chinese (zh)
Other versions
CN112367195A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202011179158.1A priority Critical patent/CN112367195B/en
Publication of CN112367195A publication Critical patent/CN112367195A/en
Application granted granted Critical
Publication of CN112367195B publication Critical patent/CN112367195B/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
    • 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/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0826Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability for reduction of network costs
    • 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/0889Techniques to speed-up the configuration process
    • 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/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Abstract

The application provides a network configuration method, a system and a device, comprising: the server receives network configuration information submitted by a user; converting the network configuration information into address information in an IP address format according to a preset encoding rule, and displaying the address information; the domain name service equipment acquires address information submitted by a user and stores the corresponding relation between the address information and a preset domain name; a terminal to be configured broadcasts a domain name request message carrying a preset domain name, and receives address information corresponding to the preset domain name sent by a domain name service device; and converting the address information into network configuration information according to a preset encoding rule. This application need not to increase extra bluetooth module in waiting to dispose the terminal, reduces equipment cost. And an application program does not need to be added on a mobile phone or a computer of a user, and the compatibility problem does not need to be considered. The dynamic configuration of the terminal to be configured is realized, more configuration contents can be flexibly added, the configuration of a plurality of terminals to be configured is supported, the configuration complexity is reduced, and the configuration efficiency is improved.

Description

Network configuration method, system and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a network configuration method, system, and apparatus.
Background
With the wide application of the internet of things technology, a large number of devices need to access the internet. Many of these devices do not have human-machine interaction interfaces, such as some sensors or smart tags. After the devices need to access the server, the server performs remote management through a communication interface based on an IP (Internet Protocol). Therefore, how to configure the local network for these devices to smoothly access the server is a key issue.
At present, in the related art, a method for network configuration of these devices is provided, in which a bluetooth module is added to a terminal to be configured, and an application program for network configuration is installed on a device such as a mobile phone or a computer. Bluetooth connection is established between a Bluetooth module of equipment such as a mobile phone or a computer and a Bluetooth module in a terminal to be configured, and network configuration is carried out on the terminal to be configured through an application program installed on the equipment such as the mobile phone or the computer.
However, the related art needs to add a bluetooth module in the terminal to be configured, which increases the cost of the terminal to be configured. In addition, additional application programs need to be installed on devices such as mobile phones or computers, and the problem of terminal compatibility needs to be considered. And the above-mentioned correlation technique relies on bluetooth communication, can't carry out network configuration to a plurality of terminals that wait to dispose simultaneously, and complex operation disposes the cycle length.
Disclosure of Invention
The application provides a network configuration method, a system and a device, and the application does not need to add an additional Bluetooth module in a terminal to be configured, so that the equipment cost is reduced. And an application program does not need to be added on a mobile phone or a computer of a user, and the compatibility problem does not need to be considered. The dynamic configuration of the terminal to be configured is realized, more configuration contents can be flexibly added, the configuration of a plurality of terminals to be configured is supported, the configuration complexity is reduced, and the configuration efficiency is improved.
An embodiment of a first aspect of the present application provides a network configuration method, applied to a server, including:
receiving network configuration information submitted by a user;
converting the network configuration information into address information in an IP address format according to a preset encoding rule;
and displaying the address information so that the user sets the corresponding relation between the address information and a preset domain name in domain name service equipment.
In some embodiments of the present application, the converting the network configuration information into address information in an IP address format according to a preset encoding rule includes:
if the data volume of the network configuration information is less than or equal to a preset bit, dividing the network configuration information into three information sections according to a first preset bit unit; converting each information segment into a hexadecimal information address segment respectively; allocating an identification address field for the network configuration information; the identification address field and the three information address fields form address information in an IP address format;
if the data volume of the network configuration information is larger than a preset bit, dividing the network configuration information into a plurality of configuration information pieces according to a second preset bit unit; allocating an identification address field for the network configuration information; and respectively generating address information in an IP address format corresponding to each configuration information piece according to a preset coding rule and the identification address field.
In some embodiments of the present application, the generating, according to a preset encoding rule and the identification address field, address information in an IP address format corresponding to each configuration information piece respectively includes:
adding fragmentation information into a first configuration information piece, wherein the fragmentation information comprises a fragmentation number distributed to the first configuration information piece, and the first configuration information piece is any configuration information piece in each configuration information piece;
dividing the first configuration information slice added with the slicing information into three information segments according to a third preset bit unit, wherein the second preset bit unit is larger than the third preset bit unit;
converting each information segment corresponding to the first configuration information piece into a hexadecimal information address segment;
and combining the identification address field and the three information address fields corresponding to the first configuration information piece into address information in an IP address format corresponding to the first configuration information piece.
An embodiment of a second aspect of the present application provides a network configuration method, applied to a domain name service device, including:
acquiring address information corresponding to network configuration information, wherein the address information is information of an IP address format obtained by converting the network configuration information by the server according to a preset coding rule;
and storing the corresponding relation between the address information and a preset domain name so that the terminal to be configured obtains the address information according to the preset domain name and converts the address information to obtain the network configuration information.
In some embodiments of the present application, the method further comprises:
receiving a domain name request message broadcasted by a terminal to be configured, wherein the domain name request message comprises a preset domain name;
acquiring address information corresponding to a preset domain name from the corresponding relation between the address information and the preset domain name;
and sending the acquired address information to the terminal to be configured so that the terminal to be configured converts the address information to obtain the network configuration information.
An embodiment of a third aspect of the present application provides a network configuration method, which is applied to a terminal to be configured, and includes:
broadcasting a domain name request message, wherein the domain name request message comprises a preset domain name;
receiving address information in an IP address format sent by domain name service equipment, wherein the address information and the preset domain name are correspondingly stored in the domain name service equipment;
and converting the address information into network configuration information according to a preset encoding rule.
In some embodiments of the present application, the converting the address information into the network configuration information according to the preset encoding rule includes:
if only one piece of address information is received, an information address field included by the address information is obtained;
converting each information address field into a configuration character string according to a preset encoding rule;
and splicing the configuration character strings corresponding to each information address field into network configuration information.
In some embodiments of the present application, the converting the address information into the network configuration information according to the preset encoding rule includes:
if a plurality of pieces of address information are received, acquiring address information with the same identification address field from the received plurality of pieces of address information;
respectively acquiring information address fields included in each address information from the address information with the same identification address field;
respectively converting the information address field included by each address information into a configuration character string according to a preset encoding rule;
acquiring fragmentation information corresponding to each address information from a configuration character string corresponding to each address information;
and splicing the configuration character strings corresponding to each address information into network configuration information according to the fragment information corresponding to each address information.
An embodiment of a fourth aspect of the present application provides a network configuration system, including: the system comprises a server, domain name service equipment and a terminal to be configured;
the server is used for receiving the network configuration information submitted by the user; converting the network configuration information into address information in an IP address format according to a preset encoding rule; displaying the address information;
the domain name service equipment is used for acquiring address information corresponding to the network configuration information and storing the corresponding relation between the address information and a preset domain name;
the terminal to be configured is used for broadcasting a domain name request message, wherein the domain name request message comprises a preset domain name; receiving address information corresponding to the preset domain name sent by the domain name service equipment; and converting the address information into network configuration information according to the preset encoding rule.
An embodiment of a fifth aspect of the present application provides a network configuration apparatus, including:
the configuration receiving module is used for receiving network configuration information submitted by a user;
the configuration conversion module is used for converting the network configuration information into address information in an IP address format according to a preset coding rule;
and the address display module is used for displaying the address information so as to enable the user to set the corresponding relation between the address information and a preset domain name in the domain name service equipment.
An embodiment of a sixth aspect of the present application provides a network configuration apparatus, including:
the address acquisition module is used for acquiring address information corresponding to network configuration information, wherein the address information is information of an IP address format obtained by converting the network configuration information by the server according to a preset coding rule;
and the storage module is used for storing the corresponding relation between the address information and a preset domain name so that the terminal to be configured obtains the address information according to the preset domain name and converts the address information into the network configuration information.
An embodiment of the seventh aspect of the present application provides a network configuration apparatus, including:
the broadcasting module is used for broadcasting a domain name request message, and the domain name request message comprises a preset domain name;
the address receiving module is used for receiving address information in an IP address format sent by domain name service equipment, and the address information and the preset domain name are correspondingly stored in the domain name service equipment;
and the address conversion module is used for converting the address information into network configuration information according to a preset coding rule.
The technical scheme provided in the embodiment of the application has at least the following technical effects or advantages:
in the embodiment of the application, the server converts the network configuration information into the address information in the IP address format, and the corresponding relation between the address information and the preset domain name is stored on the domain name service device. A plurality of groups of preset domain names which are agreed in advance are preset in the terminal to be configured. The terminal to be configured obtains the address information from the domain name service equipment by requesting the domain name service, and converts the address information into network configuration information. The network configuration can be realized without adding an additional Bluetooth module in the terminal to be configured, so that the equipment cost of the terminal to be configured is reduced. And a new application program does not need to be added on the mobile phone or the computer of the user, and the compatibility problem of the application program does not need to be considered. The method and the device realize dynamic configuration of network configuration information such as server addresses or port numbers and the like for the terminals to be configured, can flexibly increase more configuration contents, support network configuration for a plurality of terminals to be configured at the same time, reduce the complexity of network configuration and improve the configuration efficiency.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic structural diagram illustrating a network configuration system according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a network configuration method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a conversion of network configuration information into address information in an IP address format according to an embodiment of the present application;
fig. 4 is another schematic diagram illustrating conversion of network configuration information into address information in an IP address format according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a network configuration apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another network configuration device provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of another network configuration device provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a storage medium according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It is to be noted that, unless otherwise specified, technical or scientific terms used herein shall have the ordinary meaning as understood by those skilled in the art to which this application belongs.
A network configuration method, system and apparatus according to an embodiment of the present application are described below with reference to the accompanying drawings.
An embodiment of the present application provides a network configuration method, and as shown in fig. 1, a network system based on the method includes a server, a domain name service device, and a terminal to be configured. The domain name service device may be a mobile phone, a PC (Personal Computer), a gateway, a router, or the like. The terminal to be configured can be a sensor, an intelligent label and other equipment, and the terminal to be configured can not be provided with a keyboard, a display screen and other human-computer interaction devices. The server is connected with the domain name service equipment through the Internet, and the terminal to be configured can be in communication connection with the domain name service equipment.
In the embodiment of the application, the server converts the network configuration information into the address information in the IP address format, and the corresponding relation between the address information and the preset domain name is stored on the domain name service equipment. A plurality of groups of preset domain names which are agreed in advance are preset in the terminal to be configured. The terminal to be configured broadcasts a domain name request message carrying a preset domain name, and the domain name service equipment receives the domain name request message and sends address information corresponding to the preset domain name to the terminal to be configured. And the terminal to be configured converts the address information into network configuration information. Therefore, an additional Bluetooth module is not required to be added in the terminal to be configured, and the equipment cost of the terminal to be configured is reduced. And a new application program does not need to be added on the mobile phone or the computer of the user, and the compatibility problem of the application program does not need to be considered. The method and the device realize dynamic configuration of network configuration information such as server addresses or ports and the like for the terminals to be configured, can flexibly increase more configuration contents, support network configuration for a plurality of terminals to be configured at the same time, reduce the complexity of network configuration and improve the configuration efficiency.
Referring to fig. 2, the method specifically includes the following steps:
step 101: the server receives the network configuration information submitted by the user.
The network configuration information includes a server address, a port number, an address type, and the like, where the address type includes a UDP (User Datagram Protocol) type, a TCP (Transmission Control Protocol) type, and the like.
The server is provided with a local display which the user can use to log in to the server via the browser. Alternatively, the user may also log in to the server through a browser using a remote terminal. The server may be an internet of things platform or a server dedicated to network configuration. And requesting to browse a configuration conversion page provided by a server through the browser, wherein the configuration conversion page comprises interfaces for inputting network configuration information, and a user inputs network configuration information such as a server address, a port number, an address type and the like through the interfaces. And the server acquires the network configuration information input by the user from the configuration conversion page.
Step 102: and the server converts the network configuration information into the address information in the IP address format according to a preset coding rule.
The preset coding rule specifies that the address information of the IP address format comprises an identification address field and an information address field, which address field is the identification address field and which address field is the information address field, for example, the first address field from the left is the identification address field, and the remaining three address fields are the information address fields. The preset encoding rule also specifies the generation mode of the identification address field and the information address field, for example, specifies that the identification address field is generated by a random number generator, and specifies that how many bits of data of the network configuration information are respectively converted into three information address fields, for example, specifies that 8 bits of data of the network configuration information are converted into hexadecimal to obtain one information address field. Because the data volume of the network configuration information is large, the preset coding rule also specifies that the network configuration information is divided into a plurality of configuration information pieces when the data volume of the network configuration information exceeds a certain value, and specifies the division mode of the configuration information pieces and how to convert each configuration information piece into the address information in the IP address format.
After the server acquires the network configuration information, firstly, the data volume of the network configuration information is compared with a preset bit contained in a preset coding rule, and if the data volume of the network configuration information is smaller than or equal to the preset bit, the network configuration information is not subjected to fragmentation processing. If the data volume of the network configuration information is larger than the preset bit, dividing the network configuration information into a plurality of configuration information pieces according to a preset coding rule. The preset bits may be 16, 24, or 32 bits, etc.
And if the data volume of the network configuration information is less than or equal to the preset bit, dividing the network configuration information into three information segments according to a first preset bit unit included in the preset coding rule. And converting each information segment into a hexadecimal information address segment respectively. And allocating an identification address field for the network configuration information, and combining the identification address field and the three information address fields into address information in an IP address format.
The first predetermined bit unit may be 4 or 8 bits. As shown in fig. 3, assuming that the data size of the network configuration information is 24 bits and the first preset bit unit is 8 bits, the network configuration information is divided into 3 information segments of 8 bits. Each information segment is converted to hexadecimal, assuming that the three information segments are converted to AAA, BBB, CCC, respectively. And allocating an identification address segment playing a unique identification role for the network configuration information, assuming that the allocated identification address segment is 123, and setting a first address segment on the left as the identification address segment and the remaining three address segments as information address segments according to a preset coding rule, wherein the address information in the IP address format converted by the network configuration information is 123. AAA.BBB.CCC.
And if the data volume of the network configuration information is larger than the preset bit, dividing the network configuration information into a plurality of configuration information pieces according to a second preset bit unit included in the preset coding rule. And allocating an identification address field for the network configuration information. And respectively generating address information of an IP address format corresponding to each configuration information piece according to a preset coding rule and the identification address field.
The second predetermined bit unit may be 16 or 20 bits. A random number may be generated by a random number generator, and the random number may be determined as the identification address field corresponding to the network configuration information. The identification address fields in the address information corresponding to each configuration information piece divided by the same network configuration information are the same.
For example, assuming that the data size of the network configuration information is 45 bits, and the second preset bit unit is 16 bits, the network configuration information may be divided into three configuration information pieces with data sizes of 16 bits, and 13 bits, respectively.
The embodiment of the present application specifically generates the address information corresponding to each configuration information piece in the following manner, including:
adding fragmentation information into a first configuration information piece, wherein the fragmentation information comprises a fragmentation number distributed for the first configuration information piece, and the first configuration information piece is any one configuration information piece in each configuration information piece; dividing the first configuration information slice added with the slicing information into three information segments according to a third preset bit unit, wherein the second preset bit unit is larger than the third preset bit unit; converting each information segment corresponding to the first configuration information piece into a hexadecimal information address segment; and combining the identification address field and the three information address fields corresponding to the first configuration information piece into the address information in the IP address format corresponding to the first configuration information piece.
The fragmentation information may include a fragmentation mark and a fragmentation number, the fragmentation mark is used to identify that the network configuration information is subjected to fragmentation processing, the fragmentation number is used to identify the position of the configuration information piece in the network configuration information, and the server allocates a fragmentation number to each configuration information piece according to the sequence of dividing the configuration information pieces. The data amount of the slice information may be 4 or 8 bits, etc. The third predetermined bit unit may be 4 or 8 bits, etc.
In order to facilitate understanding of the above process of converting the network configuration information with a large data volume into the address information, the following description is made with reference to the accompanying drawings. As shown in fig. 4, assuming that the data size of the network configuration information is 45 bits and the second preset bit unit is 16 bits, the network configuration information is divided into three configuration information pieces 1, 2 and 3 with data sizes of 16 bits, 16 bits and 13 bits, respectively. Slice marks and slice numbers are respectively added to the configuration information slices 1, 2 and 3, the slice marks in the configuration information slices 1, 2 and 3 are all the same, and the slice numbers in the configuration information slices 1, 2 and 3 are the slice numbers 001, 002 and 003 respectively. The slice flag and slice number occupy 8 bits in each of configuration information slices 1, 2, and 3. Assuming that the third preset bit unit is 8 bits, the configuration information pieces 1, 2, and 3 to which the slice flag and the slice number are added are all divided into three information pieces, and then each information piece is converted into hexadecimal. The three pieces of information of configuration information piece 1 in fig. 4 are converted into AAA1, BBB1, and CCC1, respectively. The three pieces of configuration information 2 are converted to AAA2, BBB2, and CCC2, respectively. The three pieces of configuration information 3 are converted to AAA3, BBB3, and CCC3, respectively. If the network configuration information allocated identifier address field is 456, the finally converted address information may be address information in three IP address formats, i.e., 456.aaa1.bbb1.ccc1, 456.aaa2.bbb2.ccc2, and 456.aaa3.bbb3. ccc3.
The step converts the network configuration information into the address information in the IP address format with small data volume, thereby facilitating transmission and storage, conveniently and flexibly setting the specific configuration content of the network configuration information, and increasing more configuration contents.
Step 103: the server displays the address information.
After generating the address information in the IP address format corresponding to the network configuration information in the above-mentioned step 102, the server displays the address information through the local display, or sends the address information to the remote terminal, and the remote terminal displays the address information. After the address information is displayed, the user can set the corresponding relationship between the address information and the preset domain name in the domain name service device, so as to perform network configuration on the terminal to be configured through the domain name service of the domain name service device.
Step 104: the domain name service equipment acquires address information corresponding to the network configuration information and stores the corresponding relation between the address information and a preset domain name.
After displaying the address information converted from the network configuration information through the operation of step 103, the user may store the address information and the preset domain name in the domain name service device correspondingly.
The preset domain name is predetermined, and the preset domain name is also preset in the device to be configured before the device to be configured leaves a factory. For example, the preset domain name may be "get _ server _ cfg.local _ iot _ cfg.local", "cfg _ get _ server _ addr _. iot _ cfg.local", and the like. Wherein denotes a slice number. The first segment of the domain name of the preset domain name may be dynamically assembled according to an actual configuration interaction process, for example, the first segment of the domain name "cfg _ get _ server _ addr _", iot _ cfg.local ", where" "represents the fragment number of the configuration information piece corresponding to the domain name" cfg _ get _ server _ addr _, iot _ cfg.local ", so as to ensure that the configuration information can be obtained in fragments when the network configuration information is long. The preset domain name can be formed in various ways, which are only exemplified here, for example, the first section of the domain name represents the instruction content, and the second section and the third section of the domain name are used to distinguish other domain names.
After the Domain Name service device stores the corresponding relationship between the address information and the preset Domain Name, it can provide DNS (Domain Name System) service for the device to be configured, and the device to be configured can obtain the address information in the IP address format from the Domain Name service device, and can obtain the network configuration information by converting the address information. The dynamic network configuration of the equipment to be configured is realized, and the batch network configuration is supported.
Step 105: the method comprises the steps that a device to be configured broadcasts a domain name request message, wherein the domain name request message comprises a preset domain name.
When the device to be configured is started for the first time, the DHCP request message is broadcasted according to a DHCP (Dynamic Host Configuration Protocol) Protocol. And the DHCP server receives the DHCP request message and allocates an IP address for the equipment to be configured. The device to be configured stores the IP address, and broadcasts a domain name request message through a communication element of the device to be configured, wherein the domain name request message comprises a preset domain name, the IP address of the device to be configured, a device identifier and the like. The preset domain name is pre-configured in the device to be configured before the device to be configured leaves a factory. For example, the preset domain name may be "get _ server _ cfg.local _ iot _ cfg.local", "cfg _ get _ server _ addr _. iot _ cfg.local", and the like. Where denotes a slice number.
After the device to be configured broadcasts the domain name request message, the domain name service device receives the domain name request message, obtains the address information corresponding to the preset domain name carried by the domain name request message from the corresponding relation between the stored address information and the preset domain name, and sends the obtained address information to the terminal to be configured.
Step 106: and the equipment to be configured receives the address information sent by the domain name service equipment, and converts the address information into network configuration information according to a preset coding rule.
Since the network configuration information may be converted into one or more address information, after receiving the address information sent by the domain name service device, the device to be configured first determines whether the number of the received address information is one or more. If only one piece of address information is received, the device to be configured obtains the information address field included in the address information, and converts each information address field into a configuration character string according to a preset encoding rule. And splicing the configuration character strings corresponding to each information address field into network configuration information.
For example, it is assumed that the preset encoding rule specifies that the first address field from the left in the address information is an identification address field, and the remaining three address fields are information address fields. And if the address information received by the device to be configured is 123.AAA.BBB.CCC, acquiring the information address fields AAA, BBB and CCC from the address information. And respectively converting the information address fields AAA, BBB and CCC into configuration character strings and restoring the configuration character strings into network configuration information.
If the device to be configured receives a plurality of address information, acquiring address information with the same identification address field from the received plurality of address information; respectively acquiring information address fields included in each address information from the address information with the same identification address field; respectively converting the information address field included in each address information into a configuration character string according to a preset encoding rule; acquiring fragmentation information corresponding to each address information from a configuration character string corresponding to each address information; and splicing the configuration character strings corresponding to each address information into network configuration information according to the fragment information corresponding to each address information.
For example, it is assumed that the preset encoding rule specifies that the first address field from the left in the address information is the identification address field, and the remaining three address fields are the information address fields. The address information received by the device to be configured is 123.aaa.bbb.ccc, 456.aaa1.bbb1.ccc1, 456.aaa2.bbb2.ccc2, and 456.aaa3.bbb3.ccc3, and then the address information with the same identification address field, such as 456.aaa1.bbb1.ccc1, 456.aaa2.bbb2.ccc2, and 456.aaa3.bbb3.ccc3, is obtained from the received address information. The information address sections AAA1, BBB1 and CCC1, AAA2, BBB2 and CCC2, and AAA3, BBB3 and CCC3 are respectively obtained from the same address information of the identification address section. And respectively converting the information address field included in each address information into a configuration character string. And splicing the configuration contents included in the configuration character strings corresponding to each address information into network configuration information according to the fragment identifications and the fragment numbers included in the converted configuration character strings.
The terminal to be configured acquires the address information in the IP address format from the domain name service equipment by requesting DNS service, and converts the address information into network configuration information according to a preset coding rule, so that the terminal to be configured can be dynamically configured in a network.
In the embodiment of the application, the server converts the network configuration information into the address information in the IP address format, and stores the corresponding relationship between the address information and the preset domain name on the domain name service device. A plurality of groups of preset domain names which are agreed in advance are preset in the terminal to be configured. The terminal to be configured obtains the address information from the domain name service equipment by requesting the domain name service, and converts the address information into network configuration information. The network configuration can be realized without adding an additional Bluetooth module in the terminal to be configured, so that the equipment cost of the terminal to be configured is reduced. And a new application program does not need to be added on the mobile phone or the computer of the user, and the compatibility problem of the application program does not need to be considered. The method and the device realize dynamic configuration of network configuration information such as server addresses or port numbers and the like for the terminals to be configured, can flexibly increase more configuration contents, support network configuration for a plurality of terminals to be configured at the same time, reduce the complexity of network configuration and improve the configuration efficiency.
An embodiment of the present application further provides a network configuration apparatus, where the apparatus is configured to perform operations performed by a server in the network configuration method according to any of the foregoing embodiments, as shown in fig. 5, and the apparatus includes:
a configuration receiving module 501, configured to receive network configuration information submitted by a user;
a configuration conversion module 502, configured to convert the network configuration information into address information in an IP address format according to a preset encoding rule;
the address display module 503 is configured to display address information, so that a user sets a corresponding relationship between the address information and a preset domain name in the domain name service device.
A configuration conversion module 502, configured to divide the network configuration information into three information segments according to a first preset bit unit if the data size of the network configuration information is less than or equal to a preset bit; converting each information segment into a hexadecimal information address segment respectively; allocating an identification address field for the network configuration information; and combining the identification address field and the three information address fields into address information in an IP address format.
A configuration conversion module 502, configured to divide the network configuration information into a plurality of configuration information pieces according to a second preset bit unit if the data size of the network configuration information is greater than the preset bit; allocating an identification address field for the network configuration information; and respectively generating address information of an IP address format corresponding to each configuration information piece according to a preset coding rule and the identification address field.
The configuration conversion module 502 is specifically configured to add fragmentation information to the first configuration information piece, where the fragmentation information includes a fragmentation number allocated to the first configuration information piece, and the first configuration information piece is any configuration information piece in each configuration information piece; dividing the first configuration information slice added with the slicing information into three information segments according to a third preset bit unit, wherein the second preset bit unit is larger than the third preset bit unit; converting each information segment corresponding to the first configuration information piece into a hexadecimal information address segment; and combining the identification address field and the three information address fields corresponding to the first configuration information piece into the address information of the IP address format corresponding to the first configuration information piece.
The network configuration device provided by the above embodiment of the present application and the network configuration method provided by the embodiment of the present application have the same advantages as the method adopted, operated or implemented by the application program stored in the network configuration device.
An embodiment of the present application further provides a network configuration apparatus, where the apparatus is configured to perform an operation performed by domain name service equipment in the network configuration method according to any of the foregoing embodiments, as shown in fig. 6, the apparatus includes:
an address obtaining module 601, configured to obtain address information corresponding to network configuration information, where the address information is information in an IP address format obtained by converting the network configuration information by a server according to a preset encoding rule;
the storage module 602 is configured to store a corresponding relationship between the address information and a preset domain name, so that the terminal to be configured obtains the address information according to the preset domain name and converts the address information into network configuration information.
The device also includes: the domain name service module is used for receiving a domain name request message broadcasted by a terminal to be configured, wherein the domain name request message comprises a preset domain name; acquiring address information corresponding to a preset domain name from the corresponding relation between the address information and the preset domain name; and sending the acquired address information to the terminal to be configured so that the terminal to be configured converts the address information to obtain network configuration information.
The network configuration device provided by the above embodiment of the present application and the network configuration method provided by the embodiment of the present application have the same beneficial effects as the method adopted, operated or implemented by the application program stored in the network configuration device.
An embodiment of the present application further provides a network configuration apparatus, configured to perform an operation performed by a device to be configured in the network configuration method according to any of the foregoing embodiments, as shown in fig. 7, where the apparatus includes:
a broadcasting module 701, configured to broadcast a domain name request packet, where the domain name request packet includes a preset domain name;
an address receiving module 702, configured to receive address information in an IP address format sent by a domain name service device, where the address information is stored in the domain name service device in correspondence with a preset domain name;
the address conversion module 703 is configured to convert the address information into network configuration information according to a preset encoding rule.
The address translation module 703 is configured to, if only one piece of address information is received, obtain an information address segment included in the address information; converting each information address field into a configuration character string according to a preset encoding rule; and splicing the configuration character strings corresponding to each information address field into network configuration information.
An address translation module 703, configured to, if multiple pieces of address information are received, obtain, from the multiple pieces of received address information, address information that identifies that address segments are the same; respectively acquiring information address fields included in each address information from the address information with the same identification address field; respectively converting the information address field included in each address information into a configuration character string according to a preset encoding rule; acquiring fragmentation information corresponding to each address information from a configuration character string corresponding to each address information; and splicing the configuration character strings corresponding to each address information into network configuration information according to the fragment information corresponding to each address information.
The network configuration device provided by the above embodiment of the present application and the network configuration method provided by the embodiment of the present application have the same beneficial effects as the method adopted, operated or implemented by the application program stored in the network configuration device.
An embodiment of the present application further provides a network configuration system, where the system is configured to execute the network configuration method according to any of the foregoing embodiments, and as shown in fig. 1, the system includes: the system comprises a server, domain name service equipment and a terminal to be configured;
the server is used for receiving the network configuration information submitted by the user; converting the network configuration information into address information in an IP address format according to a preset encoding rule; displaying the address information;
the domain name service equipment is used for acquiring address information corresponding to the network configuration information and storing the corresponding relation between the address information and a preset domain name;
the terminal to be configured is used for broadcasting a domain name request message, and the domain name request message comprises a preset domain name; receiving address information corresponding to a preset domain name sent by domain name service equipment; and converting the address information into network configuration information according to a preset encoding rule.
The network configuration system provided by the above embodiment of the present application and the network configuration method provided by the embodiment of the present application have the same beneficial effects as the method adopted, operated or implemented by the application program stored in the network configuration system.
The embodiment of the application also provides the electronic equipment, so as to execute the network configuration method. Please refer to fig. 8, which illustrates a schematic diagram of an electronic device according to some embodiments of the present application. As shown in fig. 8, the electronic device 8 includes: a processor 800, a memory 801, a bus 802 and a communication interface 803, the processor 800, the communication interface 803 and the memory 801 being connected by the bus 802; the memory 801 stores a computer program that can be executed on the processor 800, and the processor 800 executes the network configuration method provided by any one of the foregoing embodiments when executing the computer program.
The Memory 801 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 803 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 802 can be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 801 is used for storing a program, and the processor 800 executes the program after receiving an execution instruction, and the network configuration method disclosed in any of the foregoing embodiments of the present application may be applied to the processor 800, or implemented by the processor 800.
Processor 800 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 800. The Processor 800 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in the memory 801, and the processor 800 reads the information in the memory 801 and completes the steps of the method in combination with the hardware thereof.
The electronic device provided by the embodiment of the application and the network configuration method provided by the embodiment of the application are based on the same inventive concept, and have the same beneficial effects as the method adopted, operated or realized by the electronic device.
Referring to fig. 9, the computer readable storage medium is an optical disc 30, on which a computer program (i.e., a program product) is stored, and when the computer program is executed by a processor, the computer program performs the network configuration method provided in any of the foregoing embodiments.
It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory, or other optical and magnetic storage media, which are not described in detail herein.
The computer-readable storage medium provided by the above-mentioned embodiment of the present application and the network configuration method provided by the embodiment of the present application have the same beneficial effects as the method adopted, executed or implemented by the application program stored in the computer-readable storage medium.
It should be noted that:
in the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted to reflect the following schematic: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Moreover, those of skill in the art will understand that although some embodiments described herein include some but not other features included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The above description is only for the preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A network configuration method is applied to a server and comprises the following steps:
receiving network configuration information submitted by a user;
converting the network configuration information into address information in an IP address format according to a preset encoding rule;
and displaying the address information to enable the user to set a corresponding relation between the address information and a preset domain name in domain name service equipment, so that a configuration terminal obtains the address information according to the preset domain name and converts the address information into the network configuration information.
2. The method according to claim 1, wherein the converting the network configuration information into the address information in the IP address format according to the preset encoding rule comprises:
if the data volume of the network configuration information is less than or equal to a preset bit, dividing the network configuration information into three information sections according to a first preset bit unit; converting each information segment into a hexadecimal information address segment respectively; allocating an identification address field for the network configuration information; the identification address field and the three information address fields form address information in an IP address format;
if the data volume of the network configuration information is larger than a preset bit, dividing the network configuration information into a plurality of configuration information pieces according to a second preset bit unit; allocating an identification address field for the network configuration information; and respectively generating address information in an IP address format corresponding to each configuration information piece according to a preset coding rule and the identification address field.
3. The method according to claim 2, wherein the separately generating address information in an IP address format corresponding to each configuration information piece according to a preset encoding rule and the identification address field comprises:
adding fragmentation information in a first configuration information piece, wherein the fragmentation information comprises a fragmentation number distributed to the first configuration information piece, and the first configuration information piece is any one configuration information piece in each configuration information piece;
dividing the first configuration information slice added with the slicing information into three information segments according to a third preset bit unit, wherein the second preset bit unit is larger than the third preset bit unit;
converting each information segment corresponding to the first configuration information piece into a hexadecimal information address segment;
and combining the identification address field and the three information address fields corresponding to the first configuration information piece into address information in an IP address format corresponding to the first configuration information piece.
4. A network configuration method is applied to a domain name service device and comprises the following steps:
acquiring address information corresponding to network configuration information, wherein the address information is information of an IP address format obtained by converting the network configuration information by a server according to a preset coding rule;
and storing the corresponding relation between the address information and a preset domain name so that the terminal to be configured obtains the address information according to the preset domain name and converts the address information to obtain the network configuration information.
5. The method of claim 4, further comprising:
receiving a domain name request message broadcasted by a terminal to be configured, wherein the domain name request message comprises a preset domain name;
acquiring address information corresponding to a preset domain name from the corresponding relation between the address information and the preset domain name;
and sending the acquired address information to the terminal to be configured so that the terminal to be configured converts the address information to obtain the network configuration information.
6.A network configuration method is applied to a terminal to be configured, and comprises the following steps:
broadcasting a domain name request message, wherein the domain name request message comprises a preset domain name;
receiving address information in an IP address format sent by domain name service equipment, wherein the address information and the preset domain name are correspondingly stored in the domain name service equipment;
and converting the address information into network configuration information according to a preset encoding rule.
7. The method according to claim 6, wherein said converting the address information into the network configuration information according to the preset encoding rule comprises:
if only one piece of address information is received, an information address field included by the address information is obtained;
converting each information address field into a configuration character string according to a preset encoding rule;
and splicing the configuration character strings corresponding to each information address field into network configuration information.
8. The method according to claim 6, wherein said converting the address information into the network configuration information according to the preset encoding rule comprises:
if a plurality of pieces of address information are received, acquiring address information with the same identification address field from the received plurality of pieces of address information;
respectively acquiring information address fields included in each address information from the address information with the same identification address field;
respectively converting the information address field included in each address information into a configuration character string according to a preset encoding rule;
acquiring fragmentation information corresponding to each address information from a configuration character string corresponding to each address information;
and splicing the configuration character strings corresponding to each address information into network configuration information according to the fragment information corresponding to each address information.
9. A network configuration system, comprising: the system comprises a server, domain name service equipment and a terminal to be configured;
the server is used for receiving the network configuration information submitted by the user; converting the network configuration information into address information in an IP address format according to a preset encoding rule; displaying the address information;
the domain name service device is used for acquiring address information corresponding to the network configuration information and storing the corresponding relation between the address information and a preset domain name;
the terminal to be configured is used for broadcasting a domain name request message, wherein the domain name request message comprises a preset domain name; receiving address information corresponding to the preset domain name sent by the domain name service equipment; and converting the address information into network configuration information according to the preset encoding rule.
10. A network configuration apparatus, comprising:
the configuration receiving module is used for receiving network configuration information submitted by a user;
the configuration conversion module is used for converting the network configuration information into address information in an IP address format according to a preset coding rule;
and the address display module is used for displaying the address information so as to enable the user to set the corresponding relation between the address information and a preset domain name in domain name service equipment, and enable the configuration terminal to obtain the address information according to the preset domain name and convert the address information into the network configuration information.
11. A network configuration apparatus, comprising:
the address acquisition module is used for acquiring address information corresponding to network configuration information, wherein the address information is information in an IP address format obtained by converting the network configuration information by a server according to a preset coding rule;
and the storage module is used for storing the corresponding relation between the address information and a preset domain name so that the terminal to be configured obtains the address information according to the preset domain name and converts the address information into the network configuration information.
12. A network configuration apparatus, comprising:
the broadcasting module is used for broadcasting a domain name request message, and the domain name request message comprises a preset domain name;
the address receiving module is used for receiving address information in an IP address format sent by domain name service equipment, and the address information and the preset domain name are correspondingly stored in the domain name service equipment;
and the address conversion module is used for converting the address information into network configuration information according to a preset coding rule.
CN202011179158.1A 2020-10-29 2020-10-29 Network configuration method, system and device Active CN112367195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011179158.1A CN112367195B (en) 2020-10-29 2020-10-29 Network configuration method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011179158.1A CN112367195B (en) 2020-10-29 2020-10-29 Network configuration method, system and device

Publications (2)

Publication Number Publication Date
CN112367195A CN112367195A (en) 2021-02-12
CN112367195B true CN112367195B (en) 2022-07-26

Family

ID=74512457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011179158.1A Active CN112367195B (en) 2020-10-29 2020-10-29 Network configuration method, system and device

Country Status (1)

Country Link
CN (1) CN112367195B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115515078A (en) * 2021-06-23 2022-12-23 青岛海信网络科技股份有限公司 Data processing method, system and equipment
CN117857447A (en) * 2022-10-09 2024-04-09 华为技术有限公司 Rule processing and rule searching method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863143A (en) * 2005-08-09 2006-11-15 华为技术有限公司 Method, system and apparatus for implementing Web server access
CN103812955A (en) * 2012-11-12 2014-05-21 中国移动通信集团公司 Terminal access management platform address method and system and terminal
CN105608082A (en) * 2014-11-10 2016-05-25 中兴通讯股份有限公司 Data processing method, equipment and system
CN106850772A (en) * 2017-01-11 2017-06-13 中科院微电子研究所昆山分所 A kind of smart machine data acquisition dissemination system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8977738B2 (en) * 2009-06-05 2015-03-10 Power Measurement Ltd. Automated discovery of monitoring devices on a network
US11190397B2 (en) * 2015-05-11 2021-11-30 Verisign, Inc. Identifying trusted configuration information to perform service discovery

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863143A (en) * 2005-08-09 2006-11-15 华为技术有限公司 Method, system and apparatus for implementing Web server access
CN103812955A (en) * 2012-11-12 2014-05-21 中国移动通信集团公司 Terminal access management platform address method and system and terminal
CN105608082A (en) * 2014-11-10 2016-05-25 中兴通讯股份有限公司 Data processing method, equipment and system
CN106850772A (en) * 2017-01-11 2017-06-13 中科院微电子研究所昆山分所 A kind of smart machine data acquisition dissemination system

Also Published As

Publication number Publication date
CN112367195A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN112367195B (en) Network configuration method, system and device
TWI712295B (en) Method, device and system for binding user terminal and equipment
CN109558091B (en) Lookup table storage method and device and computer readable storage medium
EP3486863A1 (en) Image recognition method and terminal
CN106873970B (en) Installation method and device of operating system
CN103699635A (en) Information processing method and device
CN110858838B (en) Method and apparatus for bridging communications
CN110727417A (en) Data processing method and device
CN103618780A (en) Method and device for realizing multiple virtual machine mounted externally-arranged components
CN108885544B (en) Front-end page internationalized processing method, application server and computer-readable storage medium
CN113204345A (en) Page generation method and device, electronic equipment and storage medium
WO2022179353A1 (en) Domain name resolution method and apparatus, and computer device
CN103440281A (en) Method, device and equipment for acquiring download file
CN112866439A (en) Data processing method, device and system
CN109788034B (en) Configuration method for gateway access equipment, electronic equipment and storage medium
CN114143850B (en) IPv6 address allocation method and device, computer equipment and storage medium
CN114124883B (en) Data access method and device based on cloud storage address, computer equipment and medium
CN111010346A (en) Message processing method, device, storage medium and device based on dynamic routing
CN114006956A (en) Message data analysis method, device and equipment
CN106844396B (en) Information processing method and electronic equipment
CN112416843A (en) Backboard communication equipment, control method thereof and storage medium
CN106844188A (en) A kind of test agent method, device and test system
CN116339916B (en) Memory virtualization method and device, electronic equipment and storage medium
CN115397033B (en) Wireless communication method, wireless communication device, wireless communication module, medium, and program product
CN103856474A (en) Method and device for processing network data

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