CN112788070B - Collision detection early warning system and method thereof - Google Patents

Collision detection early warning system and method thereof Download PDF

Info

Publication number
CN112788070B
CN112788070B CN201911060013.7A CN201911060013A CN112788070B CN 112788070 B CN112788070 B CN 112788070B CN 201911060013 A CN201911060013 A CN 201911060013A CN 112788070 B CN112788070 B CN 112788070B
Authority
CN
China
Prior art keywords
detection
server
management server
block
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911060013.7A
Other languages
Chinese (zh)
Other versions
CN112788070A (en
Inventor
周万里
陈栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qianxun Spatial Intelligence Inc
Original Assignee
Qianxun Spatial Intelligence Inc
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 Qianxun Spatial Intelligence Inc filed Critical Qianxun Spatial Intelligence Inc
Priority to CN201911060013.7A priority Critical patent/CN112788070B/en
Publication of CN112788070A publication Critical patent/CN112788070A/en
Application granted granted Critical
Publication of CN112788070B publication Critical patent/CN112788070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1031Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/16Anti-collision systems

Abstract

The application relates to the technical field of collision detection and early warning of objects, and discloses a collision detection and early warning system and a method thereof, which can support cloud collision detection and early warning of mass objects. The system comprises a management server and a plurality of detection servers; a predetermined geographic area is pre-divided into a plurality of blocks; the management server stores the corresponding relation between each block and a plurality of detection servers; the management server is used for receiving the collision detection request, determining a first block where the object is located and adjacent blocks thereof according to the position information of the object in the request, determining a detection server set corresponding to the first block and the adjacent blocks thereof according to the corresponding relation, and sending the request to each detection server in the detection server set; the detection server is used for updating the cache of the first block according to the information of the object in the request after receiving the request, and completing the collision detection of the object with other objects in the cache of the first block and objects in the cache of the adjacent block.

Description

Collision detection early warning system and method thereof
Technical Field
The application relates to the technical field of collision detection and early warning of objects.
Background
The collision detection early warning system is used for detecting whether collision is possible between the current position of an object and other objects around the object in the same time and space range in real time, and triggering early warning if collision is possible. The system caches the latest position point of each object and some attribute information (such as acceleration, speed, course angle, height, object boundary and the like) of the object, and when a new collision judgment request arrives, collision detection calculation is carried out on the latest position point and some attribute information (such as acceleration, speed, course angle, height, object boundary and the like) of the object and the latest position point and some attribute information are cached in the memory, and the result is returned to a requester. The response speed is an important index for measuring the quality of the system. For example, after a vehicle transmits a collision detection request, the vehicle may receive the result of the determination request. However, if the delay in receiving the result is too large, there is a risk that the vehicle collides with another object.
To improve the efficiency of collision detection determination, the latest location point of an object and the attribute information of the object (such as acceleration, speed, heading angle, altitude, object boundary, etc.) are usually cached in a high-speed memory in order to reduce the time consumption for loading data from a third-party storage medium. However, when the latest location points and object attribute information of objects cached in the system are very much, the upper limit of the memory of a single server will be reached. When collision detection determination of a new object is continued, the collision detection cannot be stored in the memory of one server, and thus, the service cannot be continuously provided.
One solution is to increase the memory of a single server, but the hardware of the server has an upper limit, and the memory of the single server cannot be upgraded indefinitely, so that the solution cannot solve the problem when the request amount exceeds a certain magnitude.
In short, the problem that the prior art has is that the cloud collision detection early warning of massive objects cannot be supported.
Disclosure of Invention
The application aims to provide a collision detection early warning system and a collision detection early warning method, which can support cloud collision detection early warning of mass objects.
The application discloses a collision detection early warning system, which comprises a management server and a plurality of detection servers; the predetermined geographic area is pre-divided into a plurality of blocks;
the management server stores the corresponding relation between each block and the plurality of detection servers;
each detection server comprises a cache of each block corresponding to the detection server in the corresponding relationship, and the cache of each block is used for storing information of objects in the block;
the management server is used for receiving a collision detection request, determining a first block where an object is located and adjacent blocks of the first block according to position information of the object in the request, determining a detection server set corresponding to the first block and the adjacent blocks of the first block according to the corresponding relation, and sending the request to each detection server in the detection server set, wherein the request comprises the position information, time information and attribute information of the object;
and the detection server is used for updating the cache of the first block according to the position information, the time information and the attribute information of the object in the request after receiving the request, and completing the collision detection of the object with other objects in the cache of the first block and objects in the caches of the adjacent blocks.
In a preferred embodiment, the blocks are square.
In a preferred example, the side length of the square is greater than or equal to 2 × V × T, where V is the maximum speed of the object in the collision detection area, and T is the period duration of the server receiving the collision detection request for the same object.
In a preferred example, the attribute information includes one of the following information or any combination thereof: object identification, acceleration, speed, heading angle, altitude, object boundary.
In a preferred example, there are a plurality of the management servers;
the management server is also used for interacting with other management servers when being started, one management server is selected as a main management server through interaction, the other management servers are used as standby management servers, and each standby management server is selected as a new main management server when the main management server fails.
In a preferred embodiment, the system further comprises:
the detection server is also used for sending registration information to the management server when the management server is started;
the management server is also used for maintaining a list of detection servers in a healthy state.
In a preferred embodiment, the system further comprises:
the detection server is also used for periodically sending the current state information of the detection server to the management server;
the management server is also used for judging whether the detection server is in a healthy state or not according to the current state information received from the detection server, and if the management server judges that one detection server is in an unhealthy state, the management server transfers the task on the detection server to other detection servers.
In a preferred embodiment, the current state information includes one of the following or any combination thereof:
processor load, memory occupation ratio, and the number of objects currently cached.
In a preferred embodiment of the method of the invention,
the management server is further configured to, if it is determined that the memory usage ratio of one detection server exceeds the predetermined threshold, transfer a part of grids handled by the detection server to other detection servers for processing.
In a preferred embodiment of the present invention,
and the management server is also used for judging that the detection server is in an unhealthy state if the current state information of a certain detection server is not received within a preset time, deleting the detection server from the detection server list, and transferring all grids which are processed by the detection server to other detection servers for processing.
The application also discloses a collision detection early warning method, wherein the preset geographic area is divided into a plurality of blocks in advance, and the management server stores the corresponding relation between each block and a plurality of detection servers; the method comprises the following steps:
the management server receives a collision detection request including position information, time information, and attribute information of an object;
the management server determines a first block and an adjacent block of the object according to the position information of the object in the request, determines a detection server set corresponding to the first block and the adjacent block according to the corresponding relation, and sends the request to each detection server of the set;
and after receiving the request, the detection server updates the cache of the first block according to the position information, the time information and the attribute information of the object in the request, and completes the collision detection of the object with other objects in the cache of the first block and objects in the caches of the adjacent blocks.
In a preferred embodiment, the blocks are square.
In a preferred example, the side length of the square is greater than or equal to 12 × V × T, where V is the maximum speed of the object in the collision detection area, and T is the period duration of the server receiving the collision detection request for the same object.
In a preferred example, the attribute information includes one of the following information or any combination thereof: object identification, acceleration, speed, heading angle, altitude, object boundary.
In a preferred example, the attribute information includes an object identification;
the updating the cache of the first block according to the position information, the time information and the attribute information of the object in the request further comprises:
if the object identifier of the object already exists in the cache of the first block, updating the information of the object in the cache of the first block by using the position information, the time information and the attribute information of the object in the request;
and if the object identification of the object does not exist in the cache of the first block, adding the position information, the time information and the attribute information of the object in the request as the information of a new object into the cache of the first block.
In a preferred example, there are a plurality of the management servers; the method further comprises the following steps:
the management server interacts with other management servers when being started, one management server is selected as a main management server through interaction, the other management servers are selected as standby management servers, and each standby management server reselects a new main management server when the main management server fails.
In a preferred embodiment, the method further comprises:
the detection server sends registration information to the management server when being started;
the management server maintains a list of detection servers that are in a healthy state.
In a preferred embodiment, the method further comprises:
the detection server periodically sends the current state information of the detection server to the management server;
the management server judges whether the detection server is in a healthy state or not according to the current state information received from the detection server;
if the management server determines that one detection server is unhealthy, the task on that detection server is transferred to the other detection server.
In a preferred embodiment, the current state information includes one of the following or any combination thereof:
processor load, memory occupation ratio and the number of objects which are cached currently.
In a preferred embodiment, if the management server determines that one detection server is not in a healthy state, the task on the detection server is transferred to another detection server, further comprising:
and if the management server judges that the memory occupation ratio of one detection server exceeds a preset threshold, transferring a part of grids which are processed by the detection server to other detection servers for processing.
In a preferred embodiment, if the management server determines that one detection server is not in a healthy state, the task on the detection server is transferred to another detection server, further comprising:
if the management server does not receive the current state information of a certain detection server within a preset time, the detection server is judged to be in an unhealthy state, the detection server is deleted from the detection server list, and all grids which are processed by the detection server are transferred to other detection servers for processing.
The application also discloses a collision detection early warning system includes:
a memory for storing computer executable instructions; and the number of the first and second groups,
a processor, coupled with the memory, for implementing the steps in the method as described above when executing the computer-executable instructions.
The present application also discloses a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the steps in the method as described above.
In the embodiment of the application, because the collision detection is only carried out in the block where the object is located and the adjacent block, the calculation amount of the collision detection is greatly reduced, the collision detection of different blocks can be carried out in different detection servers, and the collision detection among more objects can be dealt with by adding the detection servers.
The present specification describes a number of technical features distributed throughout the various technical aspects, and if all possible combinations of technical features (i.e. technical aspects) of the present specification are listed, the description is made excessively long. In order to avoid this problem, the respective technical features disclosed in the above-mentioned summary of the invention of the present application, the respective technical features disclosed in the following embodiments and examples, and the respective technical features disclosed in the drawings may be freely combined with each other to constitute various new technical solutions (these technical solutions should all be considered as having been described in the present specification), unless such a combination of the technical features is technically impossible. For example, in one example, the feature a + B + C is disclosed, in another example, the feature a + B + D + E is disclosed, and the features C and D are equivalent technical means for the same purpose, and technically only one feature is used, but not simultaneously employed, and the feature E can be technically combined with the feature C, then the solution of a + B + C + D should not be considered as being described because the technology is not feasible, and the solution of a + B + C + E should be considered as being described.
Drawings
Fig. 1 is a schematic structural diagram of a collision detection early warning system according to a first embodiment of the application;
fig. 2 is a schematic flow chart of a collision detection and warning method according to a second embodiment of the present application;
fig. 3 is a block division diagram according to an embodiment of the present application.
Detailed Description
In the following description, numerous technical details are set forth in order to provide a better understanding of the present application. However, it will be understood by those skilled in the art that the technical solutions claimed in the present application may be implemented without these technical details and with various changes and modifications based on the following embodiments.
Description of partial concepts:
collision detection: an algorithm for determining that an object is in contact with, intersects with, or overlaps with other objects at a certain time. In essence, it is a decision algorithm that multiple polygons are spatially tangent, intersected, or overlapped at a certain time.
A server: refers to a computer system that can provide services to other devices in a network. The objects served by the server are generally called terminals or clients, and the server and the terminals can be connected in a wired or wireless communication mode. The implementation manner of the server is various, and may be a single computer device, or may be a combination of multiple computer devices (e.g., a cluster server, a cloud server, etc.). The server may also be referred to as a server, a cloud, etc. in some application scenarios.
The corresponding relation is as follows: the relationship between two or more data is usually stored in a storage device (e.g., a storage server, a hard disk, a memory, etc.), and the specific storage form may be various, for example, it may be a file representing the relationship, or a table in a database, etc.
A terminal: a terminal device is a device located at the outermost periphery of a computer network or a communication network, and is mainly used for inputting user information and outputting a processing result. Besides the input and output functions, the terminal can also perform certain operations and processing to realize partial system functions. The terminal may be, for example, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, a smart bracelet, a television, a projector with input function, a Personal Digital Assistant (PDA), and the like.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
A first embodiment of the present application relates to a collision detection and early warning system, which has a structure as shown in fig. 1 and includes a management server and a plurality of detection servers. Wherein, the first and the second end of the pipe are connected with each other,
the predetermined geographical area where collision detection is required is pre-divided into a plurality of sectors. The management server stores the corresponding relation between each block and a plurality of detection servers. According to the corresponding relationship, each detection server corresponds to one or more blocks. Each detection server comprises a cache of each block corresponding to the detection server, and the cache of each block is used for storing information of all objects in the block.
The management server is used for receiving a collision detection request, determining a first block where the object is located and adjacent blocks of the first block according to the position information of the object in the request, determining a detection server set corresponding to the first block and the adjacent blocks of the first block according to the corresponding relation, and sending the request to each detection server in the detection server set, wherein the request comprises the position information, the time information, the attribute information and the like of the object. The attribute information may be object identification, acceleration, speed, heading angle, altitude, object boundary, and the like. In this application, the first block does not mean the first block, but is only a name of the block where the object is currently located for convenience of description.
And the detection server is used for updating the cache of the first block according to the position information, the time information and the attribute information of the object in the request after receiving the request, and completing the collision detection of the object with other objects in the cache of the first block and objects in the caches of adjacent blocks. Algorithms for determining whether a collision between two objects is possible are known in the art, and are not innovative in themselves and will not be described in detail here.
The shape of the block may be various. Preferably, the block is square. The square blocks can make the whole calculation amount smaller and have better effect. Alternatively, in some other embodiments, the blocks may have other shapes, such as regular hexagons, rectangles, etc.
Optionally, in an embodiment, when the block is a square, the side length of the square is greater than or equal to 2 × V × T, where V is the maximum speed of the object in the collision detection area, and T is the period duration of the server receiving the collision detection request for the same object.
Alternatively, in one embodiment, when any detection server determines that there is a possibility that an object collides with another object, the detection server sends information of the potential collision to the specified position. This designated location may be a server where all potential collision information is aggregated. This designated location may also be a terminal corresponding to a potential collision-related object, such as a terminal used by a driver of the vehicle.
Optionally, in one embodiment, there are a plurality of management servers. Each management server interacts with other management servers when being started, one management server is selected as a main management server through interaction, the other management servers are selected as standby management servers, and each standby management server re-selects one management server as a new main management server when the main management server fails.
Optionally, in an embodiment, the detection server is further configured to send the registration information to the management server at startup.
Optionally, in an embodiment, the management server is further configured to maintain a list of detection servers in a healthy state.
Optionally, in an embodiment, the detection server is further configured to periodically send its current status information to the management server. The management server is also used for judging whether the detection server is in a healthy state or not according to the current state information received from the detection server, and if the management server judges that one detection server is in an unhealthy state, the management server transfers the tasks on the detection server to other detection servers. The current state information may be processor load, memory occupation ratio, number of objects currently cached, and the like.
Optionally, in an embodiment, if the management server determines that the memory usage ratio of one detection server exceeds the predetermined threshold, the management server transfers a part of the mesh that the detection server is responsible for processing to other detection servers for processing. For example, when a mesh is transferred, the cache data of the mesh in the original detection server (where the cache data is information of all existing objects in the mesh) may be sent to the target detection server, and the corresponding relationship between the mesh and the detection server is updated, so that the mesh corresponds to the target detection server, and then a collision detection request that needs to be performed in the mesh is sent to the target detection server. And then deleting the cache data of the grid in the original detection server.
Optionally, in an embodiment, if the management server does not receive the current status information of a certain detection server within a predetermined time period, the management server determines that the detection server is in an unhealthy state, deletes the detection server from the detection server list, and transfers all grids which the detection server is responsible for processing to other detection servers for processing.
A second embodiment of the present application relates to a collision detection and warning method, which has a flow chart as shown in fig. 2,
the predetermined geographic area is divided into a plurality of blocks in advance, and the management server stores the corresponding relation between each block and the plurality of detection servers.
The method comprises the following steps:
in step 202, the management server receives a collision detection request including position information, time information, and attribute information of an object. In one embodiment, the attribute information may be object identification, acceleration, speed, heading angle, altitude, object boundary, and the like.
Then, step 204 is entered, and the management server determines the first block and its neighboring blocks where the object is located according to the position information of the object in the request.
Then, step 206 is executed to determine the detection server sets corresponding to the first block and the adjacent blocks thereof according to the corresponding relationship. The set may be one detection server or a plurality of detection servers.
Thereafter, in step 208, the management server sends a request to each detection server in the collection.
Then, step 210 is entered, after the detection server receives the request, the cache of the first block is updated according to the position information, the time information and the attribute information of the object in the request, and the collision detection between the object and other objects in the cache of the first block and the collision detection between the object and each object in the cache of the adjacent block are completed according to the position information, the time information and the attribute information of the object in the request.
In one embodiment, the detection server updates the cache of the first block by: and if the object identification of the object exists in the cache of the first block, updating the information of the object in the cache of the first block by using the position information, the time information and the attribute information of the object in the request. And if the object identification of the object does not exist in the cache of the first block, adding the position information, the time information and the attribute information of the object in the request as the information of a new object into the cache of the first block.
The shape of the block may be various. Preferably, the block is square. The square blocks can make the overall calculation amount smaller and have better effect. Alternatively, in some other embodiments, the blocks may have other shapes, such as regular hexagons, rectangles, etc.
Optionally, in an embodiment, when the block is a square, the side length of the square is greater than or equal to 2 × V × T, where V is the maximum speed of the object in the collision detection area, and T is the period duration of the server receiving the collision detection request for the same object.
Alternatively, in one embodiment, when any detection server determines that there is a possibility that an object collides with another object, the detection server sends information of the potential collision to a specified position. This designated location may be a server where all potential collision information is aggregated. This designated location may also be a terminal corresponding to a potential collision-related object, such as a terminal used by a driver of the vehicle.
Alternatively, in one embodiment, the management server interacts with other management servers at startup, and one management server is elected as a primary management server and the other management servers are elected as standby management servers through interaction, and each standby management server re-elects a new primary management server when the primary management server fails.
The detection server sends registration information to the management server at startup.
The management server maintains a list of detection servers in a healthy state.
The detection server periodically sends its current state information to the management server.
And the management server judges whether the detection server is in a healthy state or not according to the current state information received from the detection server. The current state information may be processor load, memory occupation ratio, number of objects currently cached, and the like.
If the management server determines that one detection server is unhealthy, the task on that detection server is transferred to the other detection server. The method comprises the following steps:
and if the management server judges that the memory occupation ratio of one detection server exceeds a preset threshold, transferring a part of grids which are processed by the detection server to other detection servers for processing. In one embodiment, the method for transferring a mesh is to send all the cached data of the mesh in the original detection server (where the cached data is information of the existing object in the mesh) to the target detection server, and update the correspondence between the mesh and the detection server, so that the mesh corresponds to the target detection server, and then a collision detection request that needs to be performed in the mesh is sent to the target detection server. And then deleting the cache data of the grid in the original detection server.
If the management server does not receive the current state information of a certain detection server within a preset time, the detection server is judged to be in an unhealthy state, the detection server is deleted from the detection server list, and all grids which are processed by the detection server are transferred to other detection servers for processing.
The first embodiment is a system embodiment corresponding to the present embodiment, and the technical details in the first embodiment may be applied to the present embodiment, and the technical details in the present embodiment may also be applied to the first embodiment.
In order to better understand the technical solution of the present application, the following description is given with reference to a specific example, in which the listed details are mainly for the sake of understanding and are not intended to limit the scope of the present application.
The machines of the whole system are divided into two roles: a management server and a detection server. The management server can be one or more than one for disaster backup, and the detection servers can be more than one, and each cache the latest position of part of the object and the attribute information of the object. These servers form a cluster.
The basic functions of each server are as follows:
1. a management server:
a) The system is responsible for routing a collision detection request sent from a terminal to a corresponding detection server according to a certain routing algorithm to finish collision detection judgment.
b) And checking the health state of the detection server, eliminating unhealthy detection servers in time, and transferring data on the unhealthy detection servers to other detection servers of the cluster.
2. The detection server:
a) Receiving a collision detection request, and caching the latest position point, time information and attribute information (such as object identification, acceleration, speed, course angle, height, object boundary and the like) of the object carried in the request in a memory. And if the latest position point, the time information and the attribute information of the object exist in the memory, replacing the old data with the latest data.
b) And calling a collision detection judgment algorithm, and returning a result to a calling party.
The system workflow and implementation details are as follows:
1. starting the whole cluster, if a plurality of management servers exist, selecting one management server as a leader (a main management server) by the management servers through a leader election algorithm, wherein the management servers are responsible for the management work of the whole cluster, and other management servers are in a standby state.
2. The detection server sends the registration information to the management server in the leader state. The management server maintains a list of detection servers in a healthy state.
3. The management server in the leader state segments the collision detection determination area into M small squares (M is an integer greater than 1) with a side length of X meters according to the segmentation mode shown in fig. 3. And then, according to the detection server list obtained in the previous step 2, uniformly distributing the M squares to the detection servers.
a) The segmentation algorithm may be determined by a specific application scenario for the side length of the small square segmented from the collision detection area. Assuming that the maximum speed of an object in the collision detection area is V and the period from a terminal uploading position point installed on the object to the cloud end is T (unit second), the square side length x is calculated as follows:
x=2*VT
of course larger than this value is also possible.
b) And the management server divides the collision detection judgment area into M small squares with the side length of X meters. And is recorded in the area grid table. Where Lon represents longitude and Lat represents latitude, and the boundary of a grid is defined by two longitudes and two latitudes.
Grid numbering Grid latitude and longitude range
1 (Lon1.1 Lat1.1,Lon1.2 Lat1.2)
81 (Lon81.1Lat81.1,Lon81.2 Lat81.2)
c) For example, if there are 4 available detection servers and the collision detection determination area is divided into 81 small squares, the following grid and detection server mapping table are generated. If the processing capacities of different detection servers are different, the distribution can also be carried out according to the size of the processing capacity, and the detection server with the large processing capacity can distribute more grids.
Detecting server IP addresses Grid numbering
192.168.0.1 1,2,3…20
192.168.0.2 21,22,23…40
192.168.0.3 41,42,43…60
192.168.0.4 61,62,63…81
d) And the management server forwards the received collision detection request to the corresponding detection server according to the table. Each collision detection server maintains the grid number it manages. While maintaining the latest object information in each grid number. The following table is an example of the spatial grid and associated object information within the grid maintained by each collision detection server.
Figure BDA0002257662260000151
4. Collision detection determination process
a) The terminal sends a collision detection request to the management server, and the request body comprises object identification, longitude and latitude, time, speed, course angle, height and object boundary information.
b) The management server determines which grid the object falls in, such as grid 16, based on the latitude and longitude information in the request.
c) According to the collision detection algorithm, if two objects, such as object a and object B, have the possibility of collision, a and B must be very close together. Then the grid on which a and B fall must be the same grid or adjacent grids. Examples are as follows: for example, the object a sends a collision detection request, and finally, the object a is found to be in the grid 16 through the step b). As can be seen from fig. 3, the cells adjacent to cell 16 are only cell 8, cell 9, cell 15, cell 17, cell 26, cell 27, and cell 28.
d) The management server inquires the grid and the detection server mapping table to obtain that the IP address of the detection server corresponding to the grid 16 is 192.168.0.1, and the IP addresses of the detection servers corresponding to the grid 8, the grid 9, the grid 15 and the grid 17 adjacent to the grid 16 are 192.168.0.1, and the IP addresses of the detection servers corresponding to the grid 26, the grid 27 and the grid 28 are 192.168.02.
e) The request is sent to the detection servers with the IP addresses of 192.168.0.1 and 192.168.02.
f) After receiving the request, the detection server 192.168.0.1 updates the cached object identifier-grid number table. As the number of requests increases, the following object identification and grid number mapping table is generated.
Figure BDA0002257662260000161
g) The detection servers 192.168.0.1 and 192.168.0.2 call a collision detection judgment algorithm to finish collision detection judgment, for example, after the 192.168.0.1 receives a request, all objects in the grids 8, 9, 15 and 17 are taken out, then the position of the object A after 1 second is calculated according to acceleration, speed, heading angle and current position, then the position of the object A after 1 second is calculated by the same method, and when the distance between the two positions is smaller than a threshold value, an alarm is triggered and fed back to a calling party. Collision detection determination is performed for the objects in the grids 26, 27, and 28 above 192.168.0.2 in the same manner.
5. The detection server periodically (for example, every 10 seconds) sends statistical information such as the current CPU, memory, the number of cached objects and the like to the management server in the leader state. The management server judges whether the collision detection judgment service is in a healthy state or not according to the statistical information. When the management server judges that a certain detection server is unhealthy, the management server transfers the data on the detection server to other detection servers in time.
a) When the management server finds that the memory of a certain server exceeds 90%, the management server migrates a part of the grids which the server is responsible for to other servers, so that the pressure of the server is relieved.
b) When the management server finds that a certain detection server does not send the statistical information for more than one period (for example, 10 seconds), the management server continues to wait for a plurality of periods (for example, 3 periods), if the detection server still does not send the statistical information to the management server in the next 3 periods, the management server marks the detection server as unhealthy, then removes the detection server from an available list, and then transfers the grid which is responsible for the detection server to other detection servers.
Embodiments of the present application also provide a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement method embodiments of the present application. Computer-readable storage media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable storage medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
In addition, the embodiment of the application also provides a collision detection early warning system, which comprises a memory for storing computer executable instructions and a processor; the processor is configured to implement the steps of the method embodiments described above when executing the computer-executable instructions in the memory. The Processor may be a Central Processing Unit (CPU), other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or the like. The aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a Flash memory (Flash), a hard disk, or a solid state disk. The steps of the method disclosed in the embodiments of the present invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
It is noted that, in the present patent application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the use of the verb "comprise a" to define an element does not exclude the presence of another, same element in a process, method, article, or apparatus that comprises the element. In the present patent application, if it is mentioned that a certain action is executed according to a certain element, it means that the action is executed according to at least the element, and two cases are included: performing the action based only on the element, and performing the action based on the element and other elements. Multiple, etc. expressions include 2, 2 2 kinds and more than 2, more than 2 times and more than 2 kinds.
All documents mentioned in this specification are to be considered as being incorporated in their entirety into the disclosure of the present application so as to be subject to modification as necessary. It should be understood that the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present disclosure should be included in the protection scope of one or more embodiments of the present disclosure.
In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.

