High-availability and high-concurrency broadcasting method, equipment, and medium for Beidou high-precision grid differential data
Using virtual base station technology to divide grid areas and message queue clusters, combined with low-granularity lock queues and Hash algorithms, high-precision, high-coverage, high-availability, and high-concurrency Beidou satellite positioning services are realized, solving the problems faced by base stations in the existing technology. A limited number of problems, supporting massive user concurrency and conversion of multiple differential data formats.
Patent Information
- Application Number
- CN202010752028.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-07-30
AI Technical Summary
The existing satellite positioning service system cannot meet the needs of high accuracy, multiple differential formats, high coverage, high availability, and high concurrency. In particular, the number of base stations is limited and cannot cover the whole country. As a result, the positioning accuracy is limited and it cannot support both RTK and RTD business.
Use virtual base station technology to divide nationwide grid areas, push differential data based on message queue clusters, use low-granularity lock queues and Hash algorithms to optimize data structures, dynamically adjust request queues, and deploy distributed services on multiple servers to support multiple Conversion of differential data formats and coordinate systems.
It achieves high-precision, high-coverage, high-availability, and high-concurrency differential data broadcasting, supports massive user concurrency, improves service performance and horizontal expansion capabilities, and can handle the conversion of multiple differential data formats and coordinate systems at the same time.
Smart Images

