CN115715030A - Ad hoc network message broadcasting method and system - Google Patents

Ad hoc network message broadcasting method and system Download PDF

Info

Publication number
CN115715030A
CN115715030A CN202211385703.1A CN202211385703A CN115715030A CN 115715030 A CN115715030 A CN 115715030A CN 202211385703 A CN202211385703 A CN 202211385703A CN 115715030 A CN115715030 A CN 115715030A
Authority
CN
China
Prior art keywords
equipment
current
keep
devices
geoip
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.)
Pending
Application number
CN202211385703.1A
Other languages
Chinese (zh)
Inventor
王晨程
陈帅斌
蒋泽飞
夏虹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Denghong Technology Co ltd
Original Assignee
Hangzhou Denghong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Denghong Technology Co ltd filed Critical Hangzhou Denghong Technology Co ltd
Priority to CN202211385703.1A priority Critical patent/CN115715030A/en
Publication of CN115715030A publication Critical patent/CN115715030A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a system for broadcasting an ad hoc network message, wherein the method comprises the following steps: positioning equipment in each domain network to acquire position information of the equipment; calculating 3 devices corresponding to the nearest neighbors of the current device by using a GEOIP path planning algorithm; establishing udp connection between the current device and the nearest devices, so that the current device can acquire keep-alive information of the nearest devices; and creating broadcast messages on a message broadcast platform, selecting one device to broadcast messages, and establishing communication connection with a plurality of devices nearest to the device according to the GEOIP path planning algorithm to push the broadcast messages. According to the method and the system, the adjacent equipment can be calculated based on GEOIP, UDP heartbeat connection is established between the adjacent equipment and the equipment, a cellular communication structure of the heartbeat is constructed, and the cellular communication structure of the heartbeat is utilized to carry out message broadcasting, so that a massive pushing server does not need to be constructed, and the cost of message broadcasting is reduced.

Description