Claims (19)

1. A collision detection early warning system is characterized by comprising a management server and a plurality of detection servers; the predetermined geographic area is pre-divided into a plurality of blocks;
the management server stores the corresponding relation between each block and the plurality of detection servers;
each detection server comprises a cache of each block corresponding to the detection server in the corresponding relationship, and the cache of each block is used for storing information of objects in the block;
the management server is used for receiving a collision detection request, determining a first block where an object is located and adjacent blocks thereof according to position information of the object in the request, determining a detection server set corresponding to the first block and the adjacent blocks thereof according to the corresponding relation, and sending the request to each detection server in the detection server set, wherein the request comprises the position information, the time information and the attribute information of the object;
the detection server is used for updating the cache of the first block according to the position information, the time information and the attribute information of the object in the request after receiving the request, and completing collision detection of the object with other objects in the cache of the first block and objects in the caches of the adjacent blocks;
the block is a square, the side length of the square is greater than or equal to 2V T, wherein V is the maximum speed of the object in the collision detection area, and T is the period duration of the server end receiving the collision detection request for the same object.
2. The collision detection warning system according to claim 1, wherein the attribute information includes one or any combination of the following information: object identification, acceleration, speed, heading angle, altitude, object boundary.
3. The collision detection warning system according to claim 1 or 2, wherein there are a plurality of the management servers;
the management server is also used for interacting with other management servers when being started, one management server is selected as a main management server through interaction, other management servers are used as standby management servers, and each standby management server is selected as a new main management server again when the main management server fails.
4. The collision detection warning system according to claim 3, further comprising:
the detection server is also used for sending registration information to the management server when the management server is started;
the management server is also used for maintaining a list of detection servers in a healthy state.
5. The collision detection warning system according to claim 4, wherein the system further comprises:
the detection server is also used for periodically sending the current state information of the detection server to the management server;
the management server is also used for judging whether the detection server is in a healthy state or not according to the current state information received from the detection server, and if the management server judges that one detection server is in an unhealthy state, the management server transfers the tasks on the detection server to other detection servers.
6. The collision detection warning system according to claim 5, wherein the current state information includes one or any combination of the following:
processor load, memory occupation ratio and the number of objects which are cached currently.
7. The collision detection early warning system according to claim 6,
and the management server is also used for transferring a part of grids which are processed by the detection server to other detection servers for processing if the memory occupation ratio of one detection server is judged to exceed a preset threshold.
8. The collision detection early warning system according to claim 6,
and the management server is also used for judging that the detection server is in an unhealthy state if the current state information of a certain detection server is not received within a preset time, deleting the detection server from the detection server list, and transferring all grids which are processed by the detection server to other detection servers for processing.
9. A collision detection early warning method is characterized in that a preset geographic area is divided into a plurality of blocks in advance, and a management server stores the corresponding relation between each block and a plurality of detection servers; the method comprises the following steps:
the management server receives a collision detection request including position information, time information, and attribute information of an object;
the management server determines a first block and an adjacent block of the object according to the position information of the object in the request, determines a detection server set corresponding to the first block and the adjacent block according to the corresponding relation, and sends the request to each detection server of the set;
after receiving the request, the detection server updates the cache of the first block according to the position information, the time information and the attribute information of the object in the request, and completes the collision detection of the object with other objects in the cache of the first block and objects in the caches of the adjacent blocks;
the blocks are square; the side length of the square is greater than or equal to 12V T, wherein V is the maximum speed of the object in the collision detection area, and T is the period duration of the server end receiving the collision detection request for the same object.
10. The collision detection warning method according to claim 9, wherein the attribute information includes one or any combination of the following information: object identification, acceleration, speed, heading angle, altitude, object boundary.
11. The collision detection warning method according to claim 9, wherein the attribute information includes an object identification;
the updating the cache of the first block according to the position information, the time information and the attribute information of the object in the request further comprises:
if the object identifier of the object already exists in the cache of the first block, updating the information of the object in the cache of the first block by using the position information, the time information and the attribute information of the object in the request;
and if the object identification of the object does not exist in the cache of the first block, adding the position information, the time information and the attribute information of the object in the request into the cache of the first block as the information of a new object.
12. The collision detection warning method according to any one of claims 9 to 11, wherein there are a plurality of the management servers; the method further comprises the following steps:
the management server interacts with other management servers when being started, one management server is selected as a main management server through interaction, the other management servers are selected as standby management servers, and each standby management server reselects a new main management server when the main management server fails.
13. The collision detection warning method according to claim 12, further comprising:
the detection server sends registration information to the management server when being started;
the management server maintains a list of detection servers that are in a healthy state.
14. The collision detection warning method according to claim 13, further comprising:
the detection server periodically sends the current state information of the detection server to the management server;
the management server judges whether the detection server is in a healthy state or not according to the current state information received from the detection server;
if the management server determines that one detection server is unhealthy, the task on that detection server is transferred to the other detection server.
15. The collision detection warning method according to claim 14, wherein the current state information includes one of the following or any combination thereof:
processor load, memory occupation ratio and the number of objects which are cached currently.
16. The collision detection warning method according to claim 15, wherein if the management server determines that one detection server is not in a healthy state, the task on the detection server is transferred to another detection server, further comprising:
and if the management server judges that the memory occupation ratio of one detection server exceeds a preset threshold, transferring a part of grids processed by the detection server to other detection servers for processing.
17. The collision detection warning method according to claim 15, wherein if the management server determines that one detection server is not in a healthy state, the task on the detection server is transferred to another detection server, further comprising:
if the management server does not receive the current state information of a certain detection server within a preset time, the detection server is judged to be in an unhealthy state, the detection server is deleted from the detection server list, and all grids which are processed by the detection server are transferred to other detection servers for processing.
18. A collision detection early warning system, comprising:
a memory for storing computer executable instructions; and (c) a second step of,
a processor, coupled with the memory, for implementing the steps in the method of any one of claims 9 to 17 when executing the computer-executable instructions.
19. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the steps in the method of any one of claims 9 to 17.
CN201911060013.7A 2019-11-01 2019-11-01 Collision detection early warning system and method thereof Active CN112788070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911060013.7A CN112788070B (en) 2019-11-01 2019-11-01 Collision detection early warning system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911060013.7A CN112788070B (en) 2019-11-01 2019-11-01 Collision detection early warning system and method thereof

