A preferred method, device and system for broadcasting data based on positioning services

By parsing and evaluating the data in the RabbitMQ module and combining it with the distributed lock mechanism of the Zookeeper module, the problem of data repetition in high-precision positioning services was solved, and high-quality and stable data broadcasting was achieved.

CN116170513BActive Publication Date: 2025-10-28NAT AUTOMOBILE UNIV SPACE-TIME TECH (ANQING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310182300.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2025-10-28
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

In existing technologies, high-precision positioning services suffer from data broadcasting redundancy issues, which cannot guarantee data quality, and distributed system information synchronization cannot be achieved when multiple instances are running.

Method used

The RabbitMQ module parses and evaluates data, generates unique identifiers for filtering, and uses the Zookeeper module to authorize distributed locks when multiple instances are running, ensuring that only one instance has the right to consume data, thus achieving optimal data broadcasting.

Benefits of technology

This improved the quality of data broadcasting, reduced the probability of duplicate broadcasts, and ensured efficient and stable data broadcasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170513B_ABST
    Figure CN116170513B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and system for broadcasting data based on a positioning service. The method comprises: obtaining first service data in a RabbitMQ module, parsing and uniquely identifying the first service data, generating evaluation message data of the first service data, screening the first service data according to the evaluation message data, and obtaining preferred data; writing the preferred data into the RabbitMQ module so that a first running instance obtains the preferred data of the RabbitMQ module for broadcasting; when the number of the first running instances is at least two, authorizing a distributed lock to each first running instance according to preset requirements through a Zookeeper module, so that each first running instance performs a data consumption task in turn, thereby improving the quality of data broadcasting and reducing the probability of repeated data broadcasting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of navigation and positioning technology, and in particular to a preferred method, apparatus, system, and storage medium for broadcasting data based on positioning services. Background Technology

[0002] High-precision positioning services are widely used in daily life, and the broadcast correction products have become the most widely used positioning technology. They possess real-time, continuous, reliable, and highly available characteristics, making them the most fundamental technology for intelligent connected vehicles to achieve autonomous driving and a guarantee of safe driving. However, in actual production processes, to ensure the quality of the solution results, production often uses primary / backup or multiple sets of production data for broadcasting. Therefore, there is an urgent need for a service optimization function that can optimize the service during intermediate processes, ensuring the highly stable and efficient operation of PPP-RTK solution data, thereby reducing configuration resources.

[0003] Currently, the preferred technology is long-lived connections, which cannot guarantee the data quality of this connection. This approach has a lack of theoretical basis and cannot guarantee the quality of the current service. Furthermore, when multiple instances are running, distributed system information synchronization cannot be achieved, which can lead to duplicate data transmission. Summary of the Invention

[0004] This invention provides a preferred method, apparatus, and system for broadcasting data based on location services, in order to improve the quality of data broadcasting and reduce the probability of data being broadcast repeatedly.

[0005] This invention provides a method for optimizing broadcast data based on location services, comprising: acquiring first service data from a RabbitMQ module; parsing and uniquely identifying the first service data; generating evaluation message data for the first service data; filtering the first service data according to the evaluation message data to obtain optimized data; and writing the optimized data into the RabbitMQ module so that a first running instance acquires and broadcasts the optimized data from the RabbitMQ module.

[0006] When the number of the first running instances is at least two, the distributed lock is authorized to each of the first running instances according to preset requirements through the Zookeeper module, so that each of the first running instances can perform data consumption tasks in turn.

[0007] As a preferred solution, this invention parses and evaluates the service code data in the RabbitMQ module, and outputs a RabbitMQ queue after optimization based on the data evaluation score for subsequent broadcasting. By optimizing the data before broadcasting, the quality of data broadcasting is improved. When multiple running instances start synchronously, the problem of duplicate data can easily occur. This invention authorizes the running instances with a distributed lock from the Zookeeper module to ensure that only one running instance acquires the distributed lock when multiple running instances are running simultaneously. That is, only one running instance can obtain the RabbitMQ consumption right, ensuring that only one running instance consumes the broadcast data, thereby improving the quality of data broadcasting and reducing the probability of duplicate data broadcasting.

[0008] As a preferred approach, before obtaining the first service data from the RabbitMQ module, the following steps are also included:

[0009] The system obtains the dynamic configuration parameters required for the first running instance and transmits the dynamic configuration parameters to the first running instance through an interface, so that the first running instance writes them into the queue of the corresponding RabbitMQ module; the dynamic configuration parameters include middleware parameters and task parameters.

[0010] When the dynamic configuration parameter acquisition fails, the current acquisition record is written to the acquisition failure log and the acquisition is attempted again after a preset time; when the number of attempts to acquire reaches the preset number, the acquisition operation is stopped.

[0011] As a preferred embodiment, before starting the running instance, the present invention obtains the distributed deployment configuration required to start the instance, so that the running instance can be successfully written to the specified RabbitMQ cluster to consume and broadcast the preferred data, thereby improving the quality of data broadcasting.

[0012] As a preferred embodiment, the dynamic configuration parameters are transmitted to the first running instance via an interface, specifically as follows:

[0013] The task parameters are configured through the DFMan module, and the startup number, startup address, and middleware parameters of the first running instance are configured through the nacos module, so that the first running instance is written into the queue of the corresponding RabbitMQ module.

[0014] As a preferred embodiment, before starting the running instance, the present invention configures the startup environment through the DFMan module and the nacos module to enable the running instance to successfully write to the specified RabbitMQ cluster, consume and broadcast the preferred data, thereby improving the quality of data broadcasting.

[0015] As a preferred embodiment, the first service data is parsed and uniquely identified to generate evaluation message data for the first service data, specifically as follows:

[0016] The RabbitMQ subscription message submodule parses the first service data, generates an evaluation score for the first service data, marks the first service data according to the evaluation score, generates a unique identifier for the first service data, and uses the first service data with the unique identifier as evaluation message data.

[0017] The evaluation message data includes an evaluation score in JSON format for each field; the evaluation score includes the satellite count score, frequency point count score, tropospheric score, and ionospheric parameter score.

[0018] As a preferred embodiment, the present invention parses the first service data through the RabbitMQ subscription message submodule, generates an evaluation score for the first service data, identifies the data based on the evaluation score, scores and filters the broadcast data, thereby improving the quality of data broadcasting.

[0019] As a preferred solution, the first service data is filtered based on the evaluation message data to obtain preferred data, specifically as follows:

[0020] By subscribing to the RabbitMQ subscription message submodule, evaluation message data is obtained, and target data for generating the master-slave link data of the RabbitMQ module is generated.

[0021] Based on the unique identifiers of the target data and the first service data, the first service data that meets the preset requirements is selected as the preferred data, and the preferred data is stored in the memory queue module.

[0022] As a preferred embodiment, the present invention parses and filters the first service data according to the target data of the master-slave link data and outputs a RabbitMQ queue for subsequent broadcasting. By optimizing the data and then broadcasting it, the quality of data broadcasting is improved.

[0023] As a preferred embodiment, after writing the preferred data into the RabbitMQ module, the method further includes:

[0024] Obtain the configuration address data of the RabbitMQ cluster and Kafka cluster managed by the Nacos module. Based on the configuration address data, write the log data of all business data to the corresponding Kafka module. The RabbitMQ cluster includes all RabbitMQ modules. The Kafka cluster includes all Kafka modules. Each Kafka module is used to record the logs of the corresponding RabbitMQ module.

[0025] As a preferred solution, this invention persists all business data and log data to disk for use by the next level, thereby achieving unified management of all business data and log data.

[0026] As a preferred embodiment, when the number of the first running instances is at least two, the distributed lock is authorized to each of the first running instances according to preset requirements through the Zookeeper module, so that each of the first running instances can perform data consumption tasks sequentially, specifically as follows:

[0027] When the number of the first running instances is at least two, before all the first running instances perform data consumption tasks, the data path of each first running instance is created and registered to the Zookeeper module, so that the Zookeeper module sends the first distributed lock to any one of the first running instances, controlling the remaining first running instances to be in a waiting state;

[0028] When the second running instance detects that it has acquired the first distributed lock, it is controlled to perform the task of consuming the preferred data. After the second running instance completes the task of consuming the preferred data, the connection between the second running instance and the Zookeeper module is disconnected. The second running instance can be any one of the first running instances.

[0029] When the Zookeeper module detects that the connection with the first running instance that has acquired the first distributed lock has been lost, it sends the second distributed lock to any of the first running instances that are in a waiting state, until all the first running instances have acquired the distributed lock.

[0030] As a preferred solution, when multiple running instances are started synchronously, the problem of duplicate data may easily occur. This invention grants the running instance a distributed lock from the Zookeeper module to ensure that only one running instance acquires the distributed lock when multiple running instances are running simultaneously. That is, only one running instance can obtain the RabbitMQ consumption right, ensuring that only one running instance consumes the broadcast data, thereby improving the quality of data broadcasting and reducing the probability of duplicate data broadcasting.

[0031] Accordingly, the present invention also provides a preferred device for broadcasting data based on location services, comprising: a filtering module, a broadcasting module, and an instance operation control module;

[0032] The filtering module is used to parse and uniquely identify the first service data, generate evaluation message data for the first service data, and filter the first service data according to the evaluation message data to obtain preferred data.

[0033] The broadcasting module is used to write the preferred data into the RabbitMQ module so that the first running instance can obtain the preferred data from the RabbitMQ module and broadcast it.

[0034] The instance operation control module is used to authorize each of the first running instances with a distributed lock according to preset requirements through Zookeeper when the number of the first running instances is at least two, so that each of the first running instances can perform data consumption tasks in sequence.

[0035] As a preferred embodiment, the encoding module of this invention parses and evaluates the service encoding data in the RabbitMQ module, and the filtering module selects the best data based on the evaluation score and outputs a RabbitMQ queue for subsequent broadcasting. The broadcasting module then broadcasts the data, improving the quality of data broadcasting. When multiple running instances start synchronously, the problem of duplicate data can easily occur. This invention authorizes the running instances with a distributed lock from the Zookeeper module through the instance running control module, ensuring that only one running instance acquires the distributed lock when multiple running instances are running simultaneously. That is, only one running instance can obtain the RabbitMQ consumption right, ensuring that only one running instance consumes the broadcast data, thus improving the quality of data broadcasting and reducing the probability of duplicate data broadcasting.

[0036] Accordingly, the present invention also provides an optimal system for broadcasting data based on location services, comprising: a RabbitMQ module, a Zookeeper module, and a control module;

[0037] The RabbitMQ module is used to store the first service data and the preferred data;

[0038] The Zookeeper module is used to authorize the distributed lock to each first running instance according to preset requirements;

[0039] The control module is used to obtain first service data from the RabbitMQ module, parse and uniquely identify the first service data, generate evaluation message data for the first service data, filter the first service data according to the evaluation message data to obtain preferred data, write the preferred data into the RabbitMQ module so that the first running instance can obtain the preferred data from the RabbitMQ module for broadcasting, and when the number of the first running instances is at least two, the distributed lock is authorized to each of the first running instances according to preset requirements through the Zookeeper module so that each of the first running instances can perform data consumption tasks in sequence.

[0040] As a preferred solution, this invention parses and evaluates the service code data in the RabbitMQ module, and outputs a RabbitMQ queue after selecting the best data based on the evaluation score for subsequent broadcasting. This improves the quality of data broadcasting. When multiple running instances start synchronously, the problem of duplicate data can easily occur. This invention authorizes the running instances with a distributed lock from the Zookeeper module to ensure that only one running instance acquires the distributed lock when multiple running instances are running simultaneously. That is, only one running instance can obtain the RabbitMQ consumption right, ensuring that only one running instance consumes the broadcast data, thereby improving the quality of data broadcasting and reducing the probability of duplicate data broadcasting.

[0041] As a preferred embodiment, the preferred system for broadcasting data based on location services further includes: a DFMan module, a nacos module, a queue module, and a kafka module;

[0042] The DFMan module is used to configure task parameters to the running instance;

[0043] The Nacos module is used to configure the startup number, startup address, and middleware parameters to the running instance.

[0044] The queue module is used to store preferred data;

[0045] The Kafka module is used to store logs of business data from the corresponding RabbitMQ module.

[0046] As a preferred embodiment, before starting the running instance, the present invention configures the startup environment through the DFMan module and the nacos module to enable the running instance to successfully write to the specified RabbitMQ cluster, store, consume and broadcast the preferred data, thereby improving the quality of data broadcasting.

[0047] Accordingly, the present invention also provides a computer-readable storage medium comprising a stored computer program; wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform a preferred method for broadcasting data based on a location service as described in the present invention. Attached Figure Description

[0048] Figure 1 This is a flowchart illustrating an embodiment of a preferred method for broadcasting data based on location services provided by the present invention.

[0049] Figure 2 This is a schematic diagram of the structure of an embodiment of the RabbitMQ message subscription and consumption submodule of a preferred method for broadcasting data based on location services provided by the present invention.

[0050] Figure 3 This is a schematic diagram of the structure of a distributed task management module of an embodiment of a preferred method for broadcasting data based on location services provided by the present invention;

[0051] Figure 4 This is a schematic diagram of the data transmission and disk storage module of an embodiment of a preferred method for broadcasting data based on location services provided by the present invention;

[0052] Figure 5 This is a flowchart illustrating an embodiment of the core algorithm of the distributed module of a preferred method for broadcasting data based on location services provided by the present invention.

[0053] Figure 6 This is a schematic diagram of the structure of a distributed module of a preferred method for broadcasting data based on location services provided by the present invention.

[0054] Figure 7 This is a flowchart illustrating an embodiment of a preferred method for broadcasting data based on location services provided by the present invention, using a distributed module.

[0055] Figure 8 This is a schematic diagram of a preferred embodiment of a location-based data broadcasting device provided by the present invention;

[0056] Figure 9 This is a schematic diagram of the structure of an embodiment of a preferred system for broadcasting data based on location services provided by the present invention.

[0057] Figure 10 This is a flowchart illustrating an embodiment of a preferred system for broadcasting data based on location services provided by the present invention. Detailed Implementation

[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] Example 1

[0060] Please refer to Figure 1 A preferred method for broadcasting data based on location services, provided by an embodiment of the present invention, includes steps S101-S103:

[0061] Step S101: Obtain the first service data in the RabbitMQ module, parse and uniquely identify the first service data, generate evaluation message data for the first service data, and filter the first service data according to the evaluation message data to obtain preferred data;

[0062] In this embodiment, obtaining the first service data in the RabbitMQ module specifically involves obtaining the SSR / OSR data of the location service as the first service data.

[0063] In this embodiment, the first service data is parsed and uniquely identified to generate evaluation message data for the first service data, specifically as follows:

[0064] The RabbitMQ subscription message submodule parses the first service data, generates an evaluation score for the first service data, marks the first service data according to the evaluation score, generates a unique identifier for the first service data, and uses the first service data with the unique identifier as evaluation message data; the evaluation message data includes the evaluation score value in JSON format for each field; the evaluation score value includes the satellite number score value, frequency point score value, tropospheric score value, and ionospheric parameter score value.

[0065] In this embodiment, the first service data is filtered based on the evaluation message data to obtain preferred data, specifically as follows:

[0066] By subscribing to the RabbitMQ subscription message submodule, evaluation message data is obtained, and target data for generating the master-slave link data of the RabbitMQ module is generated.

[0067] Based on the unique identifiers of the target data and the first service data, the first service data that meets the preset requirements is selected as the preferred data, and the preferred data is stored in the memory queue module.

[0068] In this embodiment, please refer to Figure 2 The RabbitMQ module subscribes to the RabbitMQ message subscription submodule (RMQ message subscription in the diagram) within the application. The RabbitMQ message subscription submodule confirms the consumption of the message to the RabbitMQ module and evaluates the first service data based on the number of satellites, frequency points, tropospheric and ionospheric parameters through the integrity calculation engine module. It generates an evaluation score for the first service data as integrity message data. The integrity message data contains message content, where each field of the message content has a corresponding integrity evaluation score in JSON format.

[0069] The DGDS module generates encoded data for the first service data. The first service data is marked according to the integrity evaluation score, and a unique identifier for the first service data is generated. The first service data with the unique identifier is used as evaluation message data. The evaluation message data includes the evaluation score in JSON format for each field. The evaluation score includes the satellite number score, frequency point score, tropospheric score, and ionospheric parameter score.

[0070] Evaluation message data is obtained by subscribing to the RabbitMQ subscription message submodule. This evaluation message data is then parsed to generate target data for the RabbitMQ module's master-slave link data. Based on the target data and the unique identifier of the first service data, the first service data that meets preset requirements is selected as preferred data, and this preferred data is stored in the memory queue module, which serves as a data cache within the RabbitMQ module subscription. Simultaneously, the logs of the currently subscribed data are written to the corresponding Kafka module of the RabbitMQ module, and the real-time metrics of the target data are written to Promethues for data monitoring.

[0071] In this embodiment, the integrity evaluation result of the first service data is stored in the queue of the RabbitMQ module, which evaluates the quality of the master and slave data. The PPS instance obtains the target of the master-slave link data by subscribing to the integrity evaluation module (RabbitMQ subscription message submodule), so as to select the master and slave data, confirm consumption, and store the selected data in the memory queue for consumption by the next level. This invention selects high-precision SSR / OSR data by applying integrity data evaluation. The PPS instance transmits the selected result data to RabbitMQ, thereby realizing the selection of master and slave data so that the broadcasting system can broadcast it.

[0072] In this embodiment, before obtaining the first service data from the RabbitMQ module, the following steps are also included:

[0073] The system obtains the dynamic configuration parameters required for the first running instance and transmits the dynamic configuration parameters to the first running instance through an interface, so that the first running instance writes them into the queue of the corresponding RabbitMQ module; the dynamic configuration parameters include middleware parameters and task parameters.

[0074] When the dynamic configuration parameter acquisition fails, the current acquisition record is written to the acquisition failure log and the acquisition is attempted again after a preset time; when the number of attempts to acquire reaches the preset number, the acquisition operation is stopped.

[0075] In this embodiment, the dynamic configuration parameters are transmitted to the first running instance via an interface, specifically as follows:

[0076] The task parameters are configured through the DFMan module, and the startup number, startup address, and middleware parameters of the first running instance are configured through the nacos module, so that the first running instance is written into the queue of the corresponding RabbitMQ module.

[0077] In this embodiment, before obtaining the first service data in the RabbitMQ module, the main processing involves dynamic configuration items needed before and during the execution of the instance. These mainly include the middleware RabbitMQ and Kafka service addresses, authentication and authorization, parameters that need to be specified during the use of the middleware, and DFMan task configuration for REST interaction.

[0078] In this embodiment, please refer to Figure 3 The middleware parameters and task information are configured through the distributed management module and transmitted to the running instance through the interface. The running instance is configured with the instance parameters through the DFMan module and written to the queue of the specified RabbitMQ module.

[0079] The specific parameters configured for the running instance through the DFMan module are as follows: the RabbitMQ module's queue exchange parameters, routing key, queue parameters, and Kafka parameters are transmitted to the running instance. The Kafka parameters are the configured subscription topics. The running instance is configured with the running instance's startup number and startup address, as well as the configuration parameters of the middleware used, in the nacos module (nacos environment variables in the diagram).

[0080] In this embodiment, the DFMan module returns the task parameters to the distributed management module, and the nacos environment variables return the obtained dynamic parameters to the distributed management module.

[0081] In this embodiment, data access parameter preparation is a pre-process of program execution. Failure to obtain parameters or task list records are logged and retried for 60 attempts, with one attempt every 5 seconds. The running instance PPS uploads heartbeats, and the DFMan module determines the current running status of the instance by monitoring the instance heartbeats.

[0082] Step S102: Write the preferred data into the RabbitMQ module so that the first running instance can obtain the preferred data from the RabbitMQ module and broadcast it;

[0083] In this embodiment, after writing the preferred data into the RabbitMQ module, the method further includes:

[0084] Obtain the configuration address data of the RabbitMQ cluster and Kafka cluster managed by the Nacos module. Based on the configuration address data, write the log data of all business data to the corresponding Kafka module. The RabbitMQ cluster includes all RabbitMQ modules. The Kafka cluster includes all Kafka modules. Each Kafka module is used to record the logs of the corresponding RabbitMQ module.

[0085] In this embodiment, the data sending and disk persistence module writes data through an integrated Kafka operation library, including writing business data and logs to Kafka. The Nacos module configures and manages the addresses of the Kafka and RabbitMQ clusters. All business data collection logs are persisted to disk in the corresponding Kafka module. After the optimized SSR / OSR data is returned to the RabbitMQ cluster, it is persisted to disk for use by the next level. Please refer to [reference needed]. Figure 4 The Nacos module, as part of its data sending and disk persistence module structure, includes a disk persistence module and a data output MQ submodule. The disk persistence module sends encoded structured data and LogGather structured data to rdkafka in the DPI platform, and sends the log structured data to log4cplus for encapsulation in the DPI platform. Finally, it persists the data from rdkafka and log4cplus to Kafka. The data output MQ submodule writes the selected data to the RabbitMQ module and stores it in Promethues.

[0086] Step S103: When the number of the first running instances is at least two, the distributed lock is authorized to each of the first running instances according to preset requirements through the Zookeeper module, so that each of the first running instances can perform data consumption tasks in turn.

[0087] In this embodiment, when the number of the first running instances is at least two, before all the first running instances perform data consumption tasks, the data path of each first running instance is created and registered to the Zookeeper module, so that the Zookeeper module sends the first distributed lock to any one of the first running instances, controlling the remaining first running instances to be in a waiting state;

[0088] When the second running instance detects that it has acquired the first distributed lock, it is controlled to perform the task of consuming the preferred data. After the second running instance completes the task of consuming the preferred data, the connection between the second running instance and the Zookeeper module is disconnected. The second running instance can be any one of the first running instances.

[0089] When the Zookeeper module detects that the connection with the first running instance that has acquired the first distributed lock has been lost, it sends the second distributed lock to any of the first running instances that are in a waiting state, until all the first running instances have acquired the distributed lock.

[0090] In this embodiment, multiple running instances are deployed in a distributed manner through a distributed module. The program needs to integrate Zookeeper and implement a distributed lock.

[0091] In this embodiment, please refer to Figure 5 This is the core algorithm diagram for the distributed module. The initial number of running instances is three: PPS1, PPS2, and PPS3. A distributed lock is used to assign data creation paths to each instance. The path for PPS1 is / pps / ppprtk00000003, for PPS2 it's / pps / ppprtk00000001, and for PPS3 it's / pps / ppprtk00000002. Each instance listens in real-time to see if it has acquired the distributed lock. Only instances that have acquired the distributed lock can obtain the preferred data from the RabbitMQ module. If the instance detects a disconnection from the Zookeeper module, the Zookeeper module will authorize the distributed lock to another instance, which will then perform the task of the previous instance.

[0092] Please refer to Figure 6 The distributed module has an internal structure where the first running instances are PPS1 and PPS2. The Zookeeper module sends the first distributed lock to the PPS1 instance and controls the PPS2 instance to be in a waiting state. When the PPS1 instance detects that it has acquired the first distributed lock, it controls the PPS1 instance to perform the task of consuming the preferred data from the RabbitMQ module. After the PPS1 instance completes the task of consuming the preferred data, it disconnects the connection between the PPS1 instance and the Zookeeper module.

[0093] When the Zookeeper module detects that the connection with the PPS1 instance has been lost, it sends the second distributed lock to the PPS2 instance.

[0094] Please refer to Figure 7Within the distributed module, the first running instances are PPS1 and PPS2. The Zookeeper module creates a temporary path for data and registers it for each instance, and sends the first distributed lock to any instance through the child node path of each instance's node. Each instance listens in real time to see if it has acquired the distributed lock. If the PPS1 instance does not acquire the distributed lock, it listens to the child node path of the previous node. If the PPS2 instance acquires the distributed lock, it listens to and acquires the subscription messages from the RabbitMQ module.

[0095] This invention solves the problem of data duplication during synchronization of multiple running instances. When an instance crashes, other instances can acquire locks to consume data. By integrating Zookeeper and implementing a distributed lock, it ensures that only one instance acquires the lock when multiple instances are running simultaneously, meaning only one instance can obtain RabbitMQ consumption rights. This guarantees that only one instance consumes the master and slave consumption queues of encoded data at a time, ensuring the quality of data broadcasting and avoiding the problem of data duplication.

[0096] Implementing the embodiments of the present invention has the following effects:

[0097] This invention parses and evaluates service code data in the RabbitMQ module, and outputs a RabbitMQ queue after optimization based on the data evaluation score for subsequent broadcasting. By optimizing the data before broadcasting, the quality of data broadcasting is improved. When multiple running instances start synchronously, the problem of duplicate data can easily occur. This invention authorizes the running instances with a distributed lock from the Zookeeper module to ensure that only one running instance acquires the distributed lock when multiple running instances are running simultaneously. That is, only one running instance can obtain the RabbitMQ consumption right, ensuring that only one running instance consumes the broadcast data, thereby improving the quality of data broadcasting and reducing the probability of duplicate data broadcasting.

[0098] Example 2

[0099] Please refer to Figure 8 The preferred device for broadcasting data based on location services provided in this embodiment of the invention includes: a filtering module 201, a broadcasting module 202, and an instance operation control module 203;

[0100] The filtering module 201 is used to parse and uniquely identify the first service data, generate evaluation message data of the first service data, and filter the first service data according to the evaluation message data to obtain preferred data.

[0101] The broadcasting module 202 is used to write the preferred data into the RabbitMQ module so that the first running instance can obtain the preferred data from the RabbitMQ module for broadcasting;

[0102] The instance operation control module 203 is used to authorize each of the first running instances with a distributed lock according to preset requirements through Zookeeper when the number of the first running instances is at least two, so that each of the first running instances can perform data consumption tasks in sequence.

[0103] The preferred device for broadcasting data based on location services further includes a configuration module and a data storage module.

[0104] The configuration module is used to obtain the dynamic configuration parameters required by the first running instance, and transmit the dynamic configuration parameters to the first running instance through an interface so that the first running instance writes them into the queue of the corresponding RabbitMQ module. The dynamic configuration parameters include middleware parameters and task parameters. When the dynamic configuration parameters fail to be obtained, the current acquisition record is written to the acquisition failure log and the acquisition is retried after a preset time. When the number of retried acquisitions reaches the preset number, the retried acquisition operation is stopped.

[0105] The step of transmitting the dynamic configuration parameters to the first running instance via the interface specifically involves configuring the task parameters through the DFMan module and configuring the startup number, startup address, and middleware parameters of the first running instance through the nacos module, so that the first running instance is written into the queue of the corresponding RabbitMQ module.

[0106] The data persistence module is used to obtain the configuration address data of the RabbitMQ cluster and Kafka cluster managed by the Nacos module, and based on the configuration address data, persist the log data of all business data to the corresponding Kafka module. The RabbitMQ cluster includes all RabbitMQ modules; the Kafka cluster includes all Kafka modules; each Kafka module is used to record the logs of the corresponding RabbitMQ module.

[0107] The filtering module 201 includes: a scoring unit and a filtering unit;

[0108] The scoring unit is used to parse the first service data through the RabbitMQ subscription message submodule, generate an evaluation score for the first service data, mark the first service data according to the evaluation score, generate a unique identifier for the first service data, and use the first service data with the unique identifier as evaluation message data; the evaluation message data includes the evaluation score value in JSON format for each field; the evaluation score value includes the satellite number score value, frequency point score value, tropospheric score value, and ionospheric parameter score value.

[0109] The filtering unit is used to obtain evaluation message data by subscribing to the RabbitMQ subscription message submodule, generate target data for the master-slave link data of the RabbitMQ module; select the first service data that meets the preset requirements as preferred data according to the target data and the unique identifier of the first service data, and store the preferred data in the memory queue module.

[0110] The instance operation control module 203 includes a distributed lock sending unit and a consumption optimization data unit;

[0111] The distributed lock sending unit is used to create and register the data path of each first running instance to the Zookeeper module before all the first running instances perform data consumption tasks when the number of the first running instances is at least two, so that the Zookeeper module can send the first distributed lock to any one of the first running instances and control the other first running instances to be in a waiting state.

[0112] When the Zookeeper module detects that the connection with the first running instance that has acquired the first distributed lock has been lost, it sends the second distributed lock to any of the first running instances that are in a waiting state, until all the first running instances have acquired the distributed lock.

[0113] The consumption optimization data unit is used to control the second running instance to perform the task of consuming optimization data after the second running instance detects that it has acquired the first distributed lock. After the second running instance completes the task of consuming optimization data, it disconnects the connection between the second running instance and the Zookeeper module. The second running instance can be any one of the first running instances.

[0114] The aforementioned preferred apparatus for broadcasting data based on location services can implement a preferred method for broadcasting data based on location services as described in the above method embodiments. The options in the above method embodiments are also applicable to this embodiment and will not be detailed here. The remaining content of this application's embodiments can be referred to the content of the above method embodiments, and will not be repeated in this embodiment.

[0115] Implementing the embodiments of the present invention has the following effects:

[0116] The encoding module of this invention parses and evaluates the service encoding data in the RabbitMQ module. The filtering module selects the best data based on the evaluation score and outputs a RabbitMQ queue for subsequent broadcasting. The broadcasting module then broadcasts the data, improving the quality of data broadcasting. When multiple running instances start synchronously, the problem of duplicate data can easily occur. This invention authorizes the running instances with a distributed lock from the Zookeeper module through the instance running control module. This ensures that only one running instance acquires the distributed lock when multiple running instances are running simultaneously, meaning only one running instance can obtain the RabbitMQ consumption right. This guarantees that only one running instance consumes the broadcast data, improving the quality of data broadcasting and reducing the probability of duplicate data broadcasting.

[0117] Example 3

[0118] Please refer to Figure 9 The preferred system for broadcasting data based on location services provided in this embodiment of the invention includes: a RabbitMQ module 301, a Zookeeper module 302, and a control module 303;

[0119] The RabbitMQ module 301 is used to store the first service data and the preferred data;

[0120] The Zookeeper module 302 is used to authorize the distributed lock to each first running instance according to preset requirements;

[0121] The control module 303 is used to obtain first service data from the RabbitMQ module, parse and uniquely identify the first service data, generate evaluation message data for the first service data, filter the first service data according to the evaluation message data, obtain preferred data, write the preferred data into the RabbitMQ module so that the first running instance can obtain the preferred data from the RabbitMQ module for broadcasting, and when the number of the first running instances is at least two, the distributed lock is authorized to each of the first running instances according to preset requirements through the Zookeeper module so that each of the first running instances can perform data consumption tasks in sequence.

[0122] The preferred system for broadcasting data based on location services further includes: a DFMan module, a nacos module, a queue module, and a kafka module;

[0123] The DFMan module is used to configure task parameters to the running instance;

[0124] The Nacos module is used to configure the startup number, startup address, and middleware parameters to the running instance.

[0125] The queue module is used to store preferred data;

[0126] The Kafka module is used to store logs of business data from the corresponding RabbitMQ module.

[0127] The preferred system for broadcasting data based on location services further includes: a Promethues module and a PPS3prtk instance module, wherein the Promethues module is used to store real-time indicator data;

[0128] The control module 303 is a PPS 3prtk instance module, which includes a distributed task management module, an RMQ message subscription and consumption module, a data parsing and optimization module, a data sending module, a data disk persistence module, a Zookeeper synchronization module, and a real-time metrics module.

[0129] Please refer to Figure 10 As a workflow of a preferred system for broadcasting data based on location services, the PPS3prtk instance module obtains SSR data from the RabbitMQ module as the first service data.

[0130] The distributed task management module is used to obtain the dynamic configuration parameters required by the first running instance and transmit the dynamic configuration parameters to the first running instance through an interface, so that the first running instance is written into the queue of the corresponding RabbitMQ module. The dynamic configuration parameters include middleware parameters and task parameters. When the acquisition of the dynamic configuration parameters fails, the current acquisition record is written to the acquisition failure log and the acquisition is retried after a preset time. When the number of retried acquisitions reaches a preset number, the retried acquisition operation is stopped. The task parameters are configured through the DFMan module, and the startup number, startup address, and middleware parameters of the first running instance are configured through the nacos module, so that the first running instance is written into the queue of the corresponding RabbitMQ module.

[0131] The RMQ message subscription and consumption module is used to parse the first service data, generate an evaluation score for the first service data, mark the first service data according to the evaluation score, generate a unique identifier for the first service data, and use the first service data with the unique identifier as evaluation message data; the evaluation message data includes the evaluation score value in JSON format for each field; the evaluation score value includes the satellite number score value, frequency point score value, tropospheric score value, and ionospheric parameter score value.

[0132] The data parsing and optimization module is used to obtain evaluation message data by subscribing to the RabbitMQ subscription message submodule and generate target data for the master-slave link data of the RabbitMQ module.

[0133] Based on the unique identifiers of the target data and the first service data, the first service data that meets the preset requirements is selected as the preferred data, and the preferred data is stored in the memory queue module.

[0134] The data sending module is used to write the preferred data into the RabbitMQ module;

[0135] The data persistence module is used to obtain the configuration address data of the RabbitMQ cluster and Kafka cluster managed by the Nacos module, and based on the configuration address data, persist the log data of all business data to the corresponding Kafka module; the RabbitMQ cluster includes all RabbitMQ modules; the Kafka cluster includes all Kafka modules; each Kafka module is used to record the logs of the corresponding RabbitMQ module;

[0136] The Zookeeper synchronization module is used to create and register the data path of each first running instance with the Zookeeper module before all first running instances perform data consumption tasks when there are at least two first running instances. This allows the Zookeeper module to send the first distributed lock to any one of the first running instances, keeping the remaining first running instances in a waiting state. When a second running instance detects that it has acquired the first distributed lock, the module controls the second running instance to perform the task of consuming preferred data. After the second running instance completes the task of consuming preferred data, the module disconnects the second running instance from the Zookeeper module. The second running instance can be any one of the first running instances. When the Zookeeper module detects that the connection with the first running instance that has acquired the first distributed lock has been broken, it sends the second distributed lock to any of the first running instances that are in a waiting state, until all first running instances have acquired the distributed lock.

[0137] The real-time metrics module is used to store real-time metrics into the Promethues module.

[0138] The aforementioned preferred system for broadcast data based on location services can implement a preferred method for broadcast data based on location services in the above method embodiments. The options in the above method embodiments are also applicable to this embodiment, and will not be detailed here. The remaining content of this application embodiment can be referred to the content of the above method embodiments, and will not be repeated in this embodiment.

[0139] Implementing the embodiments of the present invention has the following effects:

[0140] This invention parses and evaluates service code data in the RabbitMQ module, and outputs a RabbitMQ queue after selecting the best data based on the evaluation score for subsequent broadcasting. This improves the quality of data broadcasting. When multiple running instances start synchronously, the problem of duplicate data can easily occur. This invention authorizes the running instances with a distributed lock from the Zookeeper module to ensure that only one running instance acquires the distributed lock when multiple running instances are running simultaneously. That is, only one running instance can obtain the RabbitMQ consumption right, ensuring that only one running instance consumes the broadcast data, thereby improving the quality of data broadcasting and reducing the probability of duplicate data broadcasting.

[0141] Example 4

[0142] Accordingly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform a preferred method for broadcasting data based on a location service as described in any of the above embodiments.

[0143] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0144] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0145] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0146] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0147] Wherein, if the modules / units integrated in the terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0148] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A preferred method for broadcasting data based on location services, characterized in that, include: The system retrieves first service data from the RabbitMQ module, parses and uniquely identifies the first service data, generates evaluation message data for the first service data, filters the first service data based on the evaluation message data to obtain preferred data, and writes the preferred data into the RabbitMQ module so that the first running instance can obtain and broadcast the preferred data from the RabbitMQ module. When the number of the first running instances is at least two, the distributed lock is authorized to each of the first running instances according to preset requirements through the Zookeeper module, so that each of the first running instances can perform data consumption tasks in turn; Specifically, when the number of first running instances is at least two, the distributed lock is authorized to each first running instance according to preset requirements through the Zookeeper module, so that each first running instance can perform data consumption tasks sequentially. This is achieved by: before all first running instances perform data consumption tasks, creating and registering the data path of each first running instance with the Zookeeper module, so that the Zookeeper module sends the first distributed lock to any one of the first running instances, keeping the remaining first running instances in a waiting state; when a second running instance detects that it has acquired the first distributed lock, it is controlled to perform the task of consuming preferred data; after the second running instance completes the task of consuming preferred data, the connection between the second running instance and the Zookeeper module is disconnected; the second running instance is any one of the first running instances; when the Zookeeper module detects that the connection with the first running instance that acquired the first distributed lock has been disconnected, it sends the second distributed lock to any first running instance in a waiting state, until all first running instances have acquired the distributed lock. Specifically, the process of parsing and uniquely identifying the first service data to generate evaluation message data for the first service data involves: parsing the first service data through the RabbitMQ subscription message submodule to generate an evaluation score for the first service data; marking the first service data based on the evaluation score to generate a unique identifier for the first service data; and using the first service data with the unique identifier as evaluation message data. The evaluation message data includes JSON-formatted evaluation scores for each field. The evaluation scores include scores for the number of satellites, the number of frequency points, the tropospheric score, and the ionospheric parameter score.