Figure CN112468530B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of satellite positioning technology, and in particular to a method, device and medium for high-availability and high-concurrency broadcasting of Beidou high-precision grid differential data. Background Art
[0002] With the deployment and improvement of the Beidou global satellite positioning system in my country, the role of satellite positioning technology has become increasingly important. Related products in industries and departments such as urban planning, land surveying and mapping, cadastral management, urban and rural construction, disaster monitoring, traffic control, resource exploration, meteorology, and earthquake have gradually penetrated into all aspects of human social production and people's lives, injecting new vitality into global economic and social development. Facing the upcoming 5G era, the public has an increasing demand for real-time dynamic positioning services, lower latency, higher accuracy, and massive user load capacity, which all require data centers to have powerful real-time solving capabilities and high concurrency and high-availability data broadcasting capabilities.
[0003] In the existing satellite positioning service system (Continuously Operating Reference Stations, CORS), due to the limited number of reference stations, it is impossible to use ground reference stations to establish a virtual reference station network covering the whole country, so that the high-precision centimeter-level satellite positioning service range is limited, the positioning accuracy is affected by the number of reference stations and the distance between the reference stations, the terminal equipment is fixed for a long time, and the server supports only a small number of broadcast data types, and cannot support outdoor RTK and RTD services at the same time. The support for different manufacturers and different equipment is also limited.
[0004] Faced with the growing industry demand, the number of concurrent services and availability are no longer met. There is an urgent need for a broadcast method that can support the broadcast of multiple differential formats such as RTK / RTD, with high precision, high coverage, high availability and high concurrency. Summary of the invention
[0005] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a high-availability and high-concurrency broadcasting method for Beidou high-precision grid differential data. Based on the virtual reference station technology (Virtual Reference Station, VRS for short), a nationwide grid area is established, and grid points are divided into grids. The differential data broadcasting scheme for terminal users in the grid points can support the broadcasting of various differential formats such as RTK / RTD, with high precision, high coverage, high availability and high concurrency.
[0006] The present invention provides a method for high-availability and high-concurrency broadcasting of Beidou high-precision grid differential data, comprising the following steps:
[0007] Divide the region, divide the national grid into several grid regions, and divide each grid region into several grid points;
[0008] Broadcast differential data. The CORS data processing center generates differential data for all grid points every second, and pushes the differential data to the message queue cluster in the form of a message queue. The broadcast service uses an array to save all grid points. When subscribing to the differential data of the grid points from the message queue cluster, each differential data has an identification coordinate. The subscript corresponding to the grid point array is calculated according to the received coordinates, and the differential data of the corresponding grid point is found in the array memory according to the subscript. According to the differential request queue in the grid point, the queue is traversed to broadcast the differential data to each requesting user.
[0009] Furthermore, in the region division step, the whole country is divided into 5*7 grid areas according to the regional division of 10 degrees latitude and 10 degrees longitude, and each grid area is divided into 200*200 grid points.
[0010] Furthermore, in the step of broadcasting differential data, the range of the identification coordinates is (0-200, 0-200).
[0011] Furthermore, the step of broadcasting differential data also includes adopting a data structure of a low-granularity lock queue, locking only the elements accessed in the queue, releasing the lock immediately after the access, and then accessing the next element in the queue.
[0012] Furthermore, the step of broadcasting differential data also includes increasing the number of request queues in the grid points, and using a hash algorithm to evenly distribute users to the request queues according to user IDs.
[0013] Furthermore, the step of broadcasting differential data also includes dynamically generating a request queue for each grid point, and if the number of users in the grid point exceeds a threshold, reallocating the number of request queues for the grid point.
[0014] Furthermore, it also includes a distributed service broadcasting step, deploying the service on multiple servers, and evenly distributing the user-initiated requests to different services through LVS or Nginx. When the service is saturated, a new server is added and a new service is deployed. Each service obtains differential data from the message queue cluster, multiple services obtain differential data from the same message queue cluster, and the same service obtains differential data from multiple message queue clusters.
[0015] Furthermore, in the step of broadcasting differential data, according to a user request, the differential data of the corresponding grid points are converted into a differential data format requested by the user, and the coordinate system of the corresponding grid points is converted into a coordinate system requested by the user.
[0016] An electronic device, comprising: a processor;
[0017] A memory; and a program, wherein the program is stored in the memory and is configured to be executed by a processor, the program including a method for executing a high-availability and high-concurrency broadcasting method for Beidou high-precision grid differential data.
[0018] A computer-readable storage medium stores a computer program, which is executed by a processor to implement a high-availability and high-concurrency broadcasting method for Beidou high-precision grid differential data.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] The present invention provides a Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method, which can handle high-concurrency grid differential data broadcasting services, allocate users to different servers through load balancing scheduling servers, and divide them into respective grid areas and grid point areas according to the location information of each user. The differential broadcasting is based on the grid point as a unit, and a single service can process user requests and differential data broadcasting at the same time, with good service performance, while supporting horizontal expansion to meet the requirements of massive user concurrency.
[0021] The present invention supports real-time conversion of multiple differential data formats. According to the user's request, the differential data of the corresponding grid points are converted into the differential data format requested by the user, such as RTCM3.3 can be converted into the data format of RTCM3.0, and sent to the user after the conversion. The present invention supports the broadcasting of differential data of multiple coordinate systems, and forwards the differential of the CGCS2000 coordinate system by default, which can be converted into the coordinate systems of WGS84 and ITRF2008 according to the user's request.
[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. The specific implementation of the present invention is given in detail by the following embodiments and their accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 This is a flow chart of the Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method of the present invention;
[0025] Figure 2 A regional map of the national grid area division of the present invention;
[0026] Figure 3 It is a message publishing and subscription model diagram of the present invention;
[0027] Figure 4 This is a deployment diagram of the Beidou high-precision grid differential data high-availability and high-concurrency broadcasting system of the present invention. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0029] Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method, based on Virtual Reference Station technology (VRS), builds a nationwide grid area, divides grid points into grids, and broadcasts differential data for terminal users within the grid points, such as Figure 1 As shown, the following steps are included:
[0030] Divide the region, divide the national grid into several grid regions, and divide each grid region into several grid points; specifically, Figure 2 As shown, according to the regional division of 10 degrees latitude and 10 degrees longitude, the country is divided into 35 (5*7) grid areas. According to the division of a grid point of 3 minutes latitude and 3 minutes longitude, each grid area is divided into 40,000 (200*200) grid points.
[0031] Broadcast differential data. The CORS data processing center generates 40,000 differential data for 40,000 grid points per second, and pushes the differential data to the message queue cluster in the form of a message queue. The broadcast service uses an array of 40,000 in length to save these 40,000 grid points, such as Figure 3 As shown, when subscribing to the differential data of the grid point from the message queue cluster, each differential data has an identification coordinate to identify the difference, and the range of the identification coordinate is (0~200,0~200). The subscript corresponding to the grid point array is calculated according to the received coordinates. For example, when the received coordinates are (60,67), the subscript corresponding to the grid point array is 60*200+67=12067. The differential data of the corresponding grid point is found in the array memory according to the subscript, and the differential data is broadcast to each requesting user through the queue according to the differential request queue in the grid point. In this embodiment, according to the user request, the differential data of the corresponding grid point is converted into the differential data format requested by the user, such as RTCM3.3 can be converted into the data format of RTCM3.0; it supports the broadcasting of differential data of multiple coordinate systems, and forwards the differential of the CGCS2000 coordinate system by default, which can be converted into the coordinate systems of WGS84 and ITRF2008 according to the user request.
[0032] Each grid point has a corresponding request queue, which is used in a multi-threaded environment. The thread that receives the user's request will add the user to the request queue of the grid point according to the location of the user's request. The thread that broadcasts the differential data will traverse the queue and send the differential data to the user. If two threads lock the entire queue when accessing the queue, if there are many elements in the queue, the time the thread occupies the lock will increase, and the lock competition between the two threads will be very frequent, which seriously reduces the performance of the service. In one embodiment, a low-granularity lock queue data structure is adopted, that is, only the elements in the queue are locked, not the entire queue, only the elements to be accessed are locked, and the lock is released immediately after the access, and then the next element in the queue is accessed. Although the number of locks increases, the time to occupy the lock is reduced. At the same time, different threads can access different elements in the same queue at the same time, which greatly reduces the lock competition and improves the performance of the system.
[0033] Considering that when different threads access the request queue of a grid point, if there are too many request users in the queue, that is, too many elements in the queue, the search performance of the queue will be reduced, and as the number of users increases, the performance will decrease more; in one embodiment, the number of request queues in the grid point is increased, and the users are evenly distributed to the request queues according to the user ID using a Hash algorithm. This prevents the overall search performance from decreasing too much, but it adds a burden to the thread that traverses the queue, because even if the queue is empty, the traversal thread needs to visit the queue head, which is equivalent to an empty run. However, there are 40,000 grid points, which means that for each grid point, for each additional queue, the traversal thread has to run 40,000 more times to visit the queue head. Moreover, only a few grid points need more request queues. For most grid points in the grid, there may not be a lot of requesting users in the grid points. If the number of queues is increased, many of them are often unused or unnecessary. Therefore, it is necessary to dynamically generate request queues for each grid point. If the number of users in the grid point exceeds the threshold, the number of request queues is reallocated for the grid point. In this way, the grid points with a large number of users have more request queues, and the grid points with a small number of users often have only one request queue, which saves memory and improves efficiency.
[0034] The service needs to continuously obtain the differential data in the grid point area in real time, and then convert the differential format to broadcast it to users, which requires strong concurrency and data processing capabilities. Figure 4As shown, preferably, it also includes a distributed service broadcasting step, deploying the service on multiple servers, and the request initiated by the user is realized by LVS (Linux Virtual Server), i.e., Linux virtual server to realize the massive concurrency of the user, or Nginx (engine x) is a high-performance HTTP and reverse proxy web server, which is evenly distributed to different services. When the service is saturated, by adding a new server, deploying a new service to disperse the pressure, theoretically, it can be expanded all the time to meet the concurrent requirements of the user volume. Each service obtains differential data from the message queue cluster, and multiple services can obtain differential data from the same message queue cluster. The same service can also obtain differential data from multiple message queue clusters, so that the same data can be used by multiple services and multiple users at the same time. A distributed deployment scheme of multi-process and multi-server is adopted, and the broadcast service is deployed on multiple servers, and each server deploys multiple service processes. The number of deployed servers can be determined according to the number of users, and horizontal expansion is supported to reach the concurrent capacity of millions or even tens of millions. Each service process is only responsible for the connection of 10,000 users. In this way, even if an exception occurs in the program process, it will only affect 10,000 users, and will not affect users on other processes. At the same time, the load balancing service can distribute these 10,000 users to other processes, and the monitoring process can try to restart the abnormal process to minimize the impact on users. Similarly, if the server is down, the front-end load balancing service can transfer users on the abnormal server to other servers. Users are evenly distributed on different service processes on different servers, reducing the range of users affected by service abnormalities. At the same time, the load balancing service switches in seconds, and users basically do not feel the abnormality.
[0035] It adopts asynchronous notification and event-driven network architecture mode. The program design adopts a multi-threaded concurrent model. The number of running threads can be set according to the number of cores of the system CPU. The user's request is transmitted through the TCP protocol. Each request and connection will be evenly distributed to each thread for processing. Each thread runs and processes requests from users separately to avoid resource competition between threads, maximize the use of system resources, and realize the processing capacity of large concurrent users. The service processes the request data sent by the user and sends the differential data to the user in different threads, so as to achieve read-write separation and no mutual influence.
[0036] An electronic device, comprising: a processor;
[0037] A memory; and a program, wherein the program is stored in the memory and is configured to be executed by a processor, and the program includes a method for executing a high-availability and high-concurrency broadcasting method for Beidou high-precision grid differential data.
[0038] A computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement a high-availability and high-concurrency broadcasting method for Beidou high-precision grid differential data.
[0039] The present invention provides a Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method, which can handle high-concurrency grid differential data broadcasting services, distribute users to different servers through load balancing scheduling servers, and divide them into respective grid areas and grid point areas according to the location information of each user. The differential broadcast is based on grid points, and a single service can simultaneously process user requests and differential data broadcasting, with good service performance, while supporting horizontal expansion to meet the requirements of massive user concurrency. The present invention supports real-time conversion of multiple differential data formats, and according to user requests, converts the differential data of corresponding grid points into the differential data format requested by the user, such as RTCM3.3 can be converted into the data format of RTCM3.0, and sent to the user after conversion. The present invention supports differential data broadcasting of multiple coordinate systems, and forwards the differential of the CGCS2000 coordinate system by default, which can be converted into the coordinate systems of WGS84 and ITRF2008 according to user requests.
[0040] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in any form. Any ordinary technician in the industry can smoothly implement the present invention as shown in the drawings and above. However, any equivalent changes, modifications and evolutions made by technicians familiar with the profession without departing from the scope of the technical solution of the present invention using the technical content disclosed above are all equivalent embodiments of the present invention. At the same time, any equivalent changes, modifications and evolutions made to the above embodiments based on the essential technology of the present invention are still within the protection scope of the technical solution of the present invention.
Claims
1. A method for high-availability and high-concurrency broadcasting of Beidou high-precision grid differential data, characterized in that: The following steps are involved: Divide the region, divide the national grid into several grid regions, and divide each grid region into several grid points; Broadcast differential data. The CORS data processing center generates differential data for all grid points every second, and pushes the differential data to the message queue cluster in the form of a message queue. The broadcast service uses an array to save all grid points. When subscribing to differential data of grid points from the message queue cluster, each differential data has an identification coordinate, and the subscript corresponding to the grid point array is calculated according to the received coordinate, and the differential data of the corresponding grid point is found in the array memory according to the subscript, and according to the differential request queue in the grid point, the queue is traversed to broadcast the differential data to each requesting user; Wherein, each grid point has a corresponding request queue, and the step of broadcasting differential data further includes increasing the number of request queues in the grid point, and using a hash algorithm to evenly distribute users to the request queues according to user IDs; In the step of broadcasting differential data, according to user request, the differential data of the corresponding grid points are converted into the differential data format requested by the user, and the coordinate system of the corresponding grid points is converted into the coordinate system requested by the user, including conversion into the coordinate systems of WGS84 and ITRF2008 according to user request.
2. The Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method according to claim 1, characterized in that: In the area division step, the whole country is divided into 5*7 grid areas according to the area division of 10 degrees latitude and 10 degrees longitude, and each grid area is divided into 200*200 grid points.
3. The Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method according to claim 2, characterized in that: In the step of broadcasting differential data, the range of the identification coordinates is (0-200, 0-200).
4. The method for high availability and high concurrency broadcasting of Beidou high-precision grid differential data according to claim 1, characterized in that: The step of broadcasting differential data also includes adopting a data structure of a low-granularity lock queue, locking only the elements accessed in the queue, releasing the lock immediately after the access, and then accessing the next element in the queue.
5. The Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method according to claim 1, characterized in that: The step of broadcasting differential data also includes dynamically generating a request queue for each grid point, and if the number of users in the grid point exceeds a threshold, reallocating the number of request queues for the grid point.
6. The Beidou high-precision grid differential data high-availability and high-concurrency broadcasting method according to claim 1, characterized in that: It also includes a distributed service broadcasting step, deploying the service on multiple servers, and evenly distributing user-initiated requests to different services through LVS or Nginx. When the service is saturated, new servers are added and new services are deployed. Each service obtains differential data from the message queue cluster, multiple services obtain differential data from the same message queue cluster, and the same service obtains differential data from multiple message queue clusters.
7. An electronic device, characterized in that include: processor; Memory; And a program, wherein the program is stored in the memory and configured to be executed by a processor, and the program includes instructions for executing the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to perform the method according to any one of claims 1 to 6.