Publications (2)

Publication Number Publication Date
CN112788070A CN112788070A (en) 2021-05-11
CN112788070B true CN112788070B (en) 2022-10-11

Family

ID=75748634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911060013.7A Active CN112788070B (en) 2019-11-01 2019-11-01 Collision detection early warning system and method thereof

Country Status (1)

Country Link
CN (1) CN112788070B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932872A (en) * 2014-03-18 2015-09-23 腾讯科技(深圳)有限公司 Message processing method and server
CN105117171A (en) * 2015-08-28 2015-12-02 南京国电南自美卓控制系统有限公司 Energy SCADA massive data distributed processing system and method thereof
CN105138678A (en) * 2015-09-11 2015-12-09 武汉云空间地理信息技术有限公司 Reading and distributing method and system for map tile data
CN105144264A (en) * 2013-03-14 2015-12-09 微软技术许可有限责任公司 Enriching driving experience with cloud assistance
US10083551B1 (en) * 2015-04-13 2018-09-25 Allstate Insurance Company Automatic crash detection
CN110310481A (en) * 2019-06-28 2019-10-08 浙江吉利控股集团有限公司 A kind of vehicle collision prewarning method, device and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105144264A (en) * 2013-03-14 2015-12-09 微软技术许可有限责任公司 Enriching driving experience with cloud assistance
CN104932872A (en) * 2014-03-18 2015-09-23 腾讯科技(深圳)有限公司 Message processing method and server
US10083551B1 (en) * 2015-04-13 2018-09-25 Allstate Insurance Company Automatic crash detection
CN105117171A (en) * 2015-08-28 2015-12-02 南京国电南自美卓控制系统有限公司 Energy SCADA massive data distributed processing system and method thereof
CN105138678A (en) * 2015-09-11 2015-12-09 武汉云空间地理信息技术有限公司 Reading and distributing method and system for map tile data
CN110310481A (en) * 2019-06-28 2019-10-08 浙江吉利控股集团有限公司 A kind of vehicle collision prewarning method, device and equipment