2. A preferred method for broadcasting data based on location services as described in claim 1, characterized in that, Before obtaining the first service data from the RabbitMQ module, the process also includes: The system obtains the dynamic configuration parameters required for the first running instance and transmits the dynamic configuration parameters to the first running instance through an interface, so that the first running instance writes them into the queue of the corresponding RabbitMQ module; the dynamic configuration parameters include middleware parameters and task parameters. When the dynamic configuration parameter acquisition fails, the current acquisition record is written to the acquisition failure log and the acquisition is attempted again after a preset time; when the number of attempts to acquire reaches the preset number, the acquisition operation is stopped.

3. A preferred method for broadcasting data based on location services as described in claim 2, characterized in that, The step of transmitting the dynamic configuration parameters to the first running instance via the interface specifically involves: The task parameters are configured through the DFMan module, and the startup number, startup address, and middleware parameters of the first running instance are configured through the nacos module, so that the first running instance is written into the queue of the corresponding RabbitMQ module.

4. A preferred method for broadcasting data based on location services as described in claim 1, characterized in that, The step of filtering the first service data based on the evaluation message data to obtain preferred data specifically involves: By subscribing to the RabbitMQ subscription message submodule, evaluation message data is obtained, and target data for generating the master-slave link data of the RabbitMQ module is generated. Based on the unique identifiers of the target data and the first service data, the first service data that meets the preset requirements is selected as the preferred data, and the preferred data is stored in the memory queue module.