Ad hoc network message broadcasting method and system
Technical Field
The present invention relates to the field of message broadcasting technologies, and in particular, to a method and a system for broadcasting an ad hoc network message.
Background
In the prior art, mass broadcast messages sent by a traditional platform are sent to each device 1 to 1 based on a large concurrent message cluster mode such as MQTT, and a large number of push servers need to be configured for sending messages 1 to 1, so that the networking broadcast cost is high. And the existing message broadcasting technology depends on high-concurrency TCP service implementation, so that the technical threshold is higher.
Disclosure of Invention
One purpose of the present invention is to provide a method and a system for broadcasting an ad hoc network message, where the method and the system can calculate neighboring devices based on the GEOIP while maintaining communication connection between the devices and an internet of things platform, establish UDP heartbeat connection with the neighboring devices, construct a cellular communication structure of heartbeat, and broadcast a message using the cellular communication structure of heartbeat, so that a large number of push servers do not need to be constructed, and the cost of message broadcasting is reduced.
Another object of the present invention is to provide a method and system for broadcasting ad hoc network messages, where the method and system are set by a program, and a broadcast platform only needs to send a broadcast at any device in a domain network, and at this time, the broadcast of a neighboring device can be realized in a constructed cellular communication structure and promoted to the domain network, so that a large number of push servers are not required, and an automatic and low-cost ad hoc network message broadcasting mechanism is realized.
Another object of the present invention is to provide a method and system for broadcasting ad hoc network messages, which can implement global message broadcasting at the expense of consuming one message on a platform, so that a complex high-concurrency communication mechanism is not required to be configured, and the overall communication cost is reduced.
To achieve at least one of the above-mentioned objects, the present invention further provides an ad hoc network message broadcasting method, the method comprising:
positioning equipment in each domain network to acquire position information of the equipment;
calculating 3 devices corresponding to the nearest neighbors of the current device by using a GEOIP path planning algorithm;
establishing udp connection between the current device and the nearest neighbor devices, so that the current device acquires the keep-alive information of the nearest neighbor devices;
and creating broadcast messages on a message broadcast platform, selecting one device to broadcast messages, and establishing communication connection with a plurality of devices nearest to the device according to the GEOIP path planning algorithm to push the broadcast messages.
According to one of the preferred embodiments of the present invention, the method comprises: according to IP address information accessed by the equipment, the address information of the current equipment is preliminarily judged, secondary positioning is further carried out according to the Wlan information of the current equipment in a link, more accurate address information of the current equipment is obtained, searching middleware is further adopted to search the address information of the current secondary positioning, a plurality of adjacent equipment with the address closest to the current access equipment are obtained, and keep-alive communication is respectively established between the current equipment and the adjacent equipment.
According to another preferred embodiment of the present invention, the plurality of neighboring devices respectively use the IP address information accessed by themselves and the Wlan information in the link to expand outward to establish a plurality of secondary neighboring devices, and each secondary neighboring device further expands to construct a neighboring device network with a tree structure.
According to another preferred embodiment of the invention, if the current device does not have any adjacent device with keep-alive communication, the current device is registered as an island mode, and the broadcast message is sent to the device in the island mode separately.
According to another preferred embodiment of the present invention, after the closest neighboring device obtained by the GEOIP path planning algorithm is judged, keep-alive communication is established with the closest neighboring device of the current device, and if the current device cannot establish keep-alive communication with the closest neighboring device, keep-alive communication between the current device and the next second neighboring device is performed.
According to another preferred embodiment of the present invention, a threshold value of the number of networking devices is configured, if the number of neighboring devices establishing keep-alive communication with the current device is equal to the threshold value of the number of networking devices, the current device is registered as a routing mode, and a communication connection for transmitting a broadcast message is established with the neighboring devices in the routing mode.
According to another preferred embodiment of the invention, the method further comprises an allocation algorithm: and when newly accessed equipment exists, acquiring first equipment of which the number of adjacent equipment for establishing keep-alive communication in the network is smaller than the threshold value of the number of networking equipment, preferentially matching the first equipment according to the GEOIP path planning algorithm, and registering the first equipment as an island mode if the current first equipment cannot establish the keep-alive communication.
According to another preferred embodiment of the present invention, the routing mode registration method includes: when new accessed equipment exists, judging whether the GEOIP path planning algorithm of the current new accessed equipment is equal to that whether the adjacent equipment for establishing the keep-alive communication meets the number threshold of the networking equipment, if so, registering the current new accessed equipment as a routing mode, and canceling the routing mode of the equipment for existing the keep-alive communication with the new accessed equipment.
To achieve at least one of the above objects, the present invention further provides an ad hoc network message broadcasting system, which performs the above ad hoc network message broadcasting method.
The present invention further provides a computer readable storage medium having stored thereon a computer program executable by a processor to perform one of the ad hoc network message broadcasting methods described above.
Drawings
Fig. 1 is a flowchart illustrating an ad hoc network message broadcasting method according to the present invention.
Fig. 2 shows an ad hoc network message broadcasting system of the present invention.
Detailed Description
The following description is provided to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The underlying principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
It is understood that the terms "a" and "an" should be interpreted as meaning "at least one" or "one or more," i.e., that a quantity of one element may be one in one embodiment, while a quantity of another element may be plural in other embodiments, and the terms "a" and "an" should not be interpreted as limiting the quantity.
Referring to fig. 1-2, the present invention discloses an ad hoc network message broadcasting method and system, wherein the method comprises: the access information comprises basic information such as the model, power and performance of the equipment, geographical position information corresponding to the equipment access Internet of things platform and wlan signal information corresponding to the Internet of things access point. The method comprises the steps that a GEOIP path planning algorithm is configured on a broadcast message control platform, after the broadcast message control platform controls and acquires an ip address of access equipment, the ip address can be analyzed to judge the geographical position information of the current equipment, the nearest equipment of the current equipment is further calculated, keep-alive communication is established between the current equipment and the corresponding adjacent equipment, a tree-shaped network structure is established through the current equipment and the adjacent equipment, an island mode is registered for equipment which does not meet specific conditions, a routing mode is registered for equipment which meets the conditions, broadcast messages are respectively pushed to the equipment in the island mode and the routing mode, and the routing mode can push the broadcast messages of the broadcast messages to other adjacent equipment until the broadcast messages cover all the equipment.
Specifically, the method comprises the following steps: and calculating nearest neighbor equipment through the GEOIP path planning algorithm, and establishing keep-alive communication with the nearest neighbor equipment. After the ip address of the access device is obtained, first preliminary positioning is performed, and an approximate range of the current access device can be determined according to the ip address, for example, an approximate region such as province, city, county and the like where the current access device is located can be determined through the ip address of the access device. Further acquiring wlan information existing when the current access device plays in the link of the internet of things, and acquiring address information contained in the wlan information to perform secondary accurate positioning, wherein at this moment, more accurate address information of the current access device can be acquired. After the address positioning of the access equipment is finished, the accurately positioned address is stored in an address database, and because each access equipment needs to carry out the positioning twice, the address is stored. The invention further adopts a search middleware ELK/Redis to inquire the address, wherein the ELK is a data search and processing middleware constructed by an elastic search frame, a Logstash frame and a Kibana frame, and calculates the nearest neighbor equipment to the current access equipment according to the GEOIP path planning algorithm, the GEOIP path planning algorithm can calculate the longitude and latitude information, the country and the city information of the current access equipment, calculate the space distance of the longitude and latitude of the current equipment and the longitude and latitude of other equipment, and find the nearest neighbor equipment to the current access equipment under the evaluation of the longitude and latitude. Keep-alive communications are further established with the proximate device.
In the invention, a networking equipment number threshold is configured through a platform, wherein when the current equipment is accessed to a network link corresponding to an Internet of things platform, the total number of the accessible current equipment needs to be calculated, and if the total number of the equipment is greater than the networking equipment number threshold, the equipment with the closest equipment number to the current access equipment as the networking equipment number threshold is further selected as the networking equipment according to the GEOIP path planning algorithm. For example, when the threshold of the number of networking devices set by the present invention is 3, 3 neighboring devices closest to the current access device are selected as the networking devices. The broadcast message control platform sends information of 3 adjacent devices to the current access device, enables the current access device and the corresponding adjacent devices to establish keep-alive communication through heartbeat packets through instructions, and indicates that the keep-alive communication between the current access device and the corresponding 3 adjacent devices is established if handshake is established between the current access device and the corresponding adjacent devices. If the handshake establishment between the current access equipment and the corresponding adjacent equipment fails, it indicates that the keep-alive communication cannot be established between the current access equipment and the adjacent equipment. The invention further calculates the nearest neighbor equipment according to the GEOIP path planning algorithm except the 3 nearest neighbor equipment which are calculated before through the broadcast message control platform, sends the neighbor equipment information obtained through recalculation to the current access equipment, and establishes keep-alive communication between the current access equipment and the neighbor equipment obtained through recalculation through an instruction. If the number condition of the keep-alive communication adjacent equipment existing in the current access equipment meets the networking equipment threshold, the current access equipment is further registered as a routing mode, and the routing mode of the current access equipment can forward the broadcast message stored by the current access equipment to other keep-alive communication adjacent equipment.
It is worth mentioning that after the current access device establishes the keep-alive communication, each neighboring device in keep-alive communication with the current access device further calculates 3 secondary neighboring devices closest to the neighboring device according to the above-mentioned GEOIP path planning algorithm, the 3 secondary neighboring devices respectively establish the keep-alive communication with the corresponding neighboring device, if there is a secondary neighboring device that cannot establish the keep-alive communication, another secondary neighboring device closest to the neighboring device is calculated according to the GEOIP path planning algorithm again, and it is known that the number of the secondary neighboring devices of the neighboring device meets the requirement of the networking device number threshold. By the method, the equipment in each link can establish the networking network with the tree structure of the geographical position relation according to the number requirement of the networking equipment. Because the current GEOIP path planning algorithm has a search range, for example, the search radius of the city range is not greater than 4km, the current access device may have a device which cannot be matched with the corresponding neighboring device according to the GEOIP path planning algorithm, for example, only one currently accessed device exists in the current city under the condition of the city search range, and the device cannot be calculated and matched with the neighboring device. At this time, the current access device can be registered as an island mode through the broadcast message control platform, communication connection cannot be established with other devices in the island mode, and the broadcast message control platform needs to independently push the broadcast message to the devices in the island mode.
Further, in a preferred embodiment of the present invention, a deduplication operation is performed on the keep-alive communication, where the deduplication operation includes determining whether the currently accessed neighboring device has keep-alive communication with other devices, and if so, the currently accessed device does not establish keep-alive communication with the corresponding neighboring device any more.
It should be noted that, in a preferred embodiment of the present invention, the present invention sets the threshold of the number of networking devices to perform preferential networking for the newly accessed device. For example, after acquiring a more accurate address of the new access device, calculating the devices which do not satisfy the threshold of the number of networking devices within the current search range according to the GEOIP path planning algorithm, and further calculating the nearest neighboring devices which are closest to the devices whose new access device does not satisfy the threshold of the number of networking devices according to the GEOIP path planning algorithm until all the matched neighboring devices satisfy the threshold of the number of networking devices. The program setting can enable the whole Internet of things link to automatically and gradually build the completed networking network with the tree structure, so that the whole Internet of things can realize the self-repairing effect of the network structure, and subsequent message broadcasting and pushing can be smoother.
The method comprises the steps that keep-alive communication is established between current access equipment and adjacent equipment, broadcast messages issued by a broadcast control platform are obtained in a routing mode, TCP communication is automatically established between the current access equipment and 3 adjacent equipment in the routing mode, and push information is automatically sent to the 3 adjacent equipment through the TCP communication. And any adjacent equipment keep-alive communication access equipment meeting the number threshold of the networking equipment can be converted into a routing mode, so that the networking coverage of the broadcast message is realized. And if the current access equipment is in an island mode, independently pushing the broadcast message to the current access equipment in the island mode.
In another preferred embodiment of the present invention, the selection of the routing device may further be redistributed according to the new access device, for example, when there is a new access device, it is determined whether the GEOIP path planning algorithm of the current new access device is equal to that of the neighboring device establishing the keep-alive communication and meets the threshold of the number of networking devices, if yes, the current new access device is registered as the routing mode, and the routing mode of the device having the keep-alive communication with the new access device is cancelled. The device in each network link stores the broadcast message thereof, the current access device needs to acquire whether the same broadcast message exists in the adjacent device, and if so, the broadcast message is not issued any more, thereby realizing the duplicate removal operation of the broadcast message.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. The computer program, when executed by a Central Processing Unit (CPU), performs the above-described functions defined in the method of the present application. It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wire segments, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless section, wire section, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be understood by those skilled in the art that the embodiments of the present invention described above and illustrated in the drawings are given by way of example only and not by way of limitation, the objects of the invention having been fully and effectively achieved, the functional and structural principles of the present invention having been shown and described in the embodiments, and that various changes or modifications may be made in the embodiments of the present invention without departing from such principles.

