A prefix tree-based area code query method, system and application thereof
A technology of region coding and query method, which is applied in the field of region coding query based on prefix tree, which can solve problems such as low efficiency, cumbersome query process, and waste of storage space, so as to save storage space, improve query efficiency, and optimize storage and query efficiency Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0037] like figure 1 A prefix tree-based area code query method is shown, which is used in the field of emergency broadcasting:
[0038] S1: The broadcast terminal device connects to the server and sends a heartbeat packet. The heartbeat packet will carry the data source object code of the terminal device. The components of the data source object code are 1-bit level identification code + 12-bit administrative area code + 4-bit resource type Encoding + 2-bit type sequence code + 2-bit sub-type code + 2-bit sub-type sequence code.
[0039] S2: Based on step S1, the server receives the heartbeat packet of the terminal, parses the heartbeat packet and takes out the administrative area code, takes the administrative area code as the key, the connection information of the terminal in the server and the basic information of the terminal as the value, and combines the key-value pair Put it in the prefix tree, only the leaf node of the prefix tree will store the terminal information,...
Embodiment 2
[0045] A region coding query system based on prefix tree, such as figure 2 shown, including:
[0046] The terminal is used to send the heartbeat packet carrying the code of its own data source object to the server;
[0047] The server is used to receive and parse the heartbeat packet sent from the terminal, and extract the region code from the data source object code in the heartbeat packet;
[0048] a modeling module, used for establishing a prefix tree at the server, where the prefix tree takes the area code of each terminal as the key, and takes the connection information of each terminal at the server and the basic information of the terminal as the value;
[0049] The query module is used to query the basic information of the terminal in the area in the prefix tree through the area code.
[0050] Preferably, the data source object code is composed of the following partial sequence: 1-bit level identification code+12-bit region code+4-bit resource type code+2-bit type s...
Embodiment 3
[0055] Designated area broadcasting method in emergency broadcasting system, such as image 3 and Figure 4 shown:
[0056] In the emergency broadcast system, it is necessary to send broadcast messages according to the administrative area code, and the terminal equipment connected to the server is formed into a prefix tree according to the area code. When querying, you only need to query according to the area code of the administrative area to be queried, and the area can be found. All terminal device information below, and then send a broadcast message to the device. specific:
[0057] Taking the administrative district of Wuhan as an example, the existing six terminal devices are represented by ti, where i=[1,6], and the resource codes of t1, t2, and t3 are 64201060120010314010101, 64201060120010314010102, and 64201060120010314010103, respectively. The administrative area codes are all 420106012001, indicating that these devices are located in Hubei Province (42) Wuhan Ci...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