5. A preferred method for broadcasting data based on location services as described in claim 1, characterized in that, After writing the preferred data into the RabbitMQ module, the process further includes: Obtain the configuration address data of the RabbitMQ cluster and Kafka cluster managed by the Nacos module. Based on the configuration address data, write the log data of all business data to the corresponding Kafka module. The RabbitMQ cluster includes all RabbitMQ modules. The Kafka cluster includes all Kafka modules. Each Kafka module is used to record the logs of the corresponding RabbitMQ module.

6. A preferred device for broadcasting data based on location services, characterized in that, include: The module includes a filtering module, a broadcasting module, and an instance execution control module. The filtering module is used to parse and uniquely identify the first service data, generate evaluation message data for the first service data, and filter the first service data according to the evaluation message data to obtain preferred data. The broadcasting module is used to write the preferred data into the RabbitMQ module so that the first running instance can obtain the preferred data from the RabbitMQ module and broadcast it. The instance operation control module is used to authorize each of the first running instances with a distributed lock according to preset requirements through Zookeeper when the number of the first running instances is at least two, so that each of the first running instances can perform data consumption tasks in sequence. Specifically, when the number of first running instances is at least two, the distributed lock is authorized to each first running instance according to preset requirements through the Zookeeper module, so that each first running instance can perform data consumption tasks sequentially. This is achieved by: before all first running instances perform data consumption tasks, creating and registering the data path of each first running instance with the Zookeeper module, so that the Zookeeper module sends the first distributed lock to any one of the first running instances, keeping the remaining first running instances in a waiting state; when a second running instance detects that it has acquired the first distributed lock, it is controlled to perform the task of consuming preferred data; after the second running instance completes the task of consuming preferred data, the connection between the second running instance and the Zookeeper module is disconnected; the second running instance is any one of the first running instances; when the Zookeeper module detects that the connection with the first running instance that acquired the first distributed lock has been disconnected, it sends the second distributed lock to any first running instance in a waiting state, until all first running instances have acquired the distributed lock. Specifically, the process of parsing and uniquely identifying the first service data to generate evaluation message data for the first service data involves: parsing the first service data through the RabbitMQ subscription message submodule to generate an evaluation score for the first service data; marking the first service data based on the evaluation score to generate a unique identifier for the first service data; and using the first service data with the unique identifier as evaluation message data. The evaluation message data includes JSON-formatted evaluation scores for each field. The evaluation scores include scores for the number of satellites, the number of frequency points, the tropospheric score, and the ionospheric parameter score.