Claims (10)

1. An ad hoc network message broadcasting method, the method comprising:
positioning equipment in each domain network to acquire position information of the equipment;
calculating 3 nearest neighbor devices corresponding to the current device by using a GEOIP path planning algorithm;
establishing udp connection between the current device and the nearest devices, so that the current device can acquire keep-alive information of the nearest devices;
and establishing broadcast messages on a message broadcast platform, selecting one device to broadcast messages, and establishing communication connection with a plurality of devices which are the nearest according to the GEOIP path planning algorithm to push the broadcast messages.
2. The ad hoc network message broadcasting method according to claim 1, wherein the method comprises: according to IP address information accessed by the equipment, the address information of the current equipment is preliminarily judged, further secondary positioning is carried out according to the Wlan information of the current equipment in a link, more accurate address information of the current equipment is obtained, further searching is carried out on the address information of the current secondary positioning by adopting a searching middleware, a plurality of adjacent equipment with addresses closest to the current access equipment are obtained, and keep-alive communication is respectively established between the current equipment and the plurality of adjacent equipment.
3. The method according to claim 2, wherein the neighboring devices respectively use their own accessed IP address information and their own Wlan information in the link to expand outward to build a plurality of secondary neighboring devices, and each secondary neighboring device further expands to build a tree-structured network of neighboring devices.
4. The ad hoc network message broadcasting method according to claim 1, wherein if there is no neighboring device with keep-alive communication in the current device, the current device is registered as an islanding mode, and the broadcast message is sent to the device in islanding mode alone.
5. The method according to claim 1, wherein after the nearest neighbor device is judged according to the GEOIP path planning algorithm, keep-alive communication is established with the nearest neighbor device of the current device, and if the current device cannot establish keep-alive communication with the nearest neighbor device, keep-alive communication between the current device and the next second neighbor device is executed.
6. The ad hoc network message broadcasting method according to claim 1, wherein a networking device number threshold is configured, and if the number of neighboring devices establishing keep-alive communication with the current device is equal to the networking device number threshold, the current device is registered as a routing mode, and a communication connection for transmitting a broadcast message is established with the neighboring devices in the routing mode.
7. The method of claim 1, further comprising an allocation algorithm: when new accessed equipment exists, acquiring first equipment of which the number of adjacent equipment for establishing keep-alive communication in the network is smaller than the threshold value of the number of networking equipment, preferentially matching the first equipment according to the GEOIP path planning algorithm, and registering the first equipment as an island mode if the current first equipment cannot establish the keep-alive communication.
8. The ad hoc network message broadcasting method according to claim 6, wherein the routing mode registration method comprises: when new accessed equipment exists, judging whether the GEOIP path planning algorithm of the current newly accessed equipment meets the condition that the adjacent equipment for establishing the keep-alive communication is equal to the threshold value of the number of networking equipment, if so, registering the current newly accessed equipment as a routing mode, and canceling the routing mode of the equipment which has the keep-alive communication with the new accessed equipment.
9. An ad-hoc network message broadcasting system, characterized in that said system performs an ad-hoc network message broadcasting method according to any of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which can be executed by a processor to perform an ad hoc network message broadcasting method according to any one of claims 1 to 8.
CN202211385703.1A 2022-11-07 2022-11-07 Ad hoc network message broadcasting method and system Pending CN115715030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211385703.1A CN115715030A (en) 2022-11-07 2022-11-07 Ad hoc network message broadcasting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211385703.1A CN115715030A (en) 2022-11-07 2022-11-07 Ad hoc network message broadcasting method and system

