Disclosure of Invention
The invention aims to provide a technical scheme for effectively solving the problem of address resolution of a large number of objects and machines in the industrial Internet.
In order to achieve the above object, the present invention provides an industrial internet address resolution method, including:
naming the articles according to the step-by-step attribution of the articles in the geographical administrative area, and adding addresses to the articles;
determining basic geographical administrative areas according to the quantity of articles in each geographical administrative area and the geographical administrative area level, setting an address resolution node in each basic geographical administrative area, and adding addresses to the address resolution nodes;
the address resolution node acquires and stores the corresponding relation between the names and the addresses of all articles in the corresponding basic geographic administrative region in the industrial internet;
and acquiring a basic geographic administrative region to which the object belongs in the analysis request in the region, and acquiring the address of the object according to the address analysis node and the corresponding relation between the names and the addresses of all the objects in the basic geographic administrative region.
Preferably:
determining the basic geographic administrative region of the article according to the step-by-step attribution information in the article name;
when the basic geographic administrative region to which the article belongs in the analysis request is the local region, acquiring the address of the article according to an address analysis node in the local region;
when the basic geographic administrative region to which the article belongs in the analysis request is an outer region, acquiring an address analysis node of the outer region, and acquiring the address of the article in the outer region according to the address analysis node of the outer region.
Further, the method for determining the basic geographic administrative area according to the number of articles in each geographic administrative area and the geographic administrative area level specifically comprises the following steps:
setting a threshold of the quantity of articles in a basic geographic administrative area;
the quantity articles in the low-level geographic administrative region do not reach the article quantity threshold, and the current geographic administrative region is used as a basic geographic administrative region;
and dividing the low-level geographic administrative region into n basic geographic administrative regions according to the article quantity threshold, wherein n is a positive integer.
Preferably:
distinguishing the step-by-step attribution in the article name by using a separator;
the naming of items is expanded according to government and enterprise organizational structures.
Preferably:
and accessing the address resolution node through an interface service.
The invention also discloses an industrial internet address analysis device, which comprises:
the article naming unit is used for naming the articles according to the step-by-step attribution of the articles in the geographic administrative region;
the data adding unit is used for receiving added address data in the industrial Internet, and the address data comprises an address of an address resolution node and an address of an article;
the article data management unit is used for storing and managing the geographic administrative region where the article is located and the corresponding relation between the article and the address;
the system comprises an address resolution node data management unit, a data processing unit and a data processing unit, wherein the address resolution node data management unit is used for determining basic geographical administrative areas according to the quantity of articles in each geographical administrative area and the geographical administrative area level, setting address resolution nodes in the area for each basic geographical administrative area, and managing the corresponding relation between the basic geographical administrative areas and the address of the address resolution nodes; the address resolution node acquires and stores the corresponding relation between the names and the addresses of all articles in the corresponding basic geographic administrative region in the industrial internet;
the interface communication module is used for receiving the analysis request in the region and sending the analysis request to the addressing unit for addressing;
and the addressing unit is used for acquiring a basic geographic administrative area to which the article belongs in the analysis request in the area according to the analysis request received by the interface communication module, and acquiring the address of the article according to the corresponding relation between the name and the address of all articles in the basic geographic administrative area.
Specifically, the addressing unit further includes:
the analysis module is used for acquiring a basic geographic administrative region to which the article belongs in the analysis request according to the step-by-step attribution information in the article name;
the first addressing module is used for acquiring the address of the article according to the address resolution node in the area set by the address resolution node setting unit when the basic geographic administrative area to which the article analyzed by the analysis module belongs is the area;
and the second addressing module is used for acquiring the address resolution node of the outer area set by the address resolution node setting unit when the basic geographic administrative area to which the article analyzed by the analysis module belongs is the outer area, and acquiring the address of the article in the outer area according to the address resolution node of the outer area.
Specifically, the address resolution node data management unit further includes:
the article quantity threshold setting module is used for setting an article quantity threshold in the basic geographic administrative area;
the basic geographic administrative region dividing module is used for judging whether the quantity of articles in the low-level geographic administrative region reaches the article quantity threshold according to the article quantity threshold set by the article quantity threshold setting module, and if the quantity of articles in the low-level geographic administrative region does not reach the article quantity threshold, taking the current geographic administrative region as the basic geographic administrative region; if the goods quantity threshold is reached, dividing the low-level geographic administrative regions into n basic geographic administrative regions according to the goods quantity threshold;
the address resolution node setting module is used for setting address resolution nodes in the region for the basic geographic administrative regions divided by the basic geographic administrative region dividing module; managing the corresponding relation between the basic geographic administrative region and the address of the address resolution node; and the address resolution node acquires and stores the corresponding relation between the names and the addresses of all the articles in the corresponding basic geographic administrative region in the industrial internet.
Preferably:
the article naming unit adopts separators to distinguish the step-by-step attribution in the article name;
the item naming unit extends the naming of items according to government and enterprise organizational structures.
The technical scheme provided by the invention gives multi-level names to the linked internet-surfing articles based on geographic administrative factors and government enterprise organization factors; each basic geographic administrative region is provided with an address resolution node in the region; when an external user needs to resolve an IP address of a certain object according to the name, the local area address resolution node is inquired firstly, the IP address of the address resolution node of the object is obtained according to the name of the object, and then the IP address of the object is obtained by inquiring the address resolution node of the object. According to the method for stepwise query and analysis, the problem of address analysis of a large number of objects and machines in the industrial Internet is effectively solved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
As shown in fig. 1, it is a flowchart of a method for resolving an industrial internet address, and the present embodiment includes the following steps:
step S01: naming the goods according to the step-by-step attribution of the goods in the geographical administrative area, and adding addresses to the goods.
Distinguishing the step-by-step attribution in the article name by using a separator; the naming of items is expanded according to government and enterprise organizational structures.
The name of the article is xxx, xxx represents a plurality of characters, each level of xxx is separated by using ". multidata" as a separator, and the name can be provided with a plurality of levels of xxx (not limited to 4).
Item name the first level "xxx" is the name of the province in which the item is located; second level "xxx" is the name of the place where the item is located; third level "xxx" is the name of the county where the item is located; the fourth level "xxx" is the government entity or enterprise name to which the article belongs; subsequent "xxx" may be further expanded based on more refined organizational factors within a government entity or enterprise.
Step S02: determining basic geographical administrative areas according to the quantity of articles in each geographical administrative area and the geographical administrative area level, setting address resolution nodes in the areas for each basic geographical administrative area, and adding addresses to the address resolution nodes.
The method for setting the basic geographic administrative region can be as follows:
setting a threshold of the quantity of articles in a basic geographic administrative area;
the quantity articles in the low-level geographic administrative region do not reach the article quantity threshold, and the current geographic administrative region is used as a basic geographic administrative region;
and dividing the low-level geographic administrative region into n basic geographic administrative regions according to the article quantity threshold, wherein n is a positive integer.
And adding an address resolution node for each basic geographic administrative region.
Step S03: and the address resolution node acquires and stores the corresponding relation between the names and the addresses of all the articles in the corresponding basic geographic administrative region in the industrial internet.
The address resolution node stores the corresponding relation between the name of the article in the area and the IPv6 address;
and storing the corresponding relation between the basic geographic administrative regions served by other address resolution nodes in the whole country and the IPv6 address.
Step S04: and acquiring a basic geographic administrative region to which the object belongs in the analysis request in the region, and acquiring the address of the object according to the address analysis node and the corresponding relation between the names and the addresses of all the objects in the basic geographic administrative region.
And accessing the address resolution node through an interface service.
The method comprises the steps of receiving an analysis request of a region, obtaining a basic geographic administrative region of an article in the analysis request, further obtaining an address analysis node of the basic geographic administrative region, and further obtaining an address of the article according to the corresponding relation between the article and the address stored in the obtained address analysis node.
Therefore, the technical scheme provided by the invention gives multi-level names to the objects linked to the internet based on the geographic administrative factors and the government enterprise organization factors; each basic geographic administrative region is provided with an address resolution node in the region; when an external user needs to resolve an IP address of a certain object according to the name, a local address resolving node is firstly inquired, the IP address of the address resolving node of the object is obtained according to the name of the object, and then the IP address of the object is obtained by inquiring the address resolving node of the object. According to the method for stepwise query and analysis, the problem of address analysis of a large number of objects and machines in the industrial Internet is effectively solved.
To better illustrate the present invention, a second embodiment is given to explain in detail the working principle of how to obtain the address of the item, as shown in fig. 2.
Step S201: and determining the basic geographic administrative region of the article according to the step-by-step attribution information in the article name.
Step S202: and judging whether the basic geographic administrative region to which the article belongs in the analysis request is the local region, if so, entering step S203, and if not, entering step S204.
Step S203: and acquiring the address of the article according to the address resolution node in the area.
And if the address resolution node of the local area returns the acquired IPv6 address of the item, directly accessing the IPv6 address of the item.
Step S204: and acquiring an address resolution node of the outer region, and acquiring the address of the article in the outer region according to the address resolution node of the outer region.
If the address resolution node of the local area returns the IPv6 address of the address resolution node of the external area, sending an item name resolution request (the request contains the item name to be resolved) to the IPv6 address of the address resolution node of the external area; the area address resolution node where the article is located returns the IPv6 address of the article; directly accessing the item IPv6 address.
The invention does not limit the specific address resolution request/response protocol data format, and only needs to include the required data in the address resolution request/response.
To better illustrate the address resolution process of the present invention, the following description is made with reference to an example.
Two articles:
item 1 name: beijing, haidianqu, sijiqiingxiang, luden gguanlichu. luden.123456
Beijing, Hai lake district, Sijiqingxiang, street lamp management department, street lamp 123456,
123456 is the street light number, whose address is:
2001:3CA1:010F:001A:121B:0000:0000:AB10
item 2 name: jiangxi, jingdezhenshi, zhushanqu, luden gguuanlichu, luden g.123456
River west, Jingdezhen city, Zhushan district, street lamp management department, street lamp, 123456,
123456 is the street light number, whose address is:
2001:0000:1F1F:0000:0000:0100:11A 0:AFAF
the Hei lake district of Beijing has an address resolution node server, its IP address is: 2001: 3CA 1: 010F: 001A: 121B: 0000: 0000: 0010
The Jingdezhen of Jiangxi province has an address resolution node server, and the IP address of the address resolution node server is as follows: 2001: 0000: 1F 1F: 0000: 0000: 0100: 11A 0: ADDF
The address resolution node system a in the hai lake district of beijing stores the name and address pair data of other address resolution nodes, as shown in table 1:
TABLE 1 Address resolution node name and address correspondence
Name (R)
|
Address
|
jiangxi.jingdezhenshi
|
2001:0000:1F1F:0000:0000:0100:11A 0:ADDF |
The name and address pair data of the item is stored, as shown in table 2:
TABLE 2 name and address correspondence of articles
In the address resolution node system B in Jingdezhen, Jiangxi:
table 3 shows the data of the name and address pairs of other address resolution nodes:
TABLE 3 Address resolution node name and address correspondence
Name (R)
|
Address
|
beijing.haidianqu
|
2001:3CA1:010F:001A:121B:0000:0000:0010 |
The data of the name and address pairs of the stored article is shown in table 4:
TABLE 4 name and address correspondence of articles
The client A of the four seasons Qingxiang in Hai lake district of Beijing city needs to visit: street lamp 123456, four seasons green and village, street lamp management;
the client B of the four seasons Qingxiang in Hai lake district of Beijing needs to visit: the river west, Jingdezhen city, Zhushan district, street lamp management department, street lamp 123456.
The first condition is as follows:
the client A accesses an address resolution node system A (system A for short):
an interface communication module of the system A receives address query request data sent by a client A: "beijing. haidianqu. sijiqingxiang. luden gguanlichu. luden.123456"
The interface communication module of the system a first sends the street lamp address "beijing.
First, system a looked up table 2 using "beijing. If the corresponding address is inquired, the data is returned to the communication interface of the system A.
Data returned in Table 5
The interface communication module of system a returns the table 5 data to client a.
The client A can access the corresponding 'Beijing, Hai lake district, Sijiqingxiang, street lamp management department, street lamp 123456' by using the address in the data of the table 5 "
Case two:
the client B accesses an address resolution node system A (system A for short):
the communication interface of the system A receives address query request data sent by the client B: "jiangxi. jingdezhenshi. zhushanqu. luden gguanlichu. ludeng.123456"
System a first consults table 2 using "jiangxi. jingdezhenshi. zhushanqu. ludengguanlichu. ludeng.123456". The corresponding address is not inquired, and a search failure message is returned to the communication interface.
System a looked up table 1 using the "first order" in "jiangxi. jingdezhenshi. zhushanqu. ludengguanlichu. ludeng.123456", i.e., "jiangxi". If the corresponding address is not inquired, the first level and the second level of the 'jiangxi' jingdezhenshi 'zhushhanqu, ludengguanlichu.ludeng.123456' are used for inquiring to find the table 1, the corresponding 'address' is inquired, and data is returned to the communication interface of the system A.
The communication interface of system A receives the return data and obtains table 7
Data returned in Table 7
The communication interface of system a returns the table 7 data to client B.
After receiving the data in table 7, the client B accesses the address resolution node system B (system B for short).
A communication interface of the system B receives address query request data sent by the client B:
“jiangxi.jingdezhenshi.zhushanqu.ludengguanlichu.ludeng.123456”
the communication interface of system B is first
“jiangxi.jingdezhenshi.zhushanqu.ludengguanlichu.ludeng.123456”
And sending to the system B.
System B consults table 4 using "jiangxi. jingdezhenshi. zhushanqu. ludengguanlichu. ludeng.123456". If the corresponding address is inquired, the data is returned to the communication interface of the system B. The obtained data are shown in Table 8
Data returned from Table 8
The communication interface of system B returns the table 8 data to client B.
Client B may use the address in the table 8 data to access the corresponding "jiang xi, se, zhen city, zhu shan, street lamp management, street lamp, 123456".
The third embodiment of the present invention is first provided, as shown in fig. 3, to explain the structural features of the apparatus.
The device includes:
and the article naming unit 1 is used for naming the articles according to the progressive attribution of the articles in the geographic administrative region.
And the data adding unit 2 is used for receiving added address data in the industrial Internet, wherein the address data comprises an address of an address resolution node and an address of an article.
And the article data management unit 3 is used for storing and managing the geographic administrative region where the article is located and the corresponding relation between the article and the address.
The address resolution node data management unit 4 is used for determining basic geographical administrative areas according to the quantity of articles in each geographical administrative area and the geographical administrative area level, setting address resolution nodes in the area for each basic geographical administrative area, and managing the corresponding relation between the basic geographical administrative areas and the address of the address resolution nodes; and the address resolution node acquires and stores the corresponding relation between the names and the addresses of all the articles in the corresponding basic geographic administrative region in the industrial internet.
The address resolution node data management unit further comprises:
and an item quantity threshold setting module 41, configured to set an item quantity threshold in the basic geographic administrative area.
A basic geographic administrative region dividing module 42, configured to determine, according to the article quantity threshold set by the article quantity threshold setting module, whether quantity articles in the low-level geographic administrative region reach the article quantity threshold, and if the quantity articles do not reach the article quantity threshold, use the current geographic administrative region as the basic geographic administrative region; and if the article quantity threshold is reached, dividing the low-level geographic administrative areas into n basic geographic administrative areas according to the article quantity threshold.
An address resolution node setting module 43, configured to set an address resolution node in the basic geographic administrative area divided by the basic geographic administrative area dividing module; managing the corresponding relation between the basic geographic administrative region and the address of the address resolution node; and the address resolution node acquires and stores the corresponding relation between the names and the addresses of all the articles in the corresponding basic geographic administrative region in the industrial internet.
And the interface communication module 5 is used for receiving the analysis request in the region and sending the analysis request to the addressing unit for addressing.
And the addressing unit 6 is used for acquiring a basic geographic administrative area to which the article belongs in the analysis request in the area according to the analysis request received by the interface communication module, and acquiring the address of the article according to the corresponding relation between the names and the addresses of all the articles in the basic geographic administrative area.
The addressing unit further comprises:
the analysis module 61 is used for acquiring the basic geographic administrative region to which the article belongs in the analysis request according to the step-by-step attribution information in the article name;
the first addressing module 62 is configured to, when the basic geographic administrative area to which the article analyzed by the analysis module belongs is the local area, obtain an address of the article according to an address analysis node in the local area set by the address analysis node setting unit;
and a second addressing module 63, configured to, when the basic geographic administrative area to which the article analyzed by the analysis module belongs is an external area, obtain an external area address analysis node set by the address analysis node setting unit, and obtain an address of the article in the external area according to the external area address analysis node.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the foregoing method may be referred to for the corresponding process in the above-described apparatus embodiment, and is not repeated herein.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the application described herein may be practiced in sequences other than those illustrated.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.