CN109327820A - A kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud - Google Patents
A kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud Download PDFInfo
- Publication number
- CN109327820A CN109327820A CN201811240588.2A CN201811240588A CN109327820A CN 109327820 A CN109327820 A CN 109327820A CN 201811240588 A CN201811240588 A CN 201811240588A CN 109327820 A CN109327820 A CN 109327820A
- Authority
- CN
- China
- Prior art keywords
- hardware
- coordinate
- message
- vehicle node
- source
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/40—Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
- H04W4/46—Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for vehicle-to-vehicle communication [V2V]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/24—Connectivity information management, e.g. connectivity discovery or connectivity update
- H04W40/248—Connectivity information update
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
The present invention provides a kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud, the network vehicle node, the network is divided into more than two clusters, one cluster is made of more than two vehicle nodes, wherein, these vehicle nodes are divided into cluster head and cluster member, and a cluster includes a cluster head and more than two cluster members;If cluster member belongs to more than two clusters, cluster member is also known as cluster gateway;The vehicle node through the invention provided by communication means, the continuity communicated in moving process can be kept, bursts dropping ratio is reduced, to improve service quality, present invention can apply to the fields such as road conditions monitoring, vehicle management, are with a wide range of applications.
Description
Technical field
The present invention relates to a kind of method more particularly to a kind of Internet resources inquiries and distribution side based on vehicle-mounted cloud
Method.
Background technique
Vehicle-mounted cloud has become a hot topic of research since the practicality has received significant attention.The main feature of vehicle node
One of for vehicle node along road carry out high-speed mobile, therefore, how to realize the high quality communication of vehicle node be study hot spot
One of.
Vehicle-mounted cloud is established on vehicle-mounted net, and current existing communication protocol is applied in vehicle-mounted net asks there is also some
Topic, main cause is as follows:
1) in existing protocol, it is logical in moving process to ensure that mobile node needs to send and receive a large amount of control information
Believe unimpeded, reduces the loss of data packet, and a large amount of energy can be consumed by transmitting control information, this can significantly reduce mobile node
Service life;
2) the control information packet expense of existing protocol is larger, mobile to deliver that delay is longer to lose to improve data packet
Mistake rate.
Therefore, the data communication efficiency for how improving vehicle-mounted cloud need further to study.
Summary of the invention
Goal of the invention: a kind of based on vehicle the technical problem to be solved by the present invention is in view of the deficiencies of the prior art, provide
Carry the Internet resources inquiry and distribution method of cloud.
Technical solution: the Internet resources inquiry and distribution method that the invention discloses a kind of based on vehicle-mounted cloud, the network
Vehicle node, the network are divided into more than two clusters, and a cluster is made of more than two vehicle nodes, wherein these
Vehicle node is divided into cluster head and cluster member, and a cluster includes a cluster head and more than two cluster members;If cluster member belongs to
In more than two clusters, then cluster member is also known as cluster gateway;
For one vehicle node by a hardware ID unique identification, which can be MAC Address;One vehicle node is matched
Set more than one resource, a kind of resource is by a resource ID unique identification;Vehicle node is communicated using message, and one disappears
For breath by type of message unique identification, type of message is as shown in the table:
Each vehicle node safeguards a neighbor table, and a neighbor entry includes hardware ID, coordinate, resource ID set, angle
Colour gamut and life cycle domain;If role's thresholding is 1, then it represents that the corresponding vehicle node of the neighbor entry is cluster head;If angle
Color gamut value is 2, then it represents that the corresponding vehicle node of the neighbor entry is cluster member;If role's thresholding is 3, then it represents that the neighbours
The corresponding vehicle node of list item is cluster gateway;If role's thresholding is 4, then it represents that the corresponding vehicle node of the neighbor entry is neither
It is cluster head, nor cluster member or cluster gateway;
One beacon message is made of type of message, hardware ID, coordinate, role and resource ID set;Vehicle node V1 is fixed
Phase executes operations described below:
Step 101: starting;
Step 102: vehicle node V1 periodically sends beacon message, and the value of message types of the beacon message is 1, and hardware ID is
The hardware ID of vehicle node V1, coordinate are the coordinate of vehicle node V1, the money that resource ID set can be shared by vehicle node V1
The resource ID in source is constituted;If vehicle node V1 is cluster head, role's thresholding is set as 1, if vehicle node V1 is cluster member,
Role's thresholding is set as 2, if vehicle node is cluster gateway, role's thresholding is set as 3, and otherwise, role's thresholding is set as 4;
Step 103: after neighbours' vehicle node receives beacon message, check neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID of the beacon message, then by the coordinate of the neighbor entry, role and resource ID
Coordinate, role and resource ID set thresholding, the life cycle that set is updated to beacon message respectively are set as maximum value, such as
100ms;Otherwise the neighbours' vehicle node creates a neighbor entry, and the hardware ID of the neighbor entry is equal to the hard of the beacon message
Part ID, coordinate, role and the resource ID set of the neighbor entry are updated to the coordinate of beacon message, role and resource respectively
ID gathers thresholding, and life cycle is set as maximum value, such as 100ms;
Step 104: terminating.
Vehicle node can grasp the information of neighbours' vehicle node by neighbor table, according to role's thresholding to determine whether having
Neighbours' cluster head can choose optimal neighbours' vehicle node according to coordinate thresholding and realize routing, can be straight according to resource ID set
It connects from neighbours' vehicle node and obtains required resource to fast implement resource query and configuration.
In the method for the invention, detection message includes type of message, hardware ID, coordinate and timestamp;Detection response disappears
Breath includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate and load;It includes message class that message, which is added,
Type, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, role and load;Cluster head safeguards a membership table, a member
List item includes hardware ID, coordinate, resource ID set, role and life cycle;Cluster member safeguards a cluster head table, a cluster head table
Item includes hardware ID, coordinate and life cycle domain;If vehicle node V1 prepares that a cluster is added, operations described below is executed:
Step 201: starting;
Step 202: vehicle node V1 checks neighbor table, if there is a neighbor entry, the role domain of the neighbor entry
Value is 1, thens follow the steps 203, no to then follow the steps 204;
Step 203: vehicle node V1 selects a neighbor entry, and role's thresholding of the neighbor entry is equal to 1;Vehicle node
V1 creates a cluster head list item, and the hardware ID and coordinate thresholding of the cluster head list item are respectively equal to the hardware ID and seat of the neighbor entry
Thresholding is marked, life cycle is set as maximum value;Vehicle node V1 sends an addition message, the value of message types of the addition message
It is 4, source hardware ID and source coordinate are respectively the hardware ID and coordinate of vehicle node V1, and purpose hardware ID and purpose coordinate are sky,
Load be the neighbor entry hardware ID and coordinate, resource ID set by the vehicle node V1 resource that can be shared resource ID structure
At role's thresholding is 2, executes step 215;
Step 204: vehicle node V1 sends a detection message, and the value of message types of the detection message is 2, hardware ID with
Coordinate thresholding is respectively equal to the hardware ID and coordinate thresholding of vehicle node V1, and timestamp is current time;Vehicle node V1 setting
One clock T1;
Step 205: after vehicle node receives detection message, if the vehicle node is cluster head, 208 are thened follow the steps,
It is no to then follow the steps 206;
Step 206: the vehicle node for receiving detection message checks current time and detects the difference of the timestamp of message
Whether absolute value is greater than threshold value T1, if so, 209 are thened follow the steps, it is no to then follow the steps 207;
Step 207: the vehicle node for receiving detection message forwards the detection message, executes step 205;
Step 208: the vehicle node for receiving detection message selects a neighbor entry, the coordinate thresholding of the neighbor entry
Distance is minimum between the coordinate of the detection message, sends a detection response message, the type of message of the detection response message
Value is 3, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, purpose hardware ID and purpose coordinate point
Not Deng Yu the neighbor entry hardware ID and coordinate, load the hardware ID and coordinate for the detection message;
Step 209: vehicle node receives detection response message, if the purpose coordinate and purpose of the detection response message
Hardware ID is sky, thens follow the steps 210, no to then follow the steps 211;
Step 210: the vehicle node for receiving detection response message checks whether the hardware ID of oneself is equal to the detection and rings
The hardware ID in Message Payload is answered, if so, 213 are thened follow the steps, it is no to then follow the steps 220;
Step 211: the vehicle node for receiving detection response message checks whether the hardware ID of oneself is equal to the detection and rings
The purpose hardware ID of message is answered, if so, 212 are thened follow the steps, it is no to then follow the steps 220;
Step 212: the vehicle node for receiving detection response message checks neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in detection response message load, then the purpose of the detection response message is hard
Part ID and purpose coordinate are set as empty, forward the detection response message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in detection response message load are nearest, by the purpose hardware of the detection response message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the detection response message, execute step
209;
Step 213: if vehicle node V1 is not received by detection response message in clock T1,220 are thened follow the steps,
It is no to then follow the steps 214;
Step 214: after vehicle node V1 receives detection response message, a neighbor entry is selected, the neighbor entry
The source coordinate distance of coordinate and the detection response message is nearest, sends an addition message, the value of message types of the addition message
It is 4, source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of vehicle node V1, and purpose hardware ID and coordinate are respectively equal to
The hardware ID and coordinate of the neighbor entry, role's thresholding are 2, load the source hardware ID and source coordinate for the detection response message,
Resource ID set is equal to the set that the resource ID for the resource that vehicle node V1 is capable of providing is constituted;Vehicle node V1 creates a cluster
First list item, the hardware ID and coordinate of the cluster head list item are respectively equal to the source hardware ID and source coordinate of the detection response message, life
Period is set as maximum value;
Step 215: vehicle node receives addition message, if the purpose coordinate and purpose hardware ID of the addition message are
Sky, thens follow the steps 216, no to then follow the steps 217;
Step 216: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message and bears
Hardware ID in load, if so, 219 are thened follow the steps, it is no to then follow the steps 220;
Step 217: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message
Purpose hardware ID, if so, 218 are thened follow the steps, it is no to then follow the steps 220;
Step 218: the vehicle node for receiving addition message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in the addition Message Payload, then is sat the purpose hardware ID and purpose of the addition message
Mark is set as empty, forwards the addition message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in the addition Message Payload is nearest, and the purpose hardware ID of the addition message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the addition message, execute step 215;
Step 219: receive be added message vehicle node create member's list item, the hardware ID of member's list item and
Coordinate is respectively equal to the source hardware ID and source coordinate of the addition message, and role's thresholding and resource ID set are respectively equal to the addition and disappear
The role's thresholding and resource ID set, life cycle of breath are set as maximum value;
Step 220: terminating.
Vehicle node is added in cluster by the above process, and the above process inquires cluster by the coordinate thresholding in neighbor table
Head, and be added in the cluster that the cluster head is identified, vehicle node can be realized the optimal path for reaching cluster head, institute by neighbor table
To reduce cost and delay that cluster is added;Cluster head obtains the money that each member is capable of providing by saving membership table simultaneously
Source, therefore can effectively distribute resource;Cluster head node obtained by membership table the current geographical coordinate of each member so as to
The communication with each member is enough realized by neighbor table;In addition, cluster head obtains whether each member is cluster gateway by membership table
To realize more effective resource allocation.
It, will be certainly if a cluster member detects that the number of the cluster head list item of oneself is greater than 1 in the method for the invention
Oneself label is gateway;Update message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, role
And load;Updating response message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate and load;Cluster
Member M1 is periodically executed operations described below and updates cluster head table and membership table:
Step 301: starting;
Step 302: cluster member M1 checks cluster head table, and for each cluster head list item, cluster member M1 executes operations described below: cluster at
Member M1 checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the hardware ID of the cluster head list item,
A update message is then sent, the value of message types of the update message is 5, and source hardware ID and coordinate are respectively equal to cluster member M1's
Hardware ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, load the hardware ID and coordinate for the neighbor entry, if
The number of the cluster head list item of cluster member M1 is equal to 1, then role's thresholding is set as 2, and otherwise role's thresholding is set as 3;If there is no institute
Neighbor entry is stated, then cluster member M1 selects a neighbor entry, the coordinate distance of the coordinate of the neighbor entry and the cluster head list item
Recently, a update message is sent, the value of message types of the update message is 5, and source hardware ID and coordinate are respectively equal to cluster member
The hardware ID and coordinate of M1, purpose hardware ID and purpose coordinate are respectively equal to the hardware ID and coordinate of the neighbor entry, load and are
The hardware ID and coordinate of the cluster head list item, if the number of the cluster head list item of cluster member M1 is equal to 1, role's thresholding is set as 2, no
Then role's thresholding is set as 3;
Step 303: vehicle node receives update message;If the purpose coordinate and purpose hardware ID of the update message are
Sky, thens follow the steps 304, no to then follow the steps 305;
Step 304: the vehicle node for receiving update message checks whether the hardware ID of oneself is equal to the update message and bears
Hardware ID in load, if so, 307 are thened follow the steps, it is no to then follow the steps 313;
Step 305: the vehicle node for receiving update message checks whether the hardware ID of oneself is equal to the update message
Purpose hardware ID, if so, 306 are thened follow the steps, it is no to then follow the steps 313;
Step 306: the vehicle node for receiving update message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in update message load, then is sat the purpose hardware ID and purpose of the update message
Mark is set as empty, forwards the update message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in update message load is nearest, and the purpose hardware ID of the update message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the update message, execute step 303;
Step 307: after vehicle node receives update message, checking membership table, select member's list item, the membership table
The hardware ID of item is equal to the source hardware ID of the update message, and the source that the coordinate of member's list item is updated to the update message is sat
Mark, role's thresholding are updated to role's thresholding of the update message, set maximum value for life cycle;The vehicle node checks neighbour
Table is occupied, if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the update message, then sends one
A update response message, the value of message types of the update response message are 6, and source hardware ID and coordinate are respectively equal to the vehicle node
Hardware ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, load the hardware ID and coordinate for the neighbor entry;It is no
Then, which selects a neighbor entry, and the coordinate of the neighbor entry and the source coordinate distance of the update message are nearest, hair
A update response message is sent, the value of message types of the update response message is 6, and source hardware ID and coordinate are respectively equal to the vehicle
The hardware ID and coordinate of node, purpose hardware ID and purpose coordinate are respectively equal to the hardware ID and coordinate of the neighbor entry, load
For the source hardware ID and coordinate of the update message;
Step 308: vehicle node receives update response message, if the purpose coordinate and purpose of the update response message
Hardware ID is sky, thens follow the steps 309, no to then follow the steps 310;
Step 309: the vehicle node for receiving update response message checks whether the hardware ID of oneself is equal to the update and rings
The hardware ID in Message Payload is answered, if so, 312 are thened follow the steps, it is no to then follow the steps 313;
Step 310: the vehicle node for receiving update response message checks whether the hardware ID of oneself is equal to the update and rings
The purpose hardware ID of message is answered, if so, 311 are thened follow the steps, it is no to then follow the steps 313;
Step 311: it receives and updates the vehicle node of response message and check neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in update response message load, then the purpose of the update response message is hard
Part ID and purpose coordinate are set as empty, forward the update response message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in update response message load are nearest, by the purpose hardware of the update response message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the update response message, execute step
308;
Step 312: receiving the vehicle node one cluster head list item of selection for updating response message, the hardware of the cluster head list item
ID is equal to the source hardware ID of the update response message, and the source that the coordinate of the cluster head list item is updated to the update response message is sat
Mark, sets maximum value for life cycle;
Step 313: terminating.
Cluster member updates cluster head table and membership table by the above process, the above process by the coordinate thresholding in neighbor table come
The optimal path between cluster member and cluster head is established, the update cost and delay of membership table and cluster head table are reduced;The above process
The changing coordinates of cluster head and cluster member can be updated, timely and effectively so as to ensure to pass through between cluster head and cluster member
Neighbor table fast implements communication, effectively distribution resource.
In the method for the invention, building message includes type of message, hardware ID, coordinate and timestamp;If vehicle section
The number of point V1 cluster head list item after executing step 201~220 is 0, then executes following process creation clusters:
Step 401: starting;
Step 402: vehicle node V1 sends a building message, and the value of message types of the building message is 7, hardware ID with
Coordinate thresholding is respectively equal to the hardware ID and coordinate thresholding of vehicle node V1, and timestamp is current time;
Step 403: vehicle node receives building message, if the resource ID collection for the resource that the vehicle node is capable of providing
It is combined into sky, thens follow the steps 406, no to then follow the steps 404:
Step 404: the vehicle node for receiving building message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID for occupying list item is equal to the source hardware ID of the building message, then sends an addition message, the message class of the addition message
Offset is 4, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, purpose hardware ID and coordinate difference
Equal to sky, if the number of the cluster head list item of the vehicle node is 0, role's thresholding is set as 2, and otherwise role's thresholding is set as 3, bears
The source hardware ID and source coordinate for the building message are carried, resource ID set is equal to the resource for the resource that the vehicle node is capable of providing
The set that ID is constituted;Otherwise, which selects a neighbor entry, the source of the coordinate of the neighbor entry and the building message
Coordinate distance is nearest, sends an addition message, and the value of message types of the addition message is 4, source hardware ID and source coordinate difference
Equal to the hardware ID and coordinate of the vehicle node, purpose hardware ID and purpose coordinate be respectively equal to the neighbor entry hardware ID and
Coordinate, if the number of the cluster head list item of the vehicle node is 0, role's thresholding is set as 2, and otherwise role's thresholding is set as 3, load
For the source hardware ID and source coordinate of the building message, resource ID set is equal to the resource ID for the resource that the vehicle node is capable of providing
The set of composition;
Step 405: receive building message vehicle node create a cluster head list item, the hardware ID of the cluster head list item and
Coordinate is respectively equal to the source hardware ID of the building and source coordinate, life cycle are set as maximum value;
Step 406: receive building message vehicle node check judge current time with building message timestamp it
Whether absolute value of the difference is greater than threshold value T1, if so, 408 are thened follow the steps, it is no to then follow the steps 407;
Step 407: the vehicle node for receiving building message forwards the building message, executes step 403;
Step 408: vehicle node receives addition message, if the purpose coordinate and purpose hardware ID of the addition message are
Sky, thens follow the steps 409, no to then follow the steps 410;
Step 409: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message and bears
Hardware ID in load, if so, 412 are thened follow the steps, it is no to then follow the steps 413;
Step 410: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message
Purpose hardware ID, if so, 411 are thened follow the steps, it is no to then follow the steps 413;
Step 411: the vehicle node for receiving addition message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in the addition Message Payload, then is sat the purpose hardware ID and purpose of the addition message
Mark is set as empty, forwards the addition message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in the addition Message Payload is nearest, and the purpose hardware ID of the addition message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the addition message, execute step 408;
Step 412: receive be added message vehicle node create member's list item, the hardware ID of member's list item and
Coordinate is respectively equal to the source hardware ID and source coordinate of the addition message, and role's thresholding and resource ID set are respectively equal to the addition and disappear
The role's thresholding and resource ID set, life cycle of breath are set as maximum value;
Step 413: terminating.
Vehicle node constructs cluster by the above process and establishes membership table to save the information of each member, and the above process is logical
The coordinate thresholding realization cluster head in neighbor table and the communication between cluster member are crossed, therefore reduces the cost and delay of building cluster;
Cluster head node obtained by membership table the current geographical coordinate of each member so as to by neighbor table realize with it is each at
The quick correct communication of member;In addition, cluster head obtains whether each member is that cluster gateway is more effective to realize by membership table
Resource allocation.
In the method for the invention, request message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose
Coordinate, resource ID set and load;
Response message include type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, resource ID set and
Load;
Secondary request message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, resource ID collection
It closes and loads;
Need to obtain some resources in cluster member M1, under conditions of the resource ID of these resources constitutes resource ID set S1,
If the union of the resource ID set thresholding of all neighbor entries of cluster member M1 is not the superset of set S1, cluster member M1 is logical
It crosses following processes and obtains the information for being capable of providing the vehicle node for the resource that set S1 is identified:
Step 501: starting;
Step 502: cluster member M1 checks cluster head table, selects a cluster head list item, the coordinate of the cluster head list item and cluster member
The coordinate distance of M1 is nearest;Cluster member M1 checks neighbor table, if there is a neighbor entry, the hardware ID etc. of the neighbor entry
In the hardware ID of the cluster head list item, then send a request message, the value of message types of the request message is 8, source hardware ID and
Source coordinate is respectively equal to the hardware ID and coordinate of cluster member M1, and purpose hardware ID and purpose coordinate are set as empty, resource ID set
For set S1, hardware ID and coordinate for the neighbor entry are loaded;Otherwise, cluster member M1 selects a neighbor entry, the neighbours
The coordinate of list item and the coordinate distance of the cluster head list item are nearest, send a request message, the value of message types of the request message
It is 8, source hardware ID and coordinate are respectively equal to the hardware ID and coordinate of cluster member M1, and purpose hardware ID and purpose coordinate are respectively equal to
The hardware ID and coordinate of the neighbor entry, resource ID collection are combined into set S1, load hardware ID and coordinate for the cluster head list item;
Step 503: vehicle node receives request message, if the purpose coordinate and purpose hardware ID of the request message are
Sky, thens follow the steps 504, no to then follow the steps 505;
Step 504: the vehicle node for receiving request message judges whether the hardware ID of oneself is equal to the request message and bears
Hardware ID in load, if so, 509 are thened follow the steps, it is no to then follow the steps 528;
Step 505: the vehicle node for receiving request message judges whether the hardware ID of oneself is equal to the request message
Purpose hardware ID, if so, 506 are thened follow the steps, it is no to then follow the steps 528;
Step 506: the vehicle node for receiving request message checks neighbor table, if the institute of the neighbor table of the vehicle node
The union of the resource ID set thresholding of neighbor entry is the superset of the request message resource ID set, thens follow the steps 507, no
Then follow the steps 508;
Step 507: the vehicle node for receiving request message selects more than one neighbor entry, these neighbor entries
The union of resource ID set thresholding is the superset of the request message resource ID set;The vehicle node checks neighbor table, if deposited
In a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the request message, then sends a response message,
The value of message types of the response message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, mesh
Hardware ID and purpose coordinate be set as empty, resource ID set is equal to the resource ID set of the request message, loads as the neighbours
The hardware ID and coordinate of list item and selected all neighbor entries, the union of the resource ID set thresholding of these neighbor entries
It is the superset of the request message resource ID set;Otherwise, which selects a neighbor entry E1, the seat of the neighbor entry
Mark is nearest with the source coordinate distance of the request message, sends a response message, and the value of message types of the response message is 9, source
Hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, and purpose hardware ID and purpose coordinate are set as choosing
Neighbor entry E1 hardware ID and coordinate, resource ID set be equal to the request message resource ID set, load as the request
The source hardware ID and source coordinate and selected all neighbor entries of message, the resource ID set thresholding of these neighbor entries
Union is the superset of the request message resource ID set;Execute step 523;
Step 508: the vehicle node for receiving request message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in request message load, then is sat the purpose hardware ID and purpose of the request message
Mark is set as empty, forwards the request message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in request message load is nearest, and the purpose hardware ID of the request message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry, the vehicle node forward the request message, execute step 503;
Step 509: vehicle node checks membership table after receiving request message;If the institute of the membership table of the vehicle node
The union of the resource ID set thresholding of member's list item is the superset of the request message resource ID set, thens follow the steps 510, no
Then follow the steps 511;
Step 510: the vehicle node for receiving request message selects more than one member's list item, these member's list items
The union of resource ID set thresholding is the superset of the request message resource ID set;The vehicle node checks neighbor table, if deposited
In a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the request message, then sends a response message,
The value of message types of the response message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, mesh
Hardware ID and purpose coordinate be set as empty, resource ID set is equal to the resource ID set of the request message, loads as the neighbours
The hardware ID and coordinate of list item and selected all member's list items;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the source coordinate distance of the request message are nearest, which sends a response message, the response
The value of message types of message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, purpose hardware
ID and purpose coordinate are set as the hardware ID and coordinate for the neighbor entry chosen, and resource ID set is equal to the resource of the request message
ID set, loads the source hardware ID and source coordinate and selected all member's list items for the request message;Execute step
523;
Step 511: member's list item that the vehicle node of request message selects all role's values to be equal to 3 is received, from these
Member's list item is selected in member's list item, the coordinate distance of the coordinate distance of the member's list item vehicle node is nearest;The vehicle
Node checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the hardware of member's list item
ID then sends a secondary query messages, and the value of message types of the secondary query messages is 10, source hardware ID and source coordinate difference
Equal to the source hardware ID and source coordinate of the request message, purpose hardware ID and purpose coordinate are set as empty, and resource ID set is equal to
The resource ID set of the request message loads the hardware ID and coordinate of member's list item for selection;Otherwise, which selects
One neighbor entry, the coordinate of the neighbor entry and the coordinate distance of member's list item are nearest, send a secondary request message,
The value of message types of the secondary request message is 10, the hardware for the request message that source hardware ID and source coordinate respectively equal to receive
ID and coordinate, purpose hardware ID and purpose coordinate are set as the hardware ID and coordinate of the neighbor entry chosen, resource ID set etc.
In the resource ID set of the request message, the source hardware ID and source coordinate for member's list item are loaded;
Step 512: vehicle node receives secondary request message, if the purpose coordinate and purpose of the secondary request message
Hardware ID is sky, thens follow the steps 513, no to then follow the steps 514;
Step 513: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The hardware ID in Message Payload is sought, if so, 516 are thened follow the steps, it is no to then follow the steps 528;
Step 514: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The purpose hardware ID of message is sought, if so, 515 are thened follow the steps, it is no to then follow the steps 528;
Step 515: the vehicle node for receiving secondary request message checks neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in the secondary request Message Payload, then the purpose of the secondary request message is hard
Part ID and purpose coordinate are set as empty, forward the secondary request message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in the secondary request Message Payload are nearest, by the purpose hardware of the secondary request message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the secondary request message, execute step
512;
Step 516: after vehicle node receives secondary request message, checking cluster head table, executed for each cluster head list item
Operations described below: the vehicle node checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the cluster
The hardware ID of first list item then sets empty for the purpose hardware ID of the secondary request message and purpose coordinate, and load is updated to this
The hardware ID and coordinate of neighbor entry;Otherwise, which selects a neighbor entry, the coordinate of the neighbor entry and the cluster
The coordinate distance of first list item is nearest, and the purpose hardware ID of the secondary request message and purpose coordinate are updated to the neighbor table respectively
The hardware ID and coordinate of item, load are updated to the hardware ID and coordinate of the cluster head list item;
Step 517: vehicle node receives secondary request message;If the purpose coordinate and purpose of the secondary request message
Hardware ID is sky, thens follow the steps 518, no to then follow the steps 519;
Step 518: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The hardware ID in Message Payload is sought, if so, 521 are thened follow the steps, it is no to then follow the steps 528;
Step 519: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The purpose hardware ID of message is sought, if so, 520 are thened follow the steps, it is no to then follow the steps 528;
Step 520: the vehicle node for receiving secondary request message checks neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in the secondary request Message Payload, then the purpose of the secondary request message is hard
Part ID and purpose coordinate are set as empty, forward the secondary request message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in the secondary request Message Payload are nearest, by the purpose hardware of the secondary request message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the secondary request message, execute step
517;
Step 521: vehicle node checks membership table after receiving secondary request message, if the membership table of the vehicle node
All member's list items resource ID set thresholding union be the secondary request message source ID set superset, then execute step
Rapid 522, it is no to then follow the steps 528;
Step 522: the vehicle node for receiving secondary request message selects more than one member's list item, these membership tables
The union of the resource ID set thresholding of item is the superset of secondary request message source ID set;The vehicle node checks neighbours
Table, if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the secondary request message, then sends
One response message, the value of message types of the response message are 9, and source hardware ID and source coordinate are respectively equal to the hard of the vehicle node
Part ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, and resource ID set is equal to the resource ID of the secondary request message
Set, loads the hardware ID and coordinate and selected all member's list items for the neighbor entry;Otherwise, which selects
A neighbor entry is selected, the coordinate of the neighbor entry and the source coordinate distance of the secondary request message are nearest, send a response
Message, the value of message types of the response message are 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and seat of the vehicle node
Mark, purpose hardware ID and purpose coordinate are set as the hardware ID and coordinate for the neighbor entry chosen, resource ID set be equal to this two
The resource ID set of secondary request message loads as the source hardware ID and source coordinate of the secondary request message and selected all
Member's list item;
Step 523: vehicle node receives response message, if the purpose coordinate and purpose hardware ID of the response message are
Sky, thens follow the steps 524, no to then follow the steps 525;
Step 524: the vehicle node for receiving response message judges whether the hardware ID of oneself is equal to the response message and bears
Hardware ID in load, if so, 527 are thened follow the steps, it is no to then follow the steps 528;
Step 525: the vehicle node for receiving response message judges whether the hardware ID of oneself is equal to the response message
Purpose hardware ID, if so, 526 are thened follow the steps, it is no to then follow the steps 528;
Step 526: the vehicle node for receiving response message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in response message load, then is sat the purpose hardware ID and purpose of the response message
Mark is set as empty, forwards the response message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in response message load is nearest, and the purpose hardware ID of the response message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the response message, execute step 523;
Step 527: vehicle node receives member's list item or the neighbour saved after response message in response message load
Occupy list item;
Step 528: terminating.
Vehicle node obtains required resource from cluster head by the above process, and the above process passes through the coordinate thresholding in neighbor table
The communication between cluster head and cluster member is realized, therefore reduces the cost and delay of resource distribution;Cluster head node passes through member
Table obtains the information of cluster gateway, if can not provide the required resource of vehicle node in this cluster, cluster head if passes through cluster gateway and connects
The more than two cluster heads connect obtain resource, so that the success rate of resource distribution be greatly improved;Cluster head node real-time servicing
The current geographical coordinate of each member further increases so as to realize the quick correct communication with each member by neighbor table
The high efficiency of resource distribution is added.
Detailed description of the invention
The present invention is done with reference to the accompanying drawings and detailed description and is further illustrated, of the invention is above-mentioned
And/or otherwise advantage will become apparent.
Fig. 1 is maintenance of neighbor table flow diagram of the present invention.
Fig. 2 is addition cluster flow diagram of the present invention.
Fig. 3 is that update membership table of the present invention obtains flow diagram.
Fig. 4 is creation cluster flow diagram of the present invention.
Fig. 5 is data communication process schematic diagram of the present invention.
Specific embodiment:
The Internet resources inquiry and distribution method, the vehicle node that the present invention provides a kind of based on vehicle-mounted cloud pass through this
Communication means provided by inventing can keep the continuity communicated in moving process, bursts dropping ratio be reduced, to improve
Service quality, present invention can apply to the fields such as road conditions monitoring, vehicle management, are with a wide range of applications.
Fig. 1 is maintenance of neighbor table flow diagram of the present invention.The network vehicle node, the network are divided into
More than two clusters, a cluster are made of more than two vehicle nodes, wherein these vehicle nodes be divided into cluster head and cluster at
Member, a cluster include a cluster head and more than two cluster members;If cluster member belongs to more than two clusters, cluster member
Also known as cluster gateway;
For one vehicle node by a hardware ID unique identification, which can be MAC Address;One vehicle node is matched
Set more than one resource, a kind of resource is by a resource ID unique identification;Vehicle node is communicated using message, and one disappears
For breath by type of message unique identification, type of message is as shown in the table:
Value of message types | Message name |
1 | Beacon message |
2 | Detect message |
3 | Detect response message |
4 | Message is added |
5 | Update message |
6 | Update response message |
7 | Construct message |
8 | Request message |
9 | Response message |
10 | Secondary request message |
Each vehicle node safeguards a neighbor table, and a neighbor entry includes hardware ID, coordinate, resource ID set, angle
Colour gamut and life cycle domain;If role's thresholding is 1, then it represents that the corresponding vehicle node of the neighbor entry is cluster head;If angle
Color gamut value is 2, then it represents that the corresponding vehicle node of the neighbor entry is cluster member;If role's thresholding is 3, then it represents that the neighbours
The corresponding vehicle node of list item is cluster gateway;If role's thresholding is 4, then it represents that the corresponding vehicle node of the neighbor entry is neither
It is cluster head, nor cluster member or cluster gateway;
One beacon message is made of type of message, hardware ID, coordinate, role and resource ID set;Vehicle node V1 is fixed
Phase executes operations described below:
Step 101: starting;
Step 102: vehicle node V1 periodically sends beacon message, and the value of message types of the beacon message is 1, and hardware ID is
The hardware ID of vehicle node V1, coordinate are the coordinate of vehicle node V1, the money that resource ID set can be shared by vehicle node V1
The resource ID in source is constituted;If vehicle node V1 is cluster head, role's thresholding is set as 1, if vehicle node V1 is cluster member,
Role's thresholding is set as 2, if vehicle node is cluster gateway, role's thresholding is set as 3, and otherwise, role's thresholding is set as 4;
Step 103: after neighbours' vehicle node receives beacon message, check neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID of the beacon message, then by the coordinate of the neighbor entry, role and resource ID
Coordinate, role and resource ID set thresholding, the life cycle that set is updated to beacon message respectively are set as maximum value, such as
100ms;Otherwise the neighbours' vehicle node creates a neighbor entry, and the hardware ID of the neighbor entry is equal to the hard of the beacon message
Part ID, coordinate, role and the resource ID set of the neighbor entry are updated to the coordinate of beacon message, role and resource respectively
ID gathers thresholding, and life cycle is set as maximum value, such as 100ms;
Step 104: terminating.
Vehicle node can grasp the information of neighbours' vehicle node by neighbor table, according to role's thresholding to determine whether having
Neighbours' cluster head can choose optimal neighbours' vehicle node according to coordinate thresholding and realize routing, can be straight according to resource ID set
It connects from neighbours' vehicle node and obtains required resource to fast implement resource query and configuration.
Fig. 2 is addition cluster flow diagram of the present invention.Detect message include type of message, hardware ID, coordinate and
Timestamp;Detecting response message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate and load;Add
Entering message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, role and load;Cluster head maintenance one
A membership table, member's list item include hardware ID, coordinate, resource ID set, role and life cycle;Cluster member safeguards one
Cluster head table, a cluster head list item include hardware ID, coordinate and life cycle domain;If vehicle node V1 prepares that a cluster is added,
Then execute operations described below:
Step 201: starting;
Step 202: vehicle node V1 checks neighbor table, if there is a neighbor entry, the role domain of the neighbor entry
Value is 1, thens follow the steps 203, no to then follow the steps 204;
Step 203: vehicle node V1 selects a neighbor entry, and role's thresholding of the neighbor entry is equal to 1;Vehicle node
V1 creates a cluster head list item, and the hardware ID and coordinate thresholding of the cluster head list item are respectively equal to the hardware ID and seat of the neighbor entry
Thresholding is marked, life cycle is set as maximum value;Vehicle node V1 sends an addition message, the value of message types of the addition message
It is 4, source hardware ID and source coordinate are respectively the hardware ID and coordinate of vehicle node V1, and purpose hardware ID and purpose coordinate are sky,
Load be the neighbor entry hardware ID and coordinate, resource ID set by the vehicle node V1 resource that can be shared resource ID structure
At role's thresholding is 2, executes step 215;
Step 204: vehicle node V1 sends a detection message, and the value of message types of the detection message is 2, hardware ID with
Coordinate thresholding is respectively equal to the hardware ID and coordinate thresholding of vehicle node V1, and timestamp is current time;Vehicle node V1 setting
One clock T1;
Step 205: after vehicle node receives detection message, if the vehicle node is cluster head, 208 are thened follow the steps,
It is no to then follow the steps 206;
Step 206: the vehicle node for receiving detection message checks current time and detects the difference of the timestamp of message
Whether absolute value is greater than threshold value T1, if so, 209 are thened follow the steps, it is no to then follow the steps 207;
Step 207: the vehicle node for receiving detection message forwards the detection message, executes step 205;
Step 208: the vehicle node for receiving detection message selects a neighbor entry, the coordinate thresholding of the neighbor entry
Distance is minimum between the coordinate of the detection message, sends a detection response message, the type of message of the detection response message
Value is 3, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, purpose hardware ID and purpose coordinate point
Not Deng Yu the neighbor entry hardware ID and coordinate, load the hardware ID and coordinate for the detection message;
Step 209: vehicle node receives detection response message, if the purpose coordinate and purpose of the detection response message
Hardware ID is sky, thens follow the steps 210, no to then follow the steps 211;
Step 210: the vehicle node for receiving detection response message checks whether the hardware ID of oneself is equal to the detection and rings
The hardware ID in Message Payload is answered, if so, 213 are thened follow the steps, it is no to then follow the steps 220;
Step 211: the vehicle node for receiving detection response message checks whether the hardware ID of oneself is equal to the detection and rings
The purpose hardware ID of message is answered, if so, 212 are thened follow the steps, it is no to then follow the steps 220;
Step 212: the vehicle node for receiving detection response message checks neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in detection response message load, then the purpose of the detection response message is hard
Part ID and purpose coordinate are set as empty, forward the detection response message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in detection response message load are nearest, by the purpose hardware of the detection response message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the detection response message, execute step
209;
Step 213: if vehicle node V1 is not received by detection response message in clock T1,220 are thened follow the steps,
It is no to then follow the steps 214;
Step 214: after vehicle node V1 receives detection response message, a neighbor entry is selected, the neighbor entry
The source coordinate distance of coordinate and the detection response message is nearest, sends an addition message, the value of message types of the addition message
It is 4, source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of vehicle node V1, and purpose hardware ID and coordinate are respectively equal to
The hardware ID and coordinate of the neighbor entry, role's thresholding are 2, load the source hardware ID and source coordinate for the detection response message,
Resource ID set is equal to the set that the resource ID for the resource that vehicle node V1 is capable of providing is constituted;Vehicle node V1 creates a cluster
First list item, the hardware ID and coordinate of the cluster head list item are respectively equal to the source hardware ID and source coordinate of the detection response message, life
Period is set as maximum value;
Step 215: vehicle node receives addition message, if the purpose coordinate and purpose hardware ID of the addition message are
Sky, thens follow the steps 216, no to then follow the steps 217;
Step 216: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message and bears
Hardware ID in load, if so, 219 are thened follow the steps, it is no to then follow the steps 220;
Step 217: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message
Purpose hardware ID, if so, 218 are thened follow the steps, it is no to then follow the steps 220;
Step 218: the vehicle node for receiving addition message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in the addition Message Payload, then is sat the purpose hardware ID and purpose of the addition message
Mark is set as empty, forwards the addition message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in the addition Message Payload is nearest, and the purpose hardware ID of the addition message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the addition message, execute step 215;
Step 219: receive be added message vehicle node create member's list item, the hardware ID of member's list item and
Coordinate is respectively equal to the source hardware ID and source coordinate of the addition message, and role's thresholding and resource ID set are respectively equal to the addition and disappear
The role's thresholding and resource ID set, life cycle of breath are set as maximum value;
Step 220: terminating.
Vehicle node is added in cluster by the above process, and the above process inquires cluster by the coordinate thresholding in neighbor table
Head, and be added in the cluster that the cluster head is identified, vehicle node can be realized the optimal path for reaching cluster head, institute by neighbor table
To reduce cost and delay that cluster is added;Cluster head obtains the money that each member is capable of providing by saving membership table simultaneously
Source, therefore can effectively distribute resource;Cluster head node obtained by membership table the current geographical coordinate of each member so as to
The communication with each member is enough realized by neighbor table;In addition, cluster head obtains whether each member is cluster gateway by membership table
To realize more effective resource allocation.
Fig. 3 is that update membership table of the present invention obtains flow diagram.If a cluster member detects oneself
The number of cluster head list item is greater than 1, then oneself is labeled as cluster gateway;Update message includes type of message, source hardware ID, source seat
Mark, purpose hardware ID, purpose coordinate, role and load;Updating response message includes type of message, source hardware ID, source coordinate, mesh
Hardware ID, purpose coordinate and load;Cluster member M1 is periodically executed operations described below and updates cluster head table and membership table:
Step 301: starting;
Step 302: cluster member M1 checks cluster head table, and for each cluster head list item, cluster member M1 executes operations described below: cluster at
Member M1 checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the hardware ID of the cluster head list item,
A update message is then sent, the value of message types of the update message is 5, and source hardware ID and coordinate are respectively equal to cluster member M1's
Hardware ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, load the hardware ID and coordinate for the neighbor entry, if
The number of the cluster head list item of cluster member M1 is equal to 1, then role's thresholding is set as 2, and otherwise role's thresholding is set as 3;If there is no institute
Neighbor entry is stated, then cluster member M1 selects a neighbor entry, the coordinate distance of the coordinate of the neighbor entry and the cluster head list item
Recently, a update message is sent, the value of message types of the update message is 5, and source hardware ID and coordinate are respectively equal to cluster member
The hardware ID and coordinate of M1, purpose hardware ID and purpose coordinate are respectively equal to the hardware ID and coordinate of the neighbor entry, load and are
The hardware ID and coordinate of the cluster head list item, if the number of the cluster head list item of cluster member M1 is equal to 1, role's thresholding is set as 2, no
Then role's thresholding is set as 3;
Step 303: vehicle node receives update message;If the purpose coordinate and purpose hardware ID of the update message are
Sky, thens follow the steps 304, no to then follow the steps 305;
Step 304: the vehicle node for receiving update message checks whether the hardware ID of oneself is equal to the update message and bears
Hardware ID in load, if so, 307 are thened follow the steps, it is no to then follow the steps 313;
Step 305: the vehicle node for receiving update message checks whether the hardware ID of oneself is equal to the update message
Purpose hardware ID, if so, 306 are thened follow the steps, it is no to then follow the steps 313;
Step 306: the vehicle node for receiving update message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in update message load, then is sat the purpose hardware ID and purpose of the update message
Mark is set as empty, forwards the update message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in update message load is nearest, and the purpose hardware ID of the update message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the update message, execute step 303;
Step 307: after vehicle node receives update message, checking membership table, select member's list item, the membership table
The hardware ID of item is equal to the source hardware ID of the update message, and the source that the coordinate of member's list item is updated to the update message is sat
Mark, role's thresholding are updated to role's thresholding of the update message, set maximum value for life cycle;The vehicle node checks neighbour
Table is occupied, if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the update message, then sends one
A update response message, the value of message types of the update response message are 6, and source hardware ID and coordinate are respectively equal to the vehicle node
Hardware ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, load the hardware ID and coordinate for the neighbor entry;It is no
Then, which selects a neighbor entry, and the coordinate of the neighbor entry and the source coordinate distance of the update message are nearest, hair
A update response message is sent, the value of message types of the update response message is 6, and source hardware ID and coordinate are respectively equal to the vehicle
The hardware ID and coordinate of node, purpose hardware ID and purpose coordinate are respectively equal to the hardware ID and coordinate of the neighbor entry, load
For the source hardware ID and coordinate of the update message;
Step 308: vehicle node receives update response message, if the purpose coordinate and purpose of the update response message
Hardware ID is sky, thens follow the steps 309, no to then follow the steps 310;
Step 309: the vehicle node for receiving update response message checks whether the hardware ID of oneself is equal to the update and rings
The hardware ID in Message Payload is answered, if so, 312 are thened follow the steps, it is no to then follow the steps 313;
Step 310: the vehicle node for receiving update response message checks whether the hardware ID of oneself is equal to the update and rings
The purpose hardware ID of message is answered, if so, 311 are thened follow the steps, it is no to then follow the steps 313;
Step 311: it receives and updates the vehicle node of response message and check neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in update response message load, then the purpose of the update response message is hard
Part ID and purpose coordinate are set as empty, forward the update response message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in update response message load are nearest, by the purpose hardware of the update response message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the update response message, execute step
308;
Step 312: receiving the vehicle node one cluster head list item of selection for updating response message, the hardware of the cluster head list item
ID is equal to the source hardware ID of the update response message, and the source that the coordinate of the cluster head list item is updated to the update response message is sat
Mark, sets maximum value for life cycle;
Step 313: terminating.
Cluster member updates cluster head table and membership table by the above process, the above process by the coordinate thresholding in neighbor table come
The optimal path between cluster member and cluster head is established, the update cost and delay of membership table and cluster head table are reduced;The above process
The changing coordinates of cluster head and cluster member can be updated, timely and effectively so as to ensure to pass through between cluster head and cluster member
Neighbor table fast implements communication, effectively distribution resource.
Fig. 4 is creation cluster flow diagram of the present invention.Construct message include type of message, hardware ID, coordinate and
Timestamp;If the number of vehicle node V1 cluster head list item after executing step 201~220 is 0, following process wounds are executed
Build cluster:
Step 401: starting;
Step 402: vehicle node V1 sends a building message, and the value of message types of the building message is 7, hardware ID with
Coordinate thresholding is respectively equal to the hardware ID and coordinate thresholding of vehicle node V1, and timestamp is current time;
Step 403: vehicle node receives building message, if the resource ID collection for the resource that the vehicle node is capable of providing
It is combined into sky, thens follow the steps 406, no to then follow the steps 404:
Step 404: the vehicle node for receiving building message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID for occupying list item is equal to the source hardware ID of the building message, then sends an addition message, the message class of the addition message
Offset is 4, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, purpose hardware ID and coordinate difference
Equal to sky, if the number of the cluster head list item of the vehicle node is 0, role's thresholding is set as 2, and otherwise role's thresholding is set as 3, bears
The source hardware ID and source coordinate for the building message are carried, resource ID set is equal to the resource for the resource that the vehicle node is capable of providing
The set that ID is constituted;Otherwise, which selects a neighbor entry, the source of the coordinate of the neighbor entry and the building message
Coordinate distance is nearest, sends an addition message, and the value of message types of the addition message is 4, source hardware ID and source coordinate difference
Equal to the hardware ID and coordinate of the vehicle node, purpose hardware ID and purpose coordinate be respectively equal to the neighbor entry hardware ID and
Coordinate, if the number of the cluster head list item of the vehicle node is 0, role's thresholding is set as 2, and otherwise role's thresholding is set as 3, load
For the source hardware ID and source coordinate of the building message, resource ID set is equal to the resource ID for the resource that the vehicle node is capable of providing
The set of composition;
Step 405: receive building message vehicle node create a cluster head list item, the hardware ID of the cluster head list item and
Coordinate is respectively equal to the source hardware ID of the building and source coordinate, life cycle are set as maximum value;
Step 406: receive building message vehicle node check judge current time with building message timestamp it
Whether absolute value of the difference is greater than threshold value T1, if so, 408 are thened follow the steps, it is no to then follow the steps 407;
Step 407: the vehicle node for receiving building message forwards the building message, executes step 403;
Step 408: vehicle node receives addition message, if the purpose coordinate and purpose hardware ID of the addition message are
Sky, thens follow the steps 409, no to then follow the steps 410;
Step 409: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message and bears
Hardware ID in load, if so, 412 are thened follow the steps, it is no to then follow the steps 413;
Step 410: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the addition message
Purpose hardware ID, if so, 411 are thened follow the steps, it is no to then follow the steps 413;
Step 411: the vehicle node for receiving addition message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in the addition Message Payload, then is sat the purpose hardware ID and purpose of the addition message
Mark is set as empty, forwards the addition message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in the addition Message Payload is nearest, and the purpose hardware ID of the addition message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the addition message, execute step 408;
Step 412: receive be added message vehicle node create member's list item, the hardware ID of member's list item and
Coordinate is respectively equal to the source hardware ID and source coordinate of the addition message, and role's thresholding and resource ID set are respectively equal to the addition and disappear
The role's thresholding and resource ID set, life cycle of breath are set as maximum value;
Step 413: terminating.
Vehicle node constructs cluster by the above process and establishes membership table to save the information of each member, and the above process is logical
The coordinate thresholding realization cluster head in neighbor table and the communication between cluster member are crossed, therefore reduces the cost and delay of building cluster;
Cluster head node obtained by membership table the current geographical coordinate of each member so as to by neighbor table realize with it is each at
The quick correct communication of member;In addition, cluster head obtains whether each member is that cluster gateway is more effective to realize by membership table
Resource allocation.
Fig. 5 is data communication process schematic diagram of the present invention.Request message includes type of message, source hardware ID, source
Coordinate, purpose hardware ID, purpose coordinate, resource ID set and load;
Response message include type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, resource ID set and
Load;
Secondary request message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, resource ID collection
It closes and loads;
Need to obtain some resources in cluster member M1, under conditions of the resource ID of these resources constitutes resource ID set S1,
If the union of the resource ID set thresholding of all neighbor entries of cluster member M1 is not the superset of set S1, cluster member M1 is logical
It crosses following processes and obtains the information for being capable of providing the vehicle node for the resource that set S1 is identified:
Step 501: starting;
Step 502: cluster member M1 checks cluster head table, selects a cluster head list item, the coordinate of the cluster head list item and cluster member
The coordinate distance of M1 is nearest;Cluster member M1 checks neighbor table, if there is a neighbor entry, the hardware ID etc. of the neighbor entry
In the hardware ID of the cluster head list item, then send a request message, the value of message types of the request message is 8, source hardware ID and
Source coordinate is respectively equal to the hardware ID and coordinate of cluster member M1, and purpose hardware ID and purpose coordinate are set as empty, resource ID set
For set S1, hardware ID and coordinate for the neighbor entry are loaded;Otherwise, cluster member M1 selects a neighbor entry, the neighbours
The coordinate of list item and the coordinate distance of the cluster head list item are nearest, send a request message, the value of message types of the request message
It is 8, source hardware ID and coordinate are respectively equal to the hardware ID and coordinate of cluster member M1, and purpose hardware ID and purpose coordinate are respectively equal to
The hardware ID and coordinate of the neighbor entry, resource ID collection are combined into set S1, load hardware ID and coordinate for the cluster head list item;
Step 503: vehicle node receives request message, if the purpose coordinate and purpose hardware ID of the request message are
Sky, thens follow the steps 504, no to then follow the steps 505;
Step 504: the vehicle node for receiving request message judges whether the hardware ID of oneself is equal to the request message and bears
Hardware ID in load, if so, 509 are thened follow the steps, it is no to then follow the steps 528;
Step 505: the vehicle node for receiving request message judges whether the hardware ID of oneself is equal to the request message
Purpose hardware ID, if so, 506 are thened follow the steps, it is no to then follow the steps 528;
Step 506: the vehicle node for receiving request message checks neighbor table, if the institute of the neighbor table of the vehicle node
The union of the resource ID set thresholding of neighbor entry is the superset of the request message resource ID set, thens follow the steps 507, no
Then follow the steps 508;
Step 507: the vehicle node for receiving request message selects more than one neighbor entry, these neighbor entries
The union of resource ID set thresholding is the superset of the request message resource ID set;The vehicle node checks neighbor table, if deposited
In a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the request message, then sends a response message,
The value of message types of the response message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, mesh
Hardware ID and purpose coordinate be set as empty, resource ID set is equal to the resource ID set of the request message, loads as the neighbours
The hardware ID and coordinate of list item and selected all neighbor entries, the union of the resource ID set thresholding of these neighbor entries
It is the superset of the request message resource ID set;Otherwise, which selects a neighbor entry E1, the seat of the neighbor entry
Mark is nearest with the source coordinate distance of the request message, sends a response message, and the value of message types of the response message is 9, source
Hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, and purpose hardware ID and purpose coordinate are set as choosing
Neighbor entry E1 hardware ID and coordinate, resource ID set be equal to the request message resource ID set, load as the request
The source hardware ID and source coordinate and selected all neighbor entries of message, the resource ID set thresholding of these neighbor entries
Union is the superset of the request message resource ID set;Execute step 523;
Step 508: the vehicle node for receiving request message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in request message load, then is sat the purpose hardware ID and purpose of the request message
Mark is set as empty, forwards the request message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in request message load is nearest, and the purpose hardware ID of the request message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry, the vehicle node forward the request message, execute step 503;
Step 509: vehicle node checks membership table after receiving request message;If the institute of the membership table of the vehicle node
The union of the resource ID set thresholding of member's list item is the superset of the request message resource ID set, thens follow the steps 510, no
Then follow the steps 511;
Step 510: the vehicle node for receiving request message selects more than one member's list item, these member's list items
The union of resource ID set thresholding is the superset of the request message resource ID set;The vehicle node checks neighbor table, if deposited
In a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the request message, then sends a response message,
The value of message types of the response message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, mesh
Hardware ID and purpose coordinate be set as empty, resource ID set is equal to the resource ID set of the request message, loads as the neighbours
The hardware ID and coordinate of list item and selected all member's list items;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the source coordinate distance of the request message are nearest, which sends a response message, the response
The value of message types of message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, purpose hardware
ID and purpose coordinate are set as the hardware ID and coordinate for the neighbor entry chosen, and resource ID set is equal to the resource of the request message
ID set, loads the source hardware ID and source coordinate and selected all member's list items for the request message;Execute step
523;
Step 511: member's list item that the vehicle node of request message selects all role's values to be equal to 3 is received, from these
Member's list item is selected in member's list item, the coordinate distance of the coordinate distance of the member's list item vehicle node is nearest;The vehicle
Node checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the hardware of member's list item
ID then sends a secondary query messages, and the value of message types of the secondary query messages is 10, source hardware ID and source coordinate difference
Equal to the source hardware ID and source coordinate of the request message, purpose hardware ID and purpose coordinate are set as empty, and resource ID set is equal to
The resource ID set of the request message loads the hardware ID and coordinate of member's list item for selection;Otherwise, which selects
One neighbor entry, the coordinate of the neighbor entry and the coordinate distance of member's list item are nearest, send a secondary request message,
The value of message types of the secondary request message is 10, the hardware for the request message that source hardware ID and source coordinate respectively equal to receive
ID and coordinate, purpose hardware ID and purpose coordinate are set as the hardware ID and coordinate of the neighbor entry chosen, resource ID set etc.
In the resource ID set of the request message, the source hardware ID and source coordinate for member's list item are loaded;
Step 512: vehicle node receives secondary request message, if the purpose coordinate and purpose of the secondary request message
Hardware ID is sky, thens follow the steps 513, no to then follow the steps 514;
Step 513: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The hardware ID in Message Payload is sought, if so, 516 are thened follow the steps, it is no to then follow the steps 528;
Step 514: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The purpose hardware ID of message is sought, if so, 515 are thened follow the steps, it is no to then follow the steps 528;
Step 515: the vehicle node for receiving secondary request message checks neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in the secondary request Message Payload, then the purpose of the secondary request message is hard
Part ID and purpose coordinate are set as empty, forward the secondary request message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in the secondary request Message Payload are nearest, by the purpose hardware of the secondary request message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the secondary request message, execute step
512;
Step 516: after vehicle node receives secondary request message, checking cluster head table, executed for each cluster head list item
Operations described below: the vehicle node checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the cluster
The hardware ID of first list item then sets empty for the purpose hardware ID of the secondary request message and purpose coordinate, and load is updated to this
The hardware ID and coordinate of neighbor entry;Otherwise, which selects a neighbor entry, the coordinate of the neighbor entry and the cluster
The coordinate distance of first list item is nearest, and the purpose hardware ID of the secondary request message and purpose coordinate are updated to the neighbor table respectively
The hardware ID and coordinate of item, load are updated to the hardware ID and coordinate of the cluster head list item;
Step 517: vehicle node receives secondary request message;If the purpose coordinate and purpose of the secondary request message
Hardware ID is sky, thens follow the steps 518, no to then follow the steps 519;
Step 518: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The hardware ID in Message Payload is sought, if so, 521 are thened follow the steps, it is no to then follow the steps 528;
Step 519: the vehicle node for receiving secondary request message judges whether oneself hardware ID is equal to this and secondary asks
The purpose hardware ID of message is sought, if so, 520 are thened follow the steps, it is no to then follow the steps 528;
Step 520: the vehicle node for receiving secondary request message checks neighbor table, if there is a neighbor entry,
The hardware ID of the neighbor entry is equal to the hardware ID in the secondary request Message Payload, then the purpose of the secondary request message is hard
Part ID and purpose coordinate are set as empty, forward the secondary request message;Otherwise, which selects a neighbor entry, should
The coordinate of neighbor entry and the coordinate distance in the secondary request Message Payload are nearest, by the purpose hardware of the secondary request message
ID and purpose coordinate are updated to the hardware ID and coordinate of the neighbor entry respectively, forward the secondary request message, execute step
517;
Step 521: vehicle node checks membership table after receiving secondary request message, if the membership table of the vehicle node
All member's list items resource ID set thresholding union be the secondary request message source ID set superset, then execute step
Rapid 522, it is no to then follow the steps 528;
Step 522: the vehicle node for receiving secondary request message selects more than one member's list item, these membership tables
The union of the resource ID set thresholding of item is the superset of secondary request message source ID set;The vehicle node checks neighbours
Table, if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the secondary request message, then sends
One response message, the value of message types of the response message are 9, and source hardware ID and source coordinate are respectively equal to the hard of the vehicle node
Part ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, and resource ID set is equal to the resource ID of the secondary request message
Set, loads the hardware ID and coordinate and selected all member's list items for the neighbor entry;Otherwise, which selects
A neighbor entry is selected, the coordinate of the neighbor entry and the source coordinate distance of the secondary request message are nearest, send a response
Message, the value of message types of the response message are 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and seat of the vehicle node
Mark, purpose hardware ID and purpose coordinate are set as the hardware ID and coordinate for the neighbor entry chosen, resource ID set be equal to this two
The resource ID set of secondary request message loads as the source hardware ID and source coordinate of the secondary request message and selected all
Member's list item;
Step 523: vehicle node receives response message, if the purpose coordinate and purpose hardware ID of the response message are
Sky, thens follow the steps 524, no to then follow the steps 525;
Step 524: the vehicle node for receiving response message judges whether the hardware ID of oneself is equal to the response message and bears
Hardware ID in load, if so, 527 are thened follow the steps, it is no to then follow the steps 528;
Step 525: the vehicle node for receiving response message judges whether the hardware ID of oneself is equal to the response message
Purpose hardware ID, if so, 526 are thened follow the steps, it is no to then follow the steps 528;
Step 526: the vehicle node for receiving response message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in response message load, then is sat the purpose hardware ID and purpose of the response message
Mark is set as empty, forwards the response message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry with
Coordinate distance in response message load is nearest, and the purpose hardware ID of the response message and purpose coordinate are updated to this respectively
The hardware ID and coordinate of neighbor entry forward the response message, execute step 523;
Step 527: vehicle node receives member's list item or the neighbour saved after response message in response message load
Occupy list item;
Step 528: terminating.
Vehicle node obtains required resource from cluster head by the above process, and the above process passes through the coordinate thresholding in neighbor table
The communication between cluster head and cluster member is realized, therefore reduces the cost and delay of resource distribution;Cluster head node passes through member
Table obtains the information of cluster gateway, if can not provide the required resource of vehicle node in this cluster, cluster head if passes through cluster gateway and connects
The more than two cluster heads connect obtain resource, so that the success rate of resource distribution be greatly improved;Cluster head node real-time servicing
The current geographical coordinate of each member further increases so as to realize the quick correct communication with each member by neighbor table
The high efficiency of resource distribution is added.
The utility model has the advantages that the Internet resources inquiry and distribution method that the present invention provides a kind of based on vehicle-mounted cloud, the vehicle
Node through the invention provided by communication means, can keep the continuity communicated in moving process, reduce bursts dropping ratio,
To improve service quality, present invention can apply to the fields such as road conditions monitoring, vehicle management, before having a wide range of applications
Scape.
Embodiment 1
Based on the simulation parameter of table 1, the present embodiment is simulated one of present invention and is looked into based on the Internet resources of vehicle-mounted cloud
Ask and distribution method, performance evaluation are as follows: when neighbor node quantity increases, the delay that cluster is added in vehicle node is reduced, and works as neighbour
When occupying number of nodes reduction, the delay that cluster is added in vehicle node increases, and data acquisition average retardation is 26.4ms.
1 simulation parameter of table
The thinking of the present invention provides a kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud, implements the skill
There are many method and approach of art scheme, the above is only a preferred embodiment of the present invention, it is noted that this technology is led
For the those of ordinary skill in domain, various improvements and modifications may be made without departing from the principle of the present invention, these
Improvements and modifications also should be regarded as protection scope of the present invention.The available prior art of each component part being not known in the present embodiment
It is realized.
Claims (5)
1. a kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud, which is characterized in that the network vehicle node, it is described
Network is divided into more than two clusters, and a cluster is made of more than two vehicle nodes, wherein these vehicle nodes are divided into
Cluster head and cluster member, a cluster include a cluster head and more than two cluster members;If cluster member belongs to more than two clusters,
Then cluster member is also known as cluster gateway;
One vehicle node is by a hardware ID unique identification;One vehicle node configures more than one resource, a kind of resource
By a resource ID unique identification;Vehicle node is communicated using message, and a message is by type of message unique identification, message
Type is as shown in the table:
Each vehicle node safeguards a neighbor table, and a neighbor entry includes hardware ID, coordinate, resource ID set, role domain
With life cycle domain;If role's thresholding is 1, then it represents that the corresponding vehicle node of the neighbor entry is cluster head;If role domain
Value is 2, then it represents that the corresponding vehicle node of the neighbor entry is cluster member;If role's thresholding is 3, then it represents that the neighbor entry
Corresponding vehicle node is cluster gateway;If role's thresholding is 4, then it represents that the corresponding vehicle node of the neighbor entry is neither cluster
Head, nor cluster member or cluster gateway;
One beacon message is made of type of message, hardware ID, coordinate, role and resource ID set;Vehicle node V1 is periodically held
Row operations described below:
Step 101: starting;
Step 102: vehicle node V1 periodically sends beacon message, and the value of message types of the beacon message is 1, and hardware ID is vehicle
The hardware ID of node V1, coordinate are the coordinate of vehicle node V1, and resource ID set is by the vehicle node V1 resource that can be shared
Resource ID is constituted;If vehicle node V1 is cluster head, role's thresholding is set as 1, if vehicle node V1 is cluster member, role
Thresholding is set as 2, if vehicle node is cluster gateway, role's thresholding is set as 3, and otherwise, role's thresholding is set as 4;
Step 103: after neighbours' vehicle node receives beacon message, neighbor table is checked, if there is a neighbor entry, the neighbour
The hardware ID for occupying list item is equal to the hardware ID of the beacon message, then by the coordinate of the neighbor entry, role and resource ID set
Coordinate, role and resource ID set thresholding, the life cycle for being updated to beacon message respectively are set as maximum value;Otherwise the neighbour
It occupies vehicle node and creates a neighbor entry, the hardware ID of the neighbor entry is equal to the hardware ID of the beacon message, the neighbor table
Coordinate, role and the resource ID set of item are updated to the coordinate of beacon message, role and resource ID set thresholding respectively, raw
The life period is set as maximum value;
Step 104: terminating.
2. a kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud according to claim 1, which is characterized in that inspection
Surveying message includes type of message, hardware ID, coordinate and timestamp;Detecting response message includes type of message, source hardware ID, source seat
Mark, purpose hardware ID, purpose coordinate and load;Be added message include type of message, source hardware ID, source coordinate, purpose hardware ID,
Purpose coordinate, role and load;Cluster head safeguards that a membership table, member's list item include hardware ID, coordinate, resource ID collection
Conjunction, role and life cycle;Cluster member safeguards that a cluster head table, a cluster head list item include hardware ID, coordinate and life cycle
Domain;If vehicle node V1 prepares that a cluster is added, operations described below is executed:
Step 201: starting;
Step 202: vehicle node V1 checks neighbor table, and if there is a neighbor entry, role's thresholding of the neighbor entry is
1, then follow the steps 203, it is no to then follow the steps 204;
Step 203: vehicle node V1 selects a neighbor entry, and role's thresholding of the neighbor entry is equal to 1;Vehicle node V1 wound
A cluster head list item is built, the hardware ID and coordinate thresholding of the cluster head list item are respectively equal to the hardware ID and coordinate domain of the neighbor entry
Value, life cycle are set as maximum value;Vehicle node V1 sends an addition message, and the value of message types of the addition message is 4,
Source hardware ID and source coordinate are respectively the hardware ID and coordinate of vehicle node V1, and purpose hardware ID and purpose coordinate are sky, load
For the hardware ID and coordinate of the neighbor entry, resource ID set is made of the resource ID of the vehicle node V1 resource that can be shared,
Role's thresholding is 2, executes step 215;
Step 204: vehicle node V1 sends a detection message, and the value of message types of the detection message is 2, hardware ID and coordinate
Thresholding is respectively equal to the hardware ID and coordinate thresholding of vehicle node V1, and timestamp is current time;Vehicle node V1 is arranged one
Clock T1;
Step 205: after vehicle node receives detection message, if the vehicle node is cluster head, thening follow the steps 208, otherwise
Execute step 206;
Step 206: the vehicle node for receiving detection message checks current time and detects the absolute of the difference of the timestamp of message
Whether value is greater than threshold value T1, if so, 209 are thened follow the steps, it is no to then follow the steps 207;
Step 207: the vehicle node for receiving detection message forwards the detection message, executes step 205;
Step 208: receive detection message vehicle node select a neighbor entry, the coordinate thresholding of the neighbor entry with should
Distance minimum between the coordinate of message is detected, sends a detection response message, the value of message types of the detection response message is
3, source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, and purpose hardware ID and purpose coordinate are respectively etc.
In the hardware ID and coordinate of the neighbor entry, the hardware ID and coordinate for the detection message are loaded;
Step 209: vehicle node receives detection response message, if the purpose coordinate and purpose hardware of the detection response message
ID is sky, thens follow the steps 210, no to then follow the steps 211;
Step 210: the vehicle node for receiving detection response message checks whether the hardware ID of oneself is equal to detection response and disappears
Hardware ID in breath load, if so, 213 are thened follow the steps, it is no to then follow the steps 220;
Step 211: the vehicle node for receiving detection response message checks whether the hardware ID of oneself is equal to detection response and disappears
The purpose hardware ID of breath, if so, 212 are thened follow the steps, it is no to then follow the steps 220;
Step 212: the vehicle node for receiving detection response message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in detection response message load, then by the purpose hardware ID of the detection response message
It is set as empty with purpose coordinate, forwards the detection response message;Otherwise, which selects a neighbor entry, the neighbours
Coordinate distance in the coordinate of list item and detection response message load is nearest, by the purpose hardware ID of the detection response message and
Purpose coordinate is updated to the hardware ID and coordinate of the neighbor entry respectively, forwards the detection response message, executes step 209;
Step 213: if vehicle node V1 is not received by detection response message in clock T1, thening follow the steps 220, otherwise
Execute step 214;
Step 214: after vehicle node V1 receives detection response message, selecting a neighbor entry, the coordinate of the neighbor entry
It is nearest with the source coordinate distance of the detection response message, an addition message is sent, the value of message types of the addition message is 4,
Source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of vehicle node V1, and purpose hardware ID and coordinate are respectively equal to the neighbour
The hardware ID and coordinate of list item are occupied, role's thresholding is 2, loads the source hardware ID and source coordinate for the detection response message, resource
ID set is equal to the set that the resource ID for the resource that vehicle node V1 is capable of providing is constituted;Vehicle node V1 creates a cluster head table
, the hardware ID and coordinate of the cluster head list item are respectively equal to the source hardware ID and source coordinate of the detection response message, life cycle
It is set as maximum value;
Step 215: vehicle node receives addition message, if the purpose coordinate and purpose hardware ID of the addition message are sky,
Then follow the steps 216, it is no to then follow the steps 217;
Step 216: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal in the addition Message Payload
Hardware ID, it is no to then follow the steps 220 if so, then follow the steps 219;
Step 217: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the purpose of the addition message
Hardware ID, if so, 218 are thened follow the steps, it is no to then follow the steps 220;
Step 218: the vehicle node for receiving addition message checks neighbor table, if there is a neighbor entry, the neighbor table
The hardware ID of item is equal to the hardware ID in the addition Message Payload, then sets the purpose hardware ID of the addition message and purpose coordinate
It is set to sky, forwards the addition message;Otherwise, which selects a neighbor entry, and the coordinate of the neighbor entry adds with this
The coordinate distance entered in Message Payload is nearest, and the purpose hardware ID of the addition message and purpose coordinate are updated to the neighbours respectively
The hardware ID and coordinate of list item forward the addition message, execute step 215;
Step 219: receiving vehicle node one member's list item of creation that message is added, the hardware ID and coordinate of member's list item
Respectively equal to the source hardware ID and source coordinate of the addition message, role's thresholding and resource ID set are respectively equal to the addition message
Role's thresholding and resource ID set, life cycle are set as maximum value;
Step 220: terminating.
3. a kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud according to claim 2, which is characterized in that such as
One cluster member of fruit detects that the number of the cluster head list item of oneself is greater than 1, then oneself is labeled as cluster gateway;Update message includes
Type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, role and load;Updating response message includes message
Type, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate and load;Cluster member M1 is periodically executed operations described below and updates cluster
First table and membership table:
Step 301: starting;
Step 302: cluster member M1 checks cluster head table, and for each cluster head list item, cluster member M1 executes operations described below: cluster member M1
Check neighbor table, if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the hardware ID of the cluster head list item, then sends out
A update message is sent, the value of message types of the update message is 5, and source hardware ID and coordinate are respectively equal to the hardware of cluster member M1
ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, load the hardware ID and coordinate for the neighbor entry, if cluster at
The number of the cluster head list item of member M1 is equal to 1, then role's thresholding is set as 2, and otherwise role's thresholding is set as 3;If there is no the neighbour
Occupying list item, then cluster member M1 selects a neighbor entry, and the coordinate of the neighbor entry and the coordinate distance of the cluster head list item are nearest,
A update message is sent, the value of message types of the update message is 5, and source hardware ID and coordinate are respectively equal to the hard of cluster member M1
Part ID and coordinate, purpose hardware ID and purpose coordinate are respectively equal to the hardware ID and coordinate of the neighbor entry, load as the cluster head
The hardware ID and coordinate of list item, if the number of the cluster head list item of cluster member M1 is equal to 1, role's thresholding is set as 2, otherwise role
Thresholding is set as 3;
Step 303: vehicle node receives update message;If the purpose coordinate and purpose hardware ID of the update message are sky,
Then follow the steps 304, it is no to then follow the steps 305;
Step 304: the vehicle node for receiving update message checks whether the hardware ID of oneself is equal in update message load
Hardware ID, it is no to then follow the steps 313 if so, then follow the steps 307;
Step 305: the vehicle node for receiving update message checks whether the hardware ID of oneself is equal to the purpose of the update message
Hardware ID, if so, 306 are thened follow the steps, it is no to then follow the steps 313;
Step 306: the vehicle node for receiving update message checks neighbor table, if there is a neighbor entry, the neighbor table
The hardware ID of item is equal to the hardware ID in update message load, then sets the purpose hardware ID of the update message and purpose coordinate
It is set to sky, forwards the update message;Otherwise, the vehicle node select a neighbor entry, the coordinate of the neighbor entry and this more
Coordinate distance in new information load is nearest, and the purpose hardware ID of the update message and purpose coordinate are updated to the neighbours respectively
The hardware ID and coordinate of list item forward the update message, execute step 303;
Step 307: it after vehicle node receives update message, checks membership table, selects member's list item, member's list item
Hardware ID is equal to the source hardware ID of the update message, and the coordinate of member's list item is updated to the source coordinate of the update message, angle
Color gamut value is updated to role's thresholding of the update message, sets maximum value for life cycle;The vehicle node checks neighbor table,
If there is a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the update message, then sends one more
New response message, the value of message types of the update response message are 6, and source hardware ID and coordinate are respectively equal to the hard of the vehicle node
Part ID and coordinate, purpose hardware ID and purpose coordinate are set as empty, load the hardware ID and coordinate for the neighbor entry;Otherwise,
The vehicle node selects a neighbor entry, and the coordinate of the neighbor entry and the source coordinate distance of the update message are nearest, sends
One update response message, the value of message types of the update response message are 6, and source hardware ID and coordinate are respectively equal to the vehicle section
The hardware ID and coordinate of point, purpose hardware ID and purpose coordinate are respectively equal to the hardware ID and coordinate of the neighbor entry, load and are
The source hardware ID and coordinate of the update message;
Step 308: vehicle node receives update response message, if the purpose coordinate and purpose hardware of the update response message
ID is sky, thens follow the steps 309, no to then follow the steps 310;
Step 309: the vehicle node for receiving update response message checks whether the hardware ID of oneself is equal to update response and disappears
Hardware ID in breath load, if so, 312 are thened follow the steps, it is no to then follow the steps 313;
Step 310: the vehicle node for receiving update response message checks whether the hardware ID of oneself is equal to update response and disappears
The purpose hardware ID of breath, if so, 311 are thened follow the steps, it is no to then follow the steps 313;
Step 311: the vehicle node for receiving update response message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in update response message load, then by the purpose hardware ID of the update response message
It is set as empty with purpose coordinate, forwards the update response message;Otherwise, which selects a neighbor entry, the neighbours
Coordinate distance in the coordinate of list item and update response message load is nearest, by the purpose hardware ID of the update response message and
Purpose coordinate is updated to the hardware ID and coordinate of the neighbor entry respectively, forwards the update response message, executes step 308;
Step 312: receiving the vehicle node one cluster head list item of selection for updating response message, the hardware ID etc. of the cluster head list item
In the source hardware ID of the update response message, the coordinate of the cluster head list item is updated to the source coordinate of the update response message, it will
Life cycle is set as maximum value;
Step 313: terminating.
4. a kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud according to claim 3, which is characterized in that structure
Building message includes type of message, hardware ID, coordinate and timestamp;If vehicle node V1 cluster after executing step 201~220
The number of first list item is 0, then executes following process creation clusters:
Step 401: starting;
Step 402: vehicle node V1 sends a building message, and the value of message types of the building message is 7, hardware ID and coordinate
Thresholding is respectively equal to the hardware ID and coordinate thresholding of vehicle node V1, and timestamp is current time;
Step 403: vehicle node receives building message, if the resource ID collection for the resource that the vehicle node is capable of providing is combined into
Sky, thens follow the steps 406, no to then follow the steps 404:
Step 404: the vehicle node for receiving building message checks neighbor table, if there is a neighbor entry, the neighbor table
The hardware ID of item is equal to the source hardware ID of the building message, then sends an addition message, the value of message types of the addition message
It is 4, source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, and purpose hardware ID and coordinate are respectively equal to
Sky, if the number of the cluster head list item of the vehicle node is 0, role's thresholding is set as 2, and otherwise role's thresholding is set as 3, loads and is
The source hardware ID and source coordinate of the building message, resource ID set are equal to the resource ID structure for the resource that the vehicle node is capable of providing
At set;Otherwise, which selects a neighbor entry, the source coordinate of the coordinate of the neighbor entry and the building message
Distance recently, sends an addition message, and the value of message types of the addition message is 4, and source hardware ID and source coordinate are respectively equal to
The hardware ID and coordinate of the vehicle node, purpose hardware ID and purpose coordinate are respectively equal to the hardware ID and seat of the neighbor entry
Mark, if the number of the cluster head list item of the vehicle node is 0, role's thresholding is set as 2, and otherwise role's thresholding is set as 3, loads and is
The source hardware ID and source coordinate of the building message, resource ID set are equal to the resource ID structure for the resource that the vehicle node is capable of providing
At set;
Step 405: the vehicle node for receiving building message creates a cluster head list item, the hardware ID and coordinate of the cluster head list item
Respectively equal to the source hardware ID of the building and source coordinate, life cycle are set as maximum value;
Step 406: the vehicle node for receiving building message checks the difference for judging the timestamp of current time and building message
Whether absolute value is greater than threshold value T1, if so, 408 are thened follow the steps, it is no to then follow the steps 407;
Step 407: the vehicle node for receiving building message forwards the building message, executes step 403;
Step 408: vehicle node receives addition message, if the purpose coordinate and purpose hardware ID of the addition message are sky,
Then follow the steps 409, it is no to then follow the steps 410;
Step 409: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal in the addition Message Payload
Hardware ID, it is no to then follow the steps 413 if so, then follow the steps 412;
Step 410: the vehicle node for receiving addition message checks whether the hardware ID of oneself is equal to the purpose of the addition message
Hardware ID, if so, 411 are thened follow the steps, it is no to then follow the steps 413;
Step 411: the vehicle node for receiving addition message checks neighbor table, if there is a neighbor entry, the neighbor table
The hardware ID of item is equal to the hardware ID in the addition Message Payload, then sets the purpose hardware ID of the addition message and purpose coordinate
It is set to sky, forwards the addition message;Otherwise, which selects a neighbor entry, and the coordinate of the neighbor entry adds with this
The coordinate distance entered in Message Payload is nearest, and the purpose hardware ID of the addition message and purpose coordinate are updated to the neighbours respectively
The hardware ID and coordinate of list item forward the addition message, execute step 408;
Step 412: receiving vehicle node one member's list item of creation that message is added, the hardware ID and coordinate of member's list item
Respectively equal to the source hardware ID and source coordinate of the addition message, role's thresholding and resource ID set are respectively equal to the addition message
Role's thresholding and resource ID set, life cycle are set as maximum value;
Step 413: terminating.
5. a kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud according to claim 3, which is characterized in that ask
Seeking message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, resource ID set and load;
Response message includes type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, resource ID set and bears
It carries;
Secondary request message include type of message, source hardware ID, source coordinate, purpose hardware ID, purpose coordinate, resource ID set and
Load;
Need to obtain some resources in cluster member M1, under conditions of the resource ID of these resources constitutes resource ID set S1, if
The union of the resource ID set thresholding of all neighbor entries of cluster member M1 is not the superset of set S1, then under cluster member M1 passes through
It states process and obtains the information for being capable of providing the vehicle node for the resource that set S1 is identified:
Step 501: starting;
Step 502: cluster member M1 checks cluster head table, selects a cluster head list item, the coordinate of the cluster head list item is with cluster member M1's
Coordinate distance is nearest;Cluster member M1 checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to should
The hardware ID of cluster head list item then sends a request message, and the value of message types of the request message is 8, and source hardware ID and source are sat
Mark is respectively equal to the hardware ID and coordinate of cluster member M1, and purpose hardware ID and purpose coordinate are set as empty, and resource ID collection is combined into collection
S1 is closed, the hardware ID and coordinate for the neighbor entry are loaded;Otherwise, cluster member M1 selects a neighbor entry, the neighbor entry
Coordinate and the cluster head list item coordinate distance it is nearest, send a request message, the value of message types of the request message is 8,
Source hardware ID and coordinate are respectively equal to the hardware ID and coordinate of cluster member M1, and purpose hardware ID and purpose coordinate are respectively equal to the neighbour
The hardware ID and coordinate of list item are occupied, resource ID collection is combined into set S1, loads hardware ID and coordinate for the cluster head list item;
Step 503: vehicle node receives request message, if the purpose coordinate and purpose hardware ID of the request message are sky,
Then follow the steps 504, it is no to then follow the steps 505;
Step 504: the vehicle node for receiving request message judges whether the hardware ID of oneself is equal in request message load
Hardware ID, it is no to then follow the steps 528 if so, then follow the steps 509;
Step 505: the vehicle node for receiving request message judges whether the hardware ID of oneself is equal to the purpose of the request message
Hardware ID, if so, 506 are thened follow the steps, it is no to then follow the steps 528;
Step 506: the vehicle node for receiving request message checks neighbor table, if all neighbours of the neighbor table of the vehicle node
The union for occupying the resource ID set thresholding of list item is the superset of the request message resource ID set, thens follow the steps 507, otherwise holds
Row step 508;
Step 507: the vehicle node for receiving request message selects more than one neighbor entry, the resource of these neighbor entries
The union of ID set thresholding is the superset of the request message resource ID set;The vehicle node checks neighbor table, if there is one
A neighbor entry, the hardware ID of the neighbor entry are equal to the source hardware ID of the request message, then send a response message, the sound
The value of message types for answering message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, and purpose is hard
Part ID and purpose coordinate are set as empty, and resource ID set is equal to the resource ID set of the request message, load as the neighbor entry
Hardware ID and coordinate and selected all neighbor entries, the union of the resource ID set thresholding of these neighbor entries is this
The superset of request message resource ID set;Otherwise, the vehicle node select a neighbor entry E1, the coordinate of the neighbor entry with
The source coordinate distance of the request message is nearest, sends a response message, and the value of message types of the response message is 9, source hardware
ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, and purpose hardware ID and purpose coordinate are set as the neighbour chosen
The hardware ID and coordinate of list item E1 are occupied, resource ID set is equal to the resource ID set of the request message, loads as the request message
Source hardware ID and source coordinate and selected all neighbor entries, the union of the resource ID set thresholding of these neighbor entries
It is the superset of the request message resource ID set;Execute step 523;
Step 508: the vehicle node for receiving request message checks neighbor table, if there is a neighbor entry, the neighbor table
The hardware ID of item is equal to the hardware ID in request message load, then sets the purpose hardware ID of the request message and purpose coordinate
It is set to sky, forwards the request message;Otherwise, which selects a neighbor entry, and the coordinate of the neighbor entry is asked with this
It asks the coordinate distance in Message Payload nearest, the purpose hardware ID of the request message and purpose coordinate is updated to the neighbours respectively
The hardware ID and coordinate of list item, the vehicle node forward the request message, execute step 503;
Step 509: vehicle node checks membership table after receiving request message;If the membership table of the vehicle node it is all at
The union of the resource ID set thresholding of member's list item is the superset of the request message resource ID set, thens follow the steps 510, otherwise holds
Row step 511;
Step 510: the vehicle node for receiving request message selects more than one member's list item, the resource of these member's list items
The union of ID set thresholding is the superset of the request message resource ID set;The vehicle node checks neighbor table, if there is one
A neighbor entry, the hardware ID of the neighbor entry are equal to the source hardware ID of the request message, then send a response message, the sound
The value of message types for answering message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, and purpose is hard
Part ID and purpose coordinate are set as empty, and resource ID set is equal to the resource ID set of the request message, load as the neighbor entry
Hardware ID and coordinate and selected all member's list items;Otherwise, which selects a neighbor entry, the neighbours
The coordinate of list item and the source coordinate distance of the request message are nearest, which sends a response message, the response message
Value of message types be 9, source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, purpose hardware ID and
Purpose coordinate is set as the hardware ID and coordinate for the neighbor entry chosen, and resource ID set is equal to the resource ID collection of the request message
It closes, loads the source hardware ID and source coordinate and selected all member's list items for the request message;Execute step 523;
Step 511: member's list item that the vehicle node of request message selects all role's values to be equal to 3 is received, from these members
Member's list item is selected in list item, the coordinate distance of the coordinate distance of the member's list item vehicle node is nearest;The vehicle section
Point checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the hardware ID of member's list item, then
A secondary query messages are sent, the value of message types of the secondary query messages is 10, and source hardware ID and source coordinate are respectively equal to
The source hardware ID and source coordinate of the request message, purpose hardware ID and purpose coordinate are set as empty, and resource ID set is asked equal to this
The resource ID set for seeking message loads the hardware ID and coordinate of member's list item for selection;Otherwise, which selects one
Neighbor entry, the coordinate of the neighbor entry and the coordinate distance of member's list item are nearest, send a secondary request message, this two
The value of message types of secondary request message is 10, source hardware ID and source coordinate be respectively equal to the request message received hardware ID and
Coordinate, purpose hardware ID and purpose coordinate are set as the hardware ID and coordinate for the neighbor entry chosen, and resource ID set is equal to should
The resource ID set of request message loads source hardware ID and source coordinate for member's list item;
Step 512: vehicle node receives secondary request message, if the purpose coordinate and purpose hardware of the secondary request message
ID is sky, thens follow the steps 513, no to then follow the steps 514;
Step 513: the vehicle node for receiving secondary request message judges whether the hardware ID of oneself is equal to the secondary request and disappears
Hardware ID in breath load, if so, 516 are thened follow the steps, it is no to then follow the steps 528;
Step 514: the vehicle node for receiving secondary request message judges whether the hardware ID of oneself is equal to the secondary request and disappears
The purpose hardware ID of breath, if so, 515 are thened follow the steps, it is no to then follow the steps 528;
Step 515: the vehicle node for receiving secondary request message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in the secondary request Message Payload, then by the purpose hardware ID of the secondary request message
It is set as empty with purpose coordinate, forwards the secondary request message;Otherwise, which selects a neighbor entry, the neighbours
The coordinate of list item and the coordinate distance in the secondary request Message Payload are nearest, by the purpose hardware ID of the secondary request message and
Purpose coordinate is updated to the hardware ID and coordinate of the neighbor entry respectively, forwards the secondary request message, executes step 512;
Step 516: after vehicle node receives secondary request message, checking cluster head table, executed for each cluster head list item following
Operation: the vehicle node checks neighbor table, and if there is a neighbor entry, the hardware ID of the neighbor entry is equal to the cluster head table
The hardware ID of item then sets empty for the purpose hardware ID of the secondary request message and purpose coordinate, and load is updated to the neighbours
The hardware ID and coordinate of list item;Otherwise, which selects a neighbor entry, the coordinate of the neighbor entry and the cluster head table
The coordinate distance of item is nearest, and the purpose hardware ID of the secondary request message and purpose coordinate are updated to the neighbor entry respectively
Hardware ID and coordinate, load are updated to the hardware ID and coordinate of the cluster head list item;
Step 517: vehicle node receives secondary request message;If the purpose coordinate and purpose hardware of the secondary request message
ID is sky, thens follow the steps 518, no to then follow the steps 519;
Step 518: the vehicle node for receiving secondary request message judges whether the hardware ID of oneself is equal to the secondary request and disappears
Hardware ID in breath load, if so, 521 are thened follow the steps, it is no to then follow the steps 528;
Step 519: the vehicle node for receiving secondary request message judges whether the hardware ID of oneself is equal to the secondary request and disappears
The purpose hardware ID of breath, if so, 520 are thened follow the steps, it is no to then follow the steps 528;
Step 520: the vehicle node for receiving secondary request message checks neighbor table, if there is a neighbor entry, the neighbour
The hardware ID of list item is occupied equal to the hardware ID in the secondary request Message Payload, then by the purpose hardware ID of the secondary request message
It is set as empty with purpose coordinate, forwards the secondary request message;Otherwise, which selects a neighbor entry, the neighbours
The coordinate of list item and the coordinate distance in the secondary request Message Payload are nearest, by the purpose hardware ID of the secondary request message and
Purpose coordinate is updated to the hardware ID and coordinate of the neighbor entry respectively, forwards the secondary request message, executes step 517;
Step 521: vehicle node checks membership table after receiving secondary request message, if the institute of the membership table of the vehicle node
The union of the resource ID set thresholding of member's list item is the superset of secondary request message source ID set, is thened follow the steps
522, it is no to then follow the steps 528;
Step 522: the vehicle node for receiving secondary request message selects more than one member's list item, these member's list items
The union of resource ID set thresholding is the superset of secondary request message source ID set;The vehicle node checks neighbor table, such as
For fruit there are a neighbor entry, the hardware ID of the neighbor entry is equal to the source hardware ID of the secondary request message, then sends one
Response message, the value of message types of the response message are 9, and source hardware ID and source coordinate are respectively equal to the hardware ID of the vehicle node
And coordinate, purpose hardware ID and purpose coordinate are set as empty, resource ID set is equal to the resource ID set of the secondary request message,
Load is the hardware ID and coordinate of the neighbor entry and selected all member's list items;Otherwise, vehicle node selection one
A neighbor entry, the coordinate of the neighbor entry and the source coordinate distance of the secondary request message are nearest, send a response message,
The value of message types of the response message is 9, and source hardware ID and source coordinate are respectively equal to the hardware ID and coordinate of the vehicle node, mesh
Hardware ID and purpose coordinate be set as the hardware ID and coordinate of the neighbor entry chosen, resource ID set is equal to the secondary request
The resource ID set of message loads source hardware ID and source coordinate and selected all membership tables for the secondary request message
?;
Step 523: vehicle node receives response message, if the purpose coordinate and purpose hardware ID of the response message are sky,
Then follow the steps 524, it is no to then follow the steps 525;
Step 524: the vehicle node for receiving response message judges whether the hardware ID of oneself is equal in response message load
Hardware ID, it is no to then follow the steps 528 if so, then follow the steps 527;
Step 525: the vehicle node for receiving response message judges whether the hardware ID of oneself is equal to the purpose of the response message
Hardware ID, if so, 526 are thened follow the steps, it is no to then follow the steps 528;
Step 526: the vehicle node for receiving response message checks neighbor table, if there is a neighbor entry, the neighbor table
The hardware ID of item is equal to the hardware ID in response message load, then sets the purpose hardware ID of the response message and purpose coordinate
It is set to sky, forwards the response message;Otherwise, which selects a neighbor entry, the coordinate of the neighbor entry and the sound
It answers the coordinate distance in Message Payload nearest, the purpose hardware ID of the response message and purpose coordinate is updated to the neighbours respectively
The hardware ID and coordinate of list item forward the response message, execute step 523;
Step 527: vehicle node receives the member's list item or neighbor table saved after response message in response message load
?;
Step 528: terminating.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811240588.2A CN109327820B (en) | 2018-10-24 | 2018-10-24 | Network resource query and allocation method based on vehicle-mounted cloud |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811240588.2A CN109327820B (en) | 2018-10-24 | 2018-10-24 | Network resource query and allocation method based on vehicle-mounted cloud |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109327820A true CN109327820A (en) | 2019-02-12 |
CN109327820B CN109327820B (en) | 2021-06-22 |
Family
ID=65262763
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811240588.2A Active CN109327820B (en) | 2018-10-24 | 2018-10-24 | Network resource query and allocation method based on vehicle-mounted cloud |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109327820B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110401911A (en) * | 2019-07-12 | 2019-11-01 | 常熟理工学院 | A kind of vehicle-mounted cloud implementation method based on name data network |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030013443A1 (en) * | 1999-03-16 | 2003-01-16 | Telefonaktiebolaget Lm Ericsson | Handover in a shared radio access network environment using subscriber-dependent neighbor cell lists |
US20150193799A1 (en) * | 2011-07-01 | 2015-07-09 | Amadeus S.A.S. | Interactive user interface for receiving and displaying market information |
CN105307232A (en) * | 2015-11-13 | 2016-02-03 | 南京邮电大学 | Routing optimization method for vehicular self-organized network based on connection probabilities |
CN106993321A (en) * | 2017-03-29 | 2017-07-28 | 常熟理工学院 | A kind of network data communication method based on cluster |
US20180109929A1 (en) * | 2016-10-13 | 2018-04-19 | Convida Wireless, Llc | Enabling Multicast For Service Layer Group Operation |
CN108601095A (en) * | 2018-05-08 | 2018-09-28 | 常熟理工学院 | A kind of implementation method of multimedia sensing network |
CN109194504A (en) * | 2018-08-10 | 2019-01-11 | 北京大学深圳研究生院 | Timing link prediction technique and computer readable storage medium towards dynamic network |
-
2018
- 2018-10-24 CN CN201811240588.2A patent/CN109327820B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030013443A1 (en) * | 1999-03-16 | 2003-01-16 | Telefonaktiebolaget Lm Ericsson | Handover in a shared radio access network environment using subscriber-dependent neighbor cell lists |
US20150193799A1 (en) * | 2011-07-01 | 2015-07-09 | Amadeus S.A.S. | Interactive user interface for receiving and displaying market information |
CN105307232A (en) * | 2015-11-13 | 2016-02-03 | 南京邮电大学 | Routing optimization method for vehicular self-organized network based on connection probabilities |
US20180109929A1 (en) * | 2016-10-13 | 2018-04-19 | Convida Wireless, Llc | Enabling Multicast For Service Layer Group Operation |
CN106993321A (en) * | 2017-03-29 | 2017-07-28 | 常熟理工学院 | A kind of network data communication method based on cluster |
CN108601095A (en) * | 2018-05-08 | 2018-09-28 | 常熟理工学院 | A kind of implementation method of multimedia sensing network |
CN109194504A (en) * | 2018-08-10 | 2019-01-11 | 北京大学深圳研究生院 | Timing link prediction technique and computer readable storage medium towards dynamic network |
Non-Patent Citations (1)
Title |
---|
闫海英等: "基于物联网的报警系统设计", 《实验室研究与探索》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110401911A (en) * | 2019-07-12 | 2019-11-01 | 常熟理工学院 | A kind of vehicle-mounted cloud implementation method based on name data network |
CN110401911B (en) * | 2019-07-12 | 2020-09-22 | 常熟理工学院 | Vehicle-mounted cloud implementation method based on named data network |
Also Published As
Publication number | Publication date |
---|---|
CN109327820B (en) | 2021-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101808382B (en) | Data communication method of wireless sensor network | |
CN106973105B (en) | A kind of vehicle-mounted cloud data communications method based on location information | |
CN107071010B (en) | A kind of network data communication method based on vehicle-mounted cloud | |
CN105119828B (en) | A kind of quickly wireless network route implementation method | |
CN102572015B (en) | Implementation method for dynamic IPv6 address configuration of mobile ad hoc network | |
CN109257789A (en) | A kind of vehicle-mounted network data communication means based on multi-hop cluster | |
CN105898679B (en) | It is a kind of based on the heterogeneous sensor method of data capture for representing node more and being merged with multilayer | |
CN109246785A (en) | A kind of implementation method of future mobile network | |
CN106453640B (en) | A kind of communication means of intelligence car networking | |
CN109150723A (en) | A kind of routing Realization Method of Communication of Internet of Things | |
CN109005567A (en) | A kind of mobile network's implementation method based on cluster | |
CN106507429B (en) | A kind of data communications method of car networking | |
CN107317890B (en) | A kind of data transmission realizing method of intelligent vehicle support grid | |
Mehra et al. | Energy efficient self organising load balanced clustering scheme for heterogeneous WSN | |
CN109327820A (en) | A kind of Internet resources inquiry and distribution method based on vehicle-mounted cloud | |
CN109089241A (en) | A kind of data communication implementation method of vehicle-mounted net | |
CN109768893A (en) | A kind of efficient big data network data communication implementation method | |
Xu et al. | Analyzing two connectivities in UAV-ground mobile ad hoc networks | |
CN110233889A (en) | A kind of network data communication implementation method based on caching mechanism | |
CN103347100B (en) | A kind of 6LoWPAN wireless transducer network address configuration method | |
CN108696838A (en) | A kind of vehicle-mounted data method for routing based on location information | |
Yue et al. | A novel cluster-based data fusion algorithm for wireless sensor networks | |
Jerbi et al. | A routing protocol orphan-leach to join orphan nodes in wireless sensor network | |
CN102905340B (en) | A kind of addressing method and device being applied to aeronautical communications network | |
CN108965029A (en) | A kind of reliable and stable software defined network implementation method |
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 |