Publications (1)

Publication Number Publication Date
CN115715030A true CN115715030A (en) 2023-02-24

Family

ID=85232372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211385703.1A Pending CN115715030A (en) 2022-11-07 2022-11-07 Ad hoc network message broadcasting method and system

Country Status (1)

Country Link
CN (1) CN115715030A (en)

Similar Documents

Publication Publication Date Title
Feng et al. AVE: Autonomous vehicular edge computing framework with ACO-based scheduling
WO2017185664A1 (en) Method for positioning terminal, and network device
US10667207B2 (en) Access point assisted roaming
US9369931B2 (en) Method and radio access node for incorporating a moving cell in a wireless communication network
JP4709281B2 (en) Search method of nearest user terminal in communication network and service node applying the method
US8774836B2 (en) Method and system for optimized transfer of location database information
US20150241229A1 (en) Mobile station position estimation using transmitter almanac information
CN110809317B (en) Multi-source dynamic grid network RTK positioning method, system, terminal and storage medium
CN104349275A (en) Positioning database management applied to server-based positioning system
JP2014531587A (en) Positioning based on georeference of mobile devices
CN104144425B (en) Network management apparatus, method and apparatus in wireless communication system
US20220124570A1 (en) Migration of Computing Information Between Edge Computing Devices
WO2017088473A1 (en) Client positioning method and apparatus
CN115804036A (en) Reliable delivery of digital services
US11533084B2 (en) Automatic adjustment of transmission power for 5G/6G messaging
US20150094054A1 (en) Dropped call warning and prevention methods
CN114390060A (en) Method for distributing edge computing network and storage medium
CN108494867B (en) Method, device and system for service gray processing and routing server
WO2020024445A1 (en) Data storage method and apparatus, computer device, and computer storage medium
CN114301990A (en) Node scheduling method, device and storage medium based on content distribution network
CN106817381A (en) Data processing method and device
US9980088B2 (en) Distributed geospatial communications system
EP3022575B1 (en) Method and apparatus for efficiently reducing number of access points in a radio map using grids
CN111641924B (en) Position data generation method and device and electronic equipment
CN115715030A (en) Ad hoc network message broadcasting method and system

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