7. A preferred system for broadcast data based on location services, characterized in that, include: RabbitMQ module, Zookeeper module, and control module; The RabbitMQ module is used to store the first service data and the preferred data; The Zookeeper module is used to authorize the distributed lock to each first running instance according to preset requirements; The control module is used to obtain first service data from the RabbitMQ module, parse and uniquely identify the first service data, generate evaluation message data for the first service data, filter the first service data according to the evaluation message data to obtain preferred data, write the preferred data into the RabbitMQ module so that the first running instance can obtain the preferred data from the RabbitMQ module for broadcasting, and when the number of the first running instances is at least two, the distributed lock is authorized to each of the first running instances according to preset requirements through the Zookeeper module so that each of the first running instances can perform data consumption tasks in sequence. Specifically, when the number of first running instances is at least two, the distributed lock is authorized to each first running instance according to preset requirements through the Zookeeper module, so that each first running instance can perform data consumption tasks sequentially. This is achieved by: before all first running instances perform data consumption tasks, creating and registering the data path of each first running instance with the Zookeeper module, so that the Zookeeper module sends the first distributed lock to any one of the first running instances, keeping the remaining first running instances in a waiting state; when a second running instance detects that it has acquired the first distributed lock, it is controlled to perform the task of consuming preferred data; after the second running instance completes the task of consuming preferred data, the connection between the second running instance and the Zookeeper module is disconnected; the second running instance is any one of the first running instances; when the Zookeeper module detects that the connection with the first running instance that acquired the first distributed lock has been disconnected, it sends the second distributed lock to any first running instance in a waiting state, until all first running instances have acquired the distributed lock. Specifically, the process of parsing and uniquely identifying the first service data to generate evaluation message data for the first service data involves: parsing the first service data through the RabbitMQ subscription message submodule to generate an evaluation score for the first service data; marking the first service data based on the evaluation score to generate a unique identifier for the first service data; and using the first service data with the unique identifier as evaluation message data. The evaluation message data includes JSON-formatted evaluation scores for each field. The evaluation scores include scores for the number of satellites, the number of frequency points, the tropospheric score, and the ionospheric parameter score.

8. The preferred system for broadcasting data based on location services as described in claim 7, characterized in that, Also includes: The DFMan module, nacos module, queue module, and kafka module; The DFMan module is used to configure task parameters to the running instance; The Nacos module is used to configure the startup number, startup address, and middleware parameters to the running instance. The queue module is used to store preferred data; The Kafka module is used to store logs of business data from the corresponding RabbitMQ module.

Citation Information

Patent Citations

  • Double-center satellite navigation satellite-based enhancement system and correction data broadcasting method

    CN113466906A

  • Task execution method and system based on task queue

    CN113918304A