Also Published As

Publication number Publication date
CN112788070A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
US11061984B2 (en) Grid-based geofence data indexing
US20160142369A1 (en) Service addressing in distributed environment
CN103905503A (en) Data storage method, data scheduling method, device and system
CN109196807B (en) Network node and method of operating a network node for resource distribution
EP3944556A1 (en) Block data access method and apparatus, and block data storage method and apparatus
US9317527B2 (en) Method and apparatus for region sampling and estimation in location based networks
CN102480502A (en) I/O load equilibrium method and I/O server
CN112788070B (en) Collision detection early warning system and method thereof
CN110475204B (en) Method, device and equipment for analyzing reverse address of geographic fence
CN114529043A (en) Urban space grouping method
CN116010677B (en) Spatial index method and device and electronic equipment thereof
CN110968453A (en) Data storage method and device
CN109933288A (en) Travel timetable distributed storage method and device
JP6464688B2 (en) PROCESSING PROGRAM, DATA PROCESSING METHOD, AND PROCESSING DEVICE
CN113553193B (en) Mirror image data auditing and distributing processing method and system
CN111629029B (en) Service release method and system
CN111831760B (en) Method of processing position data, corresponding device, computer readable storage medium
CN110309101B (en) Data management method and Hadoop distributed file system
CN117573707A (en) Business service method and device
CN113724009A (en) Transportation capacity pricing method and device, electronic equipment and machine-readable storage medium
CN115858293A (en) Virtualization-based data processing method, device and system
CN113242574A (en) Load balancing method, system, computer equipment and readable storage medium
CN116317109A (en) Data linkage early warning method, device, equipment and medium based on power transmission line
CN117435129A (en) Storage cluster expansion method and device, computer equipment and storage medium
CN116975096A (en) Data processing method, device, electronic equipment, storage medium and program product

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