Emergency communication method and system based on mobile robot dog
By constructing a Shannon-Fanno tree on a mobile robot dog and selecting and enabling parent nodes, and using prefix-suffix codeword encoding, the data transmission efficiency at disaster sites was optimized, the communication delay problem at disaster sites was solved, the timely transmission of critical alarm information was ensured, and the effectiveness of the rescue system was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANXI BOHAO NETWORK TECH CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-05-01
AI Technical Summary
At disaster sites, the multimodal alarm data collected by mobile robot dogs has low transmission efficiency, and key alarm information cannot be transmitted in a timely and complete manner, resulting in high communication delays and low compression efficiency, which affects the timeliness and success rate of rescue decisions.
By identifying continuous character patterns in disaster alarm data, a Shannon-Fanno tree is constructed and parent nodes are selected and enabled. A prefix-suffix codeword encoding mechanism is adopted, and the compression algorithm is optimized to adapt to unstable communication conditions and improve data transmission efficiency.
Under limited bandwidth conditions, the transmission time of critical alarm information was significantly shortened, ensuring timely and complete data transmission, extending the effective working time of the mobile robot dog at the disaster site, and improving the timeliness and success rate of rescue response.
Smart Images

Figure CN121728509B_ABST
Abstract
Description
Emergency Communication Method and System Based on Mobile Robot Dog Technical Field
[0001] This invention relates to the field of emergency alarm technology. More specifically, this invention relates to an emergency communication method and system based on a mobile robotic dog. Background Technology
[0002] In disaster sites such as earthquakes, fires, and chemical leaks, timely and accurate alarm information is crucial for rescue decisions. These environments are typically characterized by high risk, structural instability, and poor communication conditions. Traditional fixed alarm systems are ineffective due to limited coverage and difficulty in reaching hazardous areas. In recent years, mobile robot dog technology has provided a new approach to disaster alarm systems, capable of carrying multimodal sensors to detect threats in areas inaccessible to humans.
[0003] Currently, disaster scene alarms mainly rely on fixed sensor networks and rudimentary mobile robot systems. Although these systems can collect environmental data, they have significant shortcomings in alarm information processing and transmission. In disaster scenes with extremely limited communication bandwidth, the transmission efficiency of large amounts of sensor data is low, resulting in high alarm information transmission delays and poor integrity.
[0004] Traditional compression algorithms, such as Shannon-Fanno tree coding, are based solely on character frequency, ignoring specific patterns of consecutive occurrences in character sequences, resulting in low compression efficiency. Secondly, in situations where communication conditions at disaster sites are unstable, the lack of adaptive compression mechanisms tailored to data characteristics prevents dynamic adjustments to compression strategies based on real-time communication conditions. This leads to high transmission delays and low compression efficiency for disaster alarm information, hindering the timeliness and effectiveness of disaster emergency responses. Particularly in bandwidth-constrained disaster environments, inefficient data transmission not only prolongs the acquisition time of critical information but also accelerates the energy consumption of mobile robotic sensors, shortening their effective working time at the disaster site and directly impacting the timeliness and success rate of rescue operations. Summary of the Invention
[0005] To address the technical problems of low data transmission efficiency and inability to transmit critical alarm information in a timely and complete manner for multimodal alarm data collected by mobile robot dogs under the condition of limited communication bandwidth at disaster sites, this invention provides solutions in the following aspects.
[0006] In a first aspect, the present invention provides an emergency communication method based on a mobile robot dog, comprising:
[0007] A mobile robot dog collects multimodal alarm data at the disaster site and encodes the multimodal alarm data into a character sequence. A Shannon-Fanno tree is constructed based on the character sequence. For each parent node in the Shannon-Fanno tree, several parent nodes are selected as active parent nodes based on the distribution of characters corresponding to all leaf nodes under the parent node in the character sequence, and corresponding characters are assigned to the active parent nodes. Encoding begins from the first character in the character sequence to obtain compressed data, including: when multiple consecutive characters in the character sequence are characters corresponding to leaf nodes under the same active parent node, the codeword of the character corresponding to the active parent node is used as a prefix codeword, and the path codeword from the active parent node to each character is used as a suffix codeword. The prefix codeword and all suffix codewords are concatenated to obtain the encoding result. All encoding results are concatenated to obtain compressed data. The compressed data is transmitted to the disaster emergency command center via an emergency communication link to realize disaster emergency alarm.
[0008] This invention identifies specific character patterns that appear consecutively in disaster alarm data and utilizes the inherent structural characteristics of disaster site data. This avoids redundant representation of repetitive patterns in traditional coding and significantly shortens the transmission time of critical alarm information under limited bandwidth conditions. After optimization and compression, the multimodal data collected by the mobile robot dog can be transmitted to the emergency command center more quickly and completely. This effectively solves the problem of information delay caused by the shortage of communication resources at disaster sites, provides timely and reliable data support for rescue decisions, and improves the overall efficiency of the disaster emergency response system.
[0009] Preferably, the step of selecting several parent nodes as enabled parent nodes and assigning corresponding characters to enabled parent nodes includes: taking the characters corresponding to all leaf nodes under the parent node as extended characters; obtaining extended substrings composed of extended characters in the character sequence; in response to the extended substring having a length equal to the number of extended characters and containing all extended characters, taking the extended substring as the target extended substring; determining the necessity of enabling the parent node based on the number of target extended substrings and the number of extended characters; obtaining the proposed enabled parent node based on the degree of the necessity of enabling; obtaining candidate characters; determining the preference of the candidate characters based on the length of the codeword of the candidate characters, the number of times the candidate characters appear in the character sequence, the number of target extended substrings, and the number of extended characters; assigning characters to the proposed enabled parent nodes based on the degree of preference, and taking the proposed enabled parent nodes with corresponding characters as enabled parent nodes.
[0010] This invention uses characters corresponding to all leaf nodes under a parent node as extended characters and identifies target extended substrings composed of these extended characters in the character sequence. This allows for the accurate capture of recurring patterns in the data. When an extended substring contains all extended characters and their lengths match, it indicates that the pattern has complete structural features and is suitable as a compression unit. The necessity of activation is determined based on the number of target extended substrings and the number of extended characters, and parent nodes to be activated are selected accordingly. This allows the system to focus on patterns that truly have compression value. The optimality is determined by comprehensively considering the codeword length, frequency of occurrence, and correlation with the target extended substring of the candidate characters, ensuring that the characters allocated to the parent node maximize compression benefits. This selection and allocation mechanism avoids processing low-value patterns, significantly improves coding efficiency, and maintains the simplicity of the coding system. It enables disaster alarm data to be transmitted in a more compact form under limited bandwidth conditions, effectively solving the problem of scarce communication resources at disaster sites.
[0011] Preferably, determining the necessity of enabling the parent node based on the number of target extended substrings and the number of extended characters includes: using the product of the number of target extended substrings and the number of extended characters as the necessity of enabling the parent node.
[0012] This invention uses the product of the number of target extended substrings and the number of extended characters as the necessity for enabling the parent node, establishing a quantitative correlation between the frequency of pattern occurrence and compression potential. The number of target extended substrings reflects the prevalence of the pattern in the data, while the number of extended characters represents the encoding space saved each time the pattern is applied. The product of the two intuitively reflects the overall compression benefit brought by enabling the parent node. This invention can automatically identify the structural features with the greatest compression potential in complex data streams, effectively improving the transmission efficiency of disaster alarm data, and is particularly suitable for bandwidth-constrained disaster site communication environments.
[0013] Preferably, obtaining the proposed parent node based on the degree of activation necessity includes: in response to the activation necessity being greater than a preset activation threshold, using the corresponding parent node as the proposed parent node.
[0014] Preferably, obtaining the candidate character includes: for any parent node to be enabled, obtaining the layer number of the parent node in the Shannon-Vanno tree. In response to And the 2nd to If a leaf node in a layer has a character that is not assigned to any of the parent nodes to be enabled, then the characters corresponding to the second to third leaves should be removed. Among the characters corresponding to the leaf nodes of the layer, those characters that have not been assigned to any parent node to be enabled are selected as candidate characters.
[0015] This invention limits the parent node to a level greater than 2 in the Shannon-Fanno tree and only considers unassigned characters from level 2 to that level as candidate characters. This ensures that the selected characters have sufficient distinguishability and representativeness, and avoids selecting characters that are too close to the root node, as these characters have too short codewords to provide enough encoding space to represent all extended characters in the subtree. At the same time, it excludes already assigned characters to prevent encoding conflicts. This ensures that the characters assigned to the parent node can effectively represent the subtree without interfering with the integrity of the existing encoding structure, thus maintaining a good hierarchical structure in the encoding system and improving the stability and reliability of disaster alarm data compression.
[0016] Preferably, determining the preference of the candidate character includes: predicting the codeword length that each target extended substring can be shortened when encoding the target extended substring using the codeword of the candidate character and the path from the proposed parent node to the extended character, based on the layer number of the proposed parent node in the Shannon-Vanno tree, the number of extended characters of the proposed parent node, and the length of the codeword of the candidate character; multiplying the prediction result by the number of target extended substrings as the total length that all target extended substrings can be shortened; predicting the total length of the marker when encoding the target extended substring using the codeword of the candidate character and the path from the proposed parent node to the extended character, based on the occurrence frequency of the candidate character and the number of target extended substrings; and subtracting the total length of the marker from the total length that all target extended substrings can be shortened to obtain the preference of the candidate character.
[0017] This invention predicts the compression benefit of the target extended substring by comprehensively considering factors such as the layer number of the parent node to be enabled, the number of extended characters, and the length of the candidate character codeword, and weighs the advantages and disadvantages with the marking overhead to determine the optimality. This achieves accurate prediction of the compression effect, can find the optimal compression strategy in complex disaster alarm data, significantly improves data transmission efficiency, and buys valuable time for disaster emergency response.
[0018] Preferably, the step of assigning characters to the proposed parent node based on the degree of preference includes: in response to the fact that among all the candidate characters of the proposed parent node, there is a candidate character with a degree of preference greater than 0, the candidate character with the highest degree of preference is assigned to the proposed parent node.
[0019] Preferably, constructing the Shannon-Vanno tree based on the character sequence includes: constructing a co-occurrence matrix of the character sequence; sorting all types of characters according to the co-occurrence matrix; and constructing the Shannon-Vanno tree according to the order of the sorted characters and the frequency of the characters.
[0020] Preferably, the step of sorting all types of characters according to the co-occurrence matrix includes: S1: Constructing an empty sequence, denoted as the sorting sequence, to store the results of sorting all types of characters; S2: Among all elements in the co-occurrence matrix whose row indices and column indices are different, the character corresponding to the row index of the element with the largest element value is taken as the target character; S3: Adding the target character to the end of the sorting sequence; S4: In the row with the target character as the row index, obtaining all elements whose column indexes are not in the sorting sequence, and taking the character corresponding to the column index of the element with the largest element value as the new target character; S5: Repeating steps S3 to S4 until all types of characters have been added to the sorting sequence and stopping the iteration.
[0021] Secondly, the present invention provides an emergency communication system based on a mobile robot dog, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned emergency communication method based on a mobile robot dog is implemented.
[0022] By adopting the above technical solution, the emergency communication method based on the mobile robot dog is generated into a computer program and stored in a memory so that it can be loaded and executed by the processor. In this way, a terminal device can be made based on the memory and the processor for convenient use.
[0023] The beneficial effects of this invention are as follows: By identifying specific character patterns that appear consecutively in disaster alarm data and employing a prefix-suffix codeword encoding mechanism, this invention improves data compression efficiency and effectively solves the technical problem of limited communication bandwidth at disaster sites; This invention optimizes the Shannon-Vanno tree construction strategy, enabling the compression algorithm to adaptively process alarm data under different scenarios, ensuring high data transmission reliability even under unstable communication conditions; This invention reduces the communication energy consumption of the mobile robot dog, extending its effective working time at disaster sites and enabling it to cover a wider monitoring area; The optimized and compressed alarm data can be transmitted to the emergency command center more quickly and completely, providing timely and accurate information support for rescue decisions and improving the timeliness and success rate of disaster emergency response. Attached Figure Description
[0024] Figure 1 is a flowchart schematically illustrating the emergency communication method based on a mobile robot dog in this invention;
[0025] Figure 2 is a schematic diagram showing the number of times each character appears in a character sequence and its frequency;
[0026] Figure 3 is a schematic diagram illustrating the Shannon-Vanno tree constructed in descending order of character frequency;
[0027] Figure 4 is a schematic diagram showing the codewords of each character corresponding to the Shannon-Fanno tree shown in Figure 3;
[0028] Figure 5 is a schematic diagram illustrating the co-occurrence matrix;
[0029] Figure 6 is a schematic diagram illustrating the Shannon-Vanno tree constructed after sorting characters according to the co-occurrence matrix;
[0030] Figure 7 is a schematic diagram showing the codewords of each character corresponding to the Shannon-Fanno tree shown in Figure 6;
[0031] Figure 8 is a schematic diagram showing the subtree corresponding to the first parent node other than the root node in Figure 3;
[0032] Figure 9 is a schematic diagram showing the subtree corresponding to the fourth parent node other than the root node in Figure 3;
[0033] Figure 10 is a schematic diagram showing the subtree corresponding to the 8th parent node other than the root node in Figure 6;
[0034] Figure 11 is a schematic diagram showing the result of assigning characters to parent nodes in the Shannon-Vanno tree as shown in Figure 3;
[0035] Figure 12 is a schematic diagram illustrating the result of assigning characters to parent nodes in the Shannon-Fanno tree shown in Figure 6. Detailed Implementation
[0036] 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, not all, of the embodiments of the present invention. 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.
[0037] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0038] This invention discloses an emergency communication method based on a mobile robot dog, referring to Figure 1, including steps S001-S005:
[0039] S001. A mobile robot dog collects multimodal disaster alarm data at the disaster site.
[0040] Specifically, the disaster alarm data includes multimodal perception data collected by sensors mounted on the mobile robot dog. At the disaster site, the mobile robot dog automatically classifies the multimodal perception data into critical alarm information and general monitoring data, with critical alarm information given the highest transmission priority. Critical alarm information includes: human thermal signals detected in thermal imaging data, concentration data of hazardous gases exceeding safety thresholds detected by toxic gas sensors, and building structure deformation data identified by lidar point cloud data. General monitoring data includes ambient temperature and humidity, regular video streams, and the robot dog's movement status.
[0041] S002. Encode the multimodal disaster alarm data into a character sequence.
[0042] It should be noted that disaster alarm data includes various data types such as numbers, characters, and dates. In order to facilitate unified compression, this invention converts disaster alarm data into character sequences.
[0043] Specifically, the disaster alarm data is encoded into a binary sequence using GB2312 encoding, and then encoded into characters using base64 encoding, resulting in a character sequence. It should be noted that this embodiment only uses GB2312 and base64 encoding as examples; in other embodiments, implementers can choose the encoding algorithm according to the actual implementation situation, such as ASCII code.
[0044] S003. Construct a Shannon-Vanno tree based on the character sequence. For each parent node in the Shannon-Vanno tree, select several parent nodes as enabled parent nodes based on the distribution of characters corresponding to all leaf nodes under the parent node in the character sequence, and assign corresponding characters to the enabled parent nodes.
[0045] Specifically, the frequency of each character in the character sequence is counted, and a Shannon-Vanno tree is constructed based on the character frequency. For each parent node in the Shannon-Vanno tree, the activation necessity of the parent node is determined based on the distribution of characters corresponding to all leaf nodes in the subtree under the parent node in the character sequence; the proposed parent nodes are obtained according to the activation necessity, and corresponding characters are assigned to each proposed parent node in descending order of activation necessity.
[0046] In one embodiment, constructing the Shannon-Fanno tree based on the frequency of characters includes:
[0047] Sort the characters in descending order of frequency, and construct a Shannon-Vanno tree based on the sorted characters and their frequencies.
[0048] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, the number of times each character appears in the character sequence and its frequency are shown in Figure 2, the constructed Shannon-Fanno tree is shown in Figure 3, and the codeword of each character is shown in Figure 4.
[0049] In another embodiment, constructing the Shannon-Fanno tree based on the frequency of characters includes:
[0050] Construct a co-occurrence matrix of the character sequence, wherein the row index of the co-occurrence matrix is each character in the character sequence, the column index is each character in the character sequence, and the element is the number of times the character corresponding to the row index of its own row and the character corresponding to the column index of its own column appear adjacent to each other in the character sequence.
[0051] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, the corresponding co-occurrence matrix is shown in Figure 5.
[0052] Furthermore, the characters of all kinds are sorted according to the co-occurrence matrix, specifically:
[0053] 1. Construct an empty sequence, denoted as the sorted sequence, to store the results of sorting all types of characters.
[0054] 2. Among all elements in the co-occurrence matrix whose row indices and column indices are different, take the character corresponding to the row index of the element with the largest element value as the target character.
[0055] 3. Add the target character to the end of the sorted sequence.
[0056] 4. In the row with the target character as the row index, obtain all elements whose column index corresponding to the character is not in the sorted sequence, and take the character corresponding to the column index of the element with the largest element value as the new target character.
[0057] 5. Repeat steps 3 to 4 until all types of characters have been added to the sorting sequence, at which point the iteration stops.
[0058] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, and the corresponding co-occurrence matrix is shown in Figure 5, an empty sorted sequence { In the co-occurrence matrix, among all elements whose row and column indices are different, the element with the largest value is identified as 10. The character corresponding to the row index of the element with the largest value is 'A'. Therefore, 'A' is selected as the target character and added to the end of the sorted sequence, updating the sorted sequence to {A}. In the row with row index 'A', all elements whose column index corresponding to a character not in the sorted sequence are retrieved. The element with the largest value is identified as 5. The character corresponding to the column index of the column containing the element with the largest value is 'B'. 'B' is selected as the new target character and added to the sorted sequence. At the end of the sorted sequence, the sorted sequence is updated to {A,B}. In the row with row index B, all elements whose column index corresponding to the character is not in the sorted sequence are retrieved. The element with the largest value is set to 1, and the character corresponding to the column index of the column containing the element with the largest value is set to D, H, or I. Any one of these characters, D, is selected as the new target character and added to the end of the sorted sequence, updating the sorted sequence to {A,B,D}. This process is repeated until the final sorted sequence is {A,B,D,C,G,E,F,H,I,L,J,K,M}.
[0059] Furthermore, a Shannon-Vanno tree is constructed according to the order of characters in the sorted sequence and the frequency of characters.
[0060] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A} and the sorted sequence is {A,B,D,C,G,E,F,H,I,L,J,K,M}, the constructed Shannon-Vanno tree is shown in Figure 6, and the codewords corresponding to each character are shown in Figure 7.
[0061] It should be noted that the purpose of this invention is to assign characters to some parent nodes in a Shannon-Fanno tree. If the characters that appear consecutively in a character sequence are the characters corresponding to the leaf nodes under the same parent node, then the codewords of the leaf nodes where the characters corresponding to the parent node are located and the codewords on the path from the parent node to the consecutively appearing characters are used to encode the consecutively appearing characters, thereby shortening the length of the encoding result of the consecutively appearing characters and thus reducing the amount of data stored in disaster alarm data.
[0062] In one embodiment, for each parent node in the Shannon-Fanno tree, determining the necessity of enabling the parent node based on the distribution of characters corresponding to all leaf nodes in the subtree under the parent node in the character sequence, and obtaining the proposed parent node to be enabled based on the magnitude of the necessity, includes:
[0063] For any parent node other than the root node, obtain the subtree in the Shannon-Vanno tree with that parent node as the highest level, and obtain the characters corresponding to all leaf nodes in the subtree as the extended characters of that parent node.
[0064] The character sequence is segmented to obtain all extended substrings of the parent node in the character sequence, where all characters in the extended substrings are extended characters of the parent node.
[0065] The length of the extended substring in response to the parent node is Furthermore, the extended substring contains all the extended characters of the parent node, and this extended substring is taken as the target extended substring of the parent node. This represents the number of extended characters of the parent node.
[0066] The necessity of enabling the parent node is determined based on the number of extended characters in the parent node and the number of target extended substrings:
[0067] ;
[0068] in, Indicates the necessity of enabling the parent node; Indicates the number of extended characters; Indicates the number of target extended substrings; This reflects the number of characters that can achieve codeword shortening when the target extended substring appears in the character sequence, if the codewords of the characters subsequently assigned to the parent node and the paths between the parent node and each extended character in the target extended substring are used to encode the target extended substring. The larger the number of characters, the greater the necessity of activating the parent node.
[0069] Furthermore, in response to a necessity for activation being greater than or equal to a preset activation threshold, the corresponding parent node is designated as the proposed parent node for activation. The activation threshold is set by the implementer based on the actual implementation situation, for example, 2.
[0070] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, and the Shannon-Vanno tree is shown in Figure 3, in the Shannon-Vanno tree shown in Figure 3, if all parent nodes other than the root node are numbered using a breadth-first search approach, then the first parent node other than the root node... The subtrees corresponding to the nodes are shown in Figure 8. The extended characters are B, C, D, H, E, F, G, I, L, J, K, and M, respectively. The extended substrings in the character sequences are {C}, {H}, {B}, {C}, {I}, {L}, {I,L}, {E}, {L,E}, {I,L,E}, {B}, {B}, {B,B}, {B}, {B,B}, {D}, {B,D}, {B,B,D}, {B}, {I}, {B,I}, {H}, {B,I,H}, {I,H}, {D}, {H,D}, {I,H,D}, {B,I} ,H,D}, {H}, {F}, {H,F}, {E}, {D}, {G}, {D,G}, {B}, {H}, {B,H}, {C}, {B,H,C}, {H,C}, {G}, {H,C,G}, {C,G}, {B,H,C,G}, {L}, {C}, {F}, {B}, {F,B}, {D}, {C}, {D,C}, {K}, {D,C,K}, {C,K}, {M}, {D,C,K,M}, {C,K,M}, {K,M}, {J}, {C,K,M,J}, {K,M,J}, {M Given the following characters: {C, J}, {D, C, K, M, J}, {E}, {B}, {E, B}, where no target extended substring exists, the necessity of using the first parent node outside the root node in Figure 3 is 0. In the Shannon-Fanno tree shown in Figure 3, the subtree corresponding to the fourth parent node outside the root node is shown in Figure 9. The extended characters are C and D, and the extended substrings in the character sequence are {C}, {C}, {D}, {D}, {D}, {C}, {D}, {C}, {D, C}, where {D, C} is the target extended substring. Therefore, the necessity of using the fourth parent node outside the root node in Figure 3 is 0. Similarly, in Figure 3, the necessity of enabling the 2nd, 3rd, 5th to 11th parent nodes outside the root node is 0, 0, 0, 0, 0, 0, 3, 2 respectively. Therefore, the 4th, 10th and 11th parent nodes outside the root node are the parent nodes to be enabled.
[0071] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, and the Shannon-Van Noah tree is as shown in Figure 6, in In the Shannon-Fanno tree shown in Figure 6, if all parent nodes other than the root node are numbered using a breadth-first search approach, the subtree corresponding to the 8th parent node outside the root node is shown in Figure 10. The extended characters are H and I, and the extended substrings in the character sequence are {H}, {I}, {I}, {H}, {I,H}, {H}, {H}, where {I,H} is the target extended substring. Therefore, the necessity of activating the 8th parent node outside the root node in Figure 6 is: Similarly, in Figure 6, the activation necessity of the 1st to 7th parent nodes and the 9th to 11th parent nodes outside the root node are 0, 0, 0, 2, 0, 0, 0, 2, 0, 3, 2 respectively. Therefore, the 4th, 8th, 10th, and 11th parent nodes outside the root node are the parent nodes to be activated.
[0072] In one embodiment, assigning corresponding characters to each parent node to be enabled in descending order of necessity includes:
[0073] The parent nodes to be enabled are sorted in descending order of their necessity for activation, and characters are assigned to each parent node in the sorted order. Specifically:
[0074] For any parent node to be enabled, obtain the level number of the parent node in the Shannon-Vanno tree, and use... express.
[0075] In response to ,or And the 2nd to The layer has no leaf nodes, or And the 2nd to The layer has leaf nodes, but the characters corresponding to all leaf nodes have been assigned to the remaining parent nodes to be enabled, and no characters are assigned to the parent node to be enabled.
[0076] In response to And the 2nd to If a leaf node in a layer has a character that is not assigned to any of the parent nodes to be enabled, then the characters corresponding to the second to third leaves should be removed. Among the characters corresponding to the leaf nodes of the layer, those characters that have not been assigned to any parent node to be enabled are selected as candidate characters.
[0077] The priority of the candidate character is determined based on the length of the codeword of the candidate character, the number of times the candidate character appears in the character sequence, the number of target extended substrings corresponding to the parent node to be used, and the number of extended characters:
[0078] ;
[0079] In the formula, Indicates the first The first one to activate the parent node The preference of each candidate character; Indicates the first The layer number of the proposed parent node in the Shannon-Vanno tree; Indicates the first The number of extended characters of the parent node to be enabled; Indicates the first The first one to activate the parent node The length of the codeword for each candidate character; Indicates the first The first one to activate the parent node The number of times each candidate character appears in the character sequence; Indicates the first The number of target extended substrings corresponding to the parent node to be enabled.
[0080] In the formula, Reflects the first When the target extended substring of the parent node to be enabled is in the character sequence, if the first... The target extended substring is encoded using paths from the parent node to each extended character in the target extended substring. The codeword length that can be shortened by each extended character in the target extended substring is then... Reflects the first When the target extended substring of the parent node to be enabled is in the character sequence, if the first... The target extended substring is encoded using the paths from the parent node to each extended character in the target extended substring, and the codeword length of each target extended substring can be shortened; when the first... When encoding each target extended substring in the character sequence using the parent node to be enabled, it is also necessary to utilize the first... The codeword pair of the candidate characters The parent node will be used for encoding to ensure that decoding is possible. Reflects the use of the first The codeword of the candidate character and the first The target extended substring is encoded by using the path from the parent node to each extended character in the target extended substring, and the codeword length of each target extended substring can be shortened. Reflects on the first Encoding all target extended substrings corresponding to the parent node in the character sequence can shorten the total codeword length.
[0081] To distinguish the actual occurrence of the first character in the character sequence in the final encoded result The codeword of the candidate character, and the codeword using the first candidate character. The codeword of the candidate character and the first The codewords used to encode the target extended substring by using the path from the parent node to each extended character in the target extended substring also need to be separately marked. In this invention, the mark length is set to 1. This indicates the total length of the tags that need to be set. Reflects the use of the first The codeword of the candidate character and the first The target extended substring is encoded by using the paths from the parent node to each extended character in the target extended substring, and the final encoded result can reduce the total length.
[0082] Furthermore, in response to the fact that among all the candidate characters of the proposed parent node, there is one with a preference degree greater than 0, the candidate character with the highest preference degree is assigned to the proposed parent node, and the proposed parent node is designated as an enabled parent node; in response to the fact that the preference degree of all candidate characters of the proposed parent node is not greater than 0, no character is assigned to the proposed parent node.
[0083] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, the Shannon-Van Noah tree is shown in Figure 3. Using a breadth-first approach, all parent nodes outside the root node are numbered. The 4th, 10th, and 11th parent nodes outside the root node are the proposed parent nodes, and their corresponding necessity for activation is 2, 3, and 2, respectively. The proposed parent nodes are then sorted in descending order of their necessity for activation, resulting in: the 10th parent node outside the root node, the 4th parent node outside the root node, and the 11th parent node outside the root node.
[0084] The 10th parent node (excluding the root node) is located at level 6 in the Shannon-Vanno tree. Furthermore, characters corresponding to leaf nodes in layers 2 to 6 are not assigned to any of the proposed parent nodes. These characters, not assigned to any of the proposed parent nodes, are considered candidate characters: A, B, C, D, H, E, F, G, I, and L. The codewords for candidate characters A, B, C, D, H, E, F, G, I, and L are 0, 100, 1010, 1011, 1100, 11010, 11011, 11100, 11101, and 11110, respectively. Their frequencies in the character sequence are 28, 9, 5, 4, 4, 3, 2, 2, 2, 2, respectively. Therefore, the priority of candidate character A is... The preference of candidate character B is The preference of candidate character C is The preference of candidate character D is The preference of the candidate character H is Similarly, the preference degrees of candidate characters E, F, G, I, and L are 6, 7, 7, 7, and 7, respectively. Since the preference degrees of candidate characters B, C, D, H, E, F, G, I, and L of the 10th parent node outside the root node are greater than 0, any one of the candidate characters F, G, I, and L with the highest preference degree is assigned to the 10th parent node outside the root node. In this embodiment, candidate character F is assigned to the 10th parent node outside the root node, and the 10th parent node outside the root node is designated as the enabled parent node.
[0085] The fourth parent node, excluding the root node, is located at level 4 in the Shannon-Vanno tree. Furthermore, characters corresponding to leaf nodes in layers 2 through 4 are not assigned to any of the proposed parent nodes. These characters, not assigned to any of the proposed parent nodes, are considered candidate characters, namely A and B. The codewords for candidate characters A and B are 0 and 100 respectively, and their occurrence frequencies in the character sequence are 28 and 9 respectively. Therefore, the priority of candidate character A is... The preference of candidate character B is Since the preference degree of the candidate characters A and B in the fourth parent node outside the root node is not greater than 0, no codeword is assigned to the fourth parent node outside the root node.
[0086] The 11th parent node (excluding the root node) is located at level 7 in the Shannon-Vanno tree. Furthermore, characters corresponding to leaf nodes in levels 2 to 7 are not assigned to any of the proposed parent nodes. These unassigned characters from the leaf nodes in levels 2 to 7 are selected as candidate characters: A, B, C, D, H, E, G, I, L, and J. The codewords for candidate characters A, B, C, D, H, E, G, I, L, and J are 0, 100, 1010, 1011, 1100, 11010, 11100, 11101, 11110, and 111110, respectively, and their frequencies in the character sequence are 28, 9, 5, and 4, respectively. 4, 3, 2, 2, 2, 1, then the preference degrees of the candidate characters A, B, C, D, H, E, G, I, L, J are -18, -1, 2, 3, 3, 3, 4, 4, 4, 4 respectively. Since the preference degree of the candidate characters C, D, H, E, G, I, L, J of the 11th parent node outside the root node is greater than 0, any one of the candidate characters G, I, L, J with the highest preference degree is assigned to the 11th parent node outside the root node. In this embodiment, the candidate character G is assigned to the 11th parent node outside the root node, and the 11th parent node outside the root node is designated as the enabled parent node.
[0087] The result of assigning characters to the parent node in the Shannon-Fanno tree shown in Figure 3 is shown in Figure 11. In Figure 11, gray nodes indicate that the parent node has been enabled.
[0088] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, the Shannon-Vanno tree is shown in Figure 6. A breadth-first search is used to... Number all parent nodes except the root node. The 4th, 8th, 10th, and 11th parent nodes outside the root node are the proposed parent nodes to be enabled. When their respective enablement necessities are 2, 2, 3, and 2, the proposed parent nodes are sorted in descending order of enablement necessity. The result is: the 10th parent node outside the root node, the 4th parent node outside the root node, the 8th parent node outside the root node, and the 11th parent node outside the root node.
[0089] For the 10th parent node (excluding the root node), its level number in the Shannon-Vanno tree is 6. The candidate characters are A, B, D, C, G, E, F, H, I, and L. The codewords of the candidate characters A, B, D, C, G, E, F, H, I, and L are 0, 100, 1010, 1011, 1100, 11010, 11011, 11100, 11101, and 11110, respectively. The frequency of their occurrences in the character sequence is 28, 9, 4, 5, 2, and 3, respectively. If the candidate characters A, B, D, C, G, E, F, H, I, and L are 2, 4, 2, and 2 respectively, then the priority of the candidate characters A, B, D, C, G, E, F, H, I, and L is -15, 2, 6, 5, 8, 6, 7, 6, 7, 7 respectively. Since the priority of the candidate characters B, D, C, G, E, F, H, I, and L of the 10th parent node outside the root node is greater than 0, the candidate character G with the highest priority is assigned to the 10th parent node outside the root node, and the 10th parent node outside the root node is designated as the enabled parent node.
[0090] For the fourth parent node outside the root node, its level number in the Shannon-Vanno tree is 4, and the candidate characters are A and B. The codewords of candidate characters A and B are 0 and 100, respectively, and the number of times they appear in the character sequence are 28 and 9, respectively. Then the preference of candidate characters A and B is -24 and -7, respectively. Since the preference of candidate characters A and B of the fourth parent node outside the root node is not greater than 0, no codeword is assigned to the fourth parent node outside the root node.
[0091] For the 8th parent node outside the root node, its level number in the Shannon-Vanno tree is 5, and the candidate characters are A, B, D, and C. The codewords of the candidate characters A, B, D, and C are 0, 100, 1010, and 1011, respectively, and the frequency of their occurrence in the character sequence is 28, 9, 4, and 5, respectively. Therefore, the preference degrees of the candidate characters A, B, D, and C are -22, -5, -1, and -2, respectively. Since the preference degrees of the candidate characters A, B, D, and C of the 8th parent node outside the root node are all not greater than 0, no codeword is assigned to the 8th parent node outside the root node.
[0092] For the 11th parent node (excluding the root node), its level number in the Shannon-Vanno tree is 7. The candidate characters are A, B, D, C, E, F, H, I, L, and J. The codewords of the candidate characters A, B, D, C, E, F, H, I, L, and J are 0, 100, 1010, 1011, 11010, 11011, 11100, 11101, 11110, and 111110, respectively. Their frequencies in the character sequence are 28, 9, 4, 5, 3, 2, 4, 2, 2, and 1, respectively. Therefore, the candidate characters A, B, and J... The preference degrees of D, C, E, F, H, I, L, and J are -18, -1, 3, 2, 3, 4, 2, 4, 4, and 4, respectively. Since the preference degrees of the candidate characters D, C, E, F, H, I, L, and J of the 8th parent node outside the root node are greater than 0, any one of the candidate characters F, I, L, and J with the highest preference degree is assigned to the 11th parent node outside the root node. In this embodiment, candidate character F is assigned to the 11th parent node outside the root node, and the 11th parent node outside the root node is designated as the enabled parent node.
[0093] The result of assigning characters to the parent node in the Shannon-Fanno tree shown in Figure 6 is shown in Figure 12. In Figure 12, gray nodes indicate that the parent node has been enabled.
[0094] S004. Encode the character sequence to obtain compressed data.
[0095] Starting from the first character in the character sequence, characters are encoded sequentially. All encoded results are then concatenated together to form compressed data. Finally, all the resulting tokens are concatenated in order to obtain a token sequence.
[0096] The encoding process is as follows:
[0097] For the character sequence of the th 1 character, when At that time, obtain the first The codeword of the leaf node corresponding to the nth character in the Shannon-Vanno tree is used as the nth... The encoding result of the first character. (Response to the first character) The first character is the character corresponding to any parent node in the Shannon-Vanno tree, and is marked with a flag of 1; otherwise, no flag is set. Next, the next character in the character sequence is encoded.
[0098] when At that time, the response is from the root node to the first node. If the path of the corresponding leaf node in the Shannon-Vanno tree does not have an enabled parent node, then the character will be... The codeword of the leaf node corresponding to the nth character in the Shannon-Vanno tree is used as the nth... The encoding result of the first character. (Response to the first character) The first character is the character corresponding to any parent node in the Shannon-Vanno tree, and is marked with a flag of 1; otherwise, no flag is set. Next, the next character in the character sequence is encoded.
[0099] when At that time, the response is from the root node to the first node. When a character exists on the path of a leaf node in the Shannon-Vanno tree with an enabled parent node, for the path from the root node to the... If any of the paths of the leaf nodes corresponding to the nth character in the Shannon-Vanno tree have an enabled parent node, then if the nth character in the character sequence... The character to the 1st The first character represents the target extended substring of the enabled parent node, and the enabled parent node is used as a candidate parent node. This indicates the number of extended characters of the enabled parent node. The candidate parent node with the largest number of extended characters is selected as the target parent node. The codeword of the leaf node corresponding to the character of the target parent node in the Shannon-Vanno tree is used as the prefix codeword. For the character sequence... The character to the 1st For any given character, take the codeword on the path from the target parent node in the Shannon-Vanno tree to that character as its suffix codeword. Then, combine the prefix codeword with the codeword of the character sequence... The character to the 1st The suffix codewords of the nth character are concatenated together to obtain the nth character in the character sequence. The character to the 1st The encoding result of each character. Simultaneously, set the flag to 0. Wherein, This indicates the number of extended characters of the target parent node. Next, we proceed with the character sequence... The encoding of each character.
[0100] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, the result after assigning characters to the parent nodes in the Shannon-Vanno tree is shown in Figure 11, and the codewords of each character are shown in Figure 4. The encoding process is as follows: For the first character A in the character sequence, the codeword 0 of A is used as the encoding result of A. Since A is not the character corresponding to any parent node, therefore... No flag is set. For the second character C in the character sequence, there is no enabled parent node on the path from the root node to the leaf node corresponding to character C. Therefore, the codeword 1010 of C is used as the encoding result of C. Since C is not the character corresponding to any parent node, no flag is set. Similarly, the encoding results of the third to 30th characters in the character sequence {A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H} are 0, 0, 1100, 0, 100, 0, 1010, 0, 11101, 11110, 11010, 0, 0, 0, 100, 100, 0 The sequence is 0, 100, 100, 1011, 0, 100, 11101, 1100, 1011, 0, 1100. Since characters 3 to 30 in the character sequence do not correspond to any parent node, no flag is set. For the 31st character F in the character sequence, there is no enabled parent node on the path from the root node to the leaf node corresponding to character F. Therefore, the codeword 11011 of F is used as the encoding result of F. Since F is the character corresponding to the 10th parent node other than the root node in Figure 11, flag 1 is set. The encoding results of characters 32 to 37 {A,E,A,A,A,D} in the character sequence are 0, 11010, 0, 0, 0 respectively. 1011, since characters 32 to 37 in the character sequence do not correspond to any parent node, no flag is set; for character G, the 38th character in the character sequence, there is no enabled parent node on the path from the root node to the leaf node corresponding to character G, so the codeword 11100 of G is used as the encoding result of G. Since G is the character corresponding to the 11th parent node outside the root node in Figure 11, flag 1 is set; the encoding results of characters {A,B,H,C} from the 39th to 42nd characters in the character sequence are 0, 100, 1100, and 1010 respectively. Since characters 39 to 42 in the character sequence do not correspond to any parent node, no flag is set.For the 43rd character G in the character sequence, there is no enabled parent node on the path from the root node to the leaf node corresponding to character G. Therefore, the codeword 11100 of G is used as the encoding result of G. Since G is the character corresponding to the 11th parent node outside the root node in Figure 11, a flag of 1 is set. The encoding results of the 44th to 52nd characters {A,A,L,A,C,A,A,A,A} in the character sequence are 0, 0, 11110, 0, 1010, 0, 0, 0, 0 respectively. Since the 44th to 52nd characters in the character sequence are not the characters corresponding to any parent node, no flag is set. For the 53rd character F in the character sequence, from the root node to the leaf node corresponding to character F... Since there are no enabled parent nodes on the path between the root node and the leaf node corresponding to F, the codeword 11011 of F is used as the encoding result of F. Because F is the character corresponding to the 10th parent node outside the root node in Figure 11, a flag of 1 is set. The encoding results of the 54th to 57th characters {B,A,D,C} in the character sequence are 100, 0, 1011, and 1010 respectively. Since the 54th to 57th characters in the character sequence are not the characters corresponding to any parent node, no flag is set. For the 58th character K in the character sequence, there are two enabled parent nodes on the path from the root node to the leaf node corresponding to character K: the 10th parent node outside the root node and the 11th parent node outside the root node in Figure 11. Since characters 58 to 59 {K,M} form the target extended substring of the 11th parent node outside the root node, this 11th parent node is selected as a candidate parent node. Similarly, since characters 58 to 60 {K,M,J} form the target extended substring of the 10th parent node outside the root node, this 10th parent node is selected as a candidate parent node. Because the number of extended characters of the 10th parent node is greater than that of the 11th parent node, it is chosen as the target parent node. The codeword 11011 of the character F corresponding to the 10th parent node is used as the prefix codeword. The codeword on the path from the 10th parent node outside the root node to the leaf node corresponding to character K is 10. The codeword on the path from the 10th parent node outside the root node to the leaf node corresponding to character M is 11. The codeword on the path from the 10th parent node outside the root node to the leaf node corresponding to character J is 0. Therefore, the encoding result of characters 58 to 60 in the character sequence is 1101110110. At the same time, the flag 0 is set. The encoding results of characters 61 to 64 {A,E,B,A} in the character sequence are 0, 11010, 100, and 0, respectively. Since characters 61 to 64 in the character sequence are not characters corresponding to any parent node, no flag is set.The compressed data is 010100011000100010100111011111101101000010010000100100101101001110111001011011011011011010000101111100100101010111000011110010100000110111000101110101110110110101000, and the tag sequence is 11110. The length of the compressed data is 172, the length of the tag sequence is 5, and the total length is 177.
[0101] For example, if the character sequence {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A} is compressed directly using the Shannon-Fanno tree shown in Figure 3, the resulting compressed sequence is 0101000110001 The compressed data has a length of 182. It can be seen that the method in this invention achieves better compression results than directly compressing the character sequence using the Shannon-Vanno tree shown in Figure 3.
[0102] For example, when the character sequence is {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A}, the result after assigning characters to the parent nodes in the Shannon-Vanno tree is shown in Figure 12, and the codewords of each character are shown in Figure 7. The compressed data is as follows: The data structure is: 010110011100010001011011101111101101000010010010010010010011101111001010011100110110110100001010110001001110010111100001111001011000110111000101010111100101000, with the tag sequence being 11110. The compressed data length is 173, the tag sequence length is 5, and the total length is 178.
[0103] For example, if the character sequence {A,C,A,A,H,A,B,A,C,A,I,L,E,A,A,A,B,B,A,A,B,B,D,A,B,I,H,D,A,H,F,A,E,A,A,A,D,G,A,B,H,C,G,A,A,L,A,C,A,A,A,A,F,B,A,D,C,K,M,J,A,E,B,A} is compressed directly according to the Shannon-Fanno tree shown in Figure 7, the resulting compressed sequence is 01011001110001000101101110111110110100001001 The compressed data has a length of 184. It can be seen that the method in this invention achieves better compression results than directly compressing the character sequence using the Shannon-Vanno tree shown in Figure 7.
[0104] Furthermore, when processing critical alarm information, the system adopts a dual encoding mechanism: on the one hand, it performs compression encoding according to the process of step S004, and on the other hand, it generates a short emergency alarm identification code with a length of 3-5 bits. This identification code is independent of the main compressed data stream and is transmitted preferentially through the emergency communication link to ensure that the disaster emergency command center can receive the most basic alarm signal even under extreme communication conditions.
[0105] S005. Transmit the compressed data to the disaster emergency command center through the emergency communication link to realize disaster emergency alarm.
[0106] Compressed data is transmitted via an emergency communication link, with data packets containing critical alarm information given the highest transmission priority. When communication bandwidth is limited, the system automatically reduces the transmission rate of general monitoring data to ensure the complete transmission of critical alarm information. Simultaneously, to ensure successful subsequent decoding, the marker sequence and Shannon-Fanno Tree data are transmitted to the disaster emergency command center.
[0107] When the emergency command center needs to view alarm information, it decompresses the received compressed data and prioritizes decoding and displaying key alarm information. When an emergency alarm identification code is detected, it immediately triggers an audible and visual alarm to remind emergency command personnel to handle the alarm event first.
[0108] The process of decompressing the received compressed data includes:
[0109] 1. Read the bit strings in the compressed data from left to right. When the read bit string corresponds to a codeword in the Shannon-Vanno tree, the character corresponding to that codeword is used as the pre-decoding character.
[0110] 2. In response to the fact that the pre-decoded character is not the character corresponding to any parent node in the Shannon-Vanno tree, the pre-decoded character is taken as a decoding result and the process jumps to step 3;
[0111] In response to the pre-decoded character being the character corresponding to any parent node in the Shannon-Vanno tree, and the first tag in the tag sequence being 1, the pre-decoded character is taken as a decoding result, the first tag in the tag sequence is removed from the tag sequence, and the process jumps to step 3.
[0112] In response to the pre-decoded character being the character corresponding to any parent node in the Shannon-Vanno tree, and the first tag in the tag sequence being 0, the subtree with the parent node corresponding to the pre-decoded character as its highest level is obtained from the Shannon-Vanno tree. The characters corresponding to all leaf nodes in this subtree are then used as extended characters. Suffix character decoding is performed: Bit strings are read from the compressed data. In response to a newly read bit string being identical to the codeword on the path from the parent node corresponding to the pre-decoded character in the Shannon-Vanno tree to any leaf node corresponding to an extended character, this extended character is used as a suffix character. The suffix character decoding operation is repeated until the number of suffix characters equals the number of extended characters. All obtained suffix characters are considered as a decoding result. The first tag in the tag sequence is removed from the tag sequence, and the process jumps to step 3.
[0113] 3. Repeat steps 1 to 2 until all bits in the compressed data have been read and traversed, then stop iterating. Concatenate all the decoded results in order to obtain the character sequence.
[0114] 4. Use base64 encoding to decode the character sequence into binary data, and use GB2312 encoding to decode the binary data to obtain disaster alarm data.
[0115] The present invention also discloses an emergency communication system based on a mobile robot dog, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the emergency communication method based on the mobile robot dog according to the present invention is implemented.
[0116] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
Claims
1. An emergency communication method based on a mobile robot dog, characterized in that, include: A mobile robot dog collects multimodal alarm data at the disaster site and encodes the multimodal alarm data into a character sequence; Construct a Shannon-Vanno tree based on the character sequence; For each parent node in the Shannon-Fanno tree, based on the distribution of characters corresponding to all leaf nodes under the parent node in the character sequence, select several parent nodes as active parent nodes and assign corresponding characters to the active parent nodes; selecting several parent nodes as active parent nodes and assigning corresponding characters to the active parent nodes includes: taking the characters corresponding to all leaf nodes under the parent node (excluding the root node) as extended characters; obtaining extended substrings composed of extended characters in the character sequence; in response to the extended substring having a length equal to the number of extended characters and containing all extended characters, taking the extended substring as the target extended substring; determining the necessity of enabling the parent node based on the number of target extended substrings and the number of extended characters; in response to If the necessity of activation exceeds a preset activation threshold, the corresponding parent node is designated as the proposed activation parent node; candidate characters are obtained; the priority of candidate characters is determined based on the length of the codeword of the candidate character, the number of times the candidate character appears in the character sequence, the number of target extended substrings of the proposed activation parent node, and the number of extended characters; in response to the fact that among all candidate characters of the proposed activation parent node, there is one with a priority greater than 0, the candidate character with the highest priority is assigned to the proposed activation parent node, and the proposed activation parent node with the corresponding character is designated as the activation parent node; encoding begins from the first character in the character sequence to obtain compressed data; the compressed data is transmitted to the disaster emergency command center through the emergency communication link to realize disaster emergency alarm.
2. The emergency communication method based on a mobile robot dog according to claim 1, characterized in that, Encoding begins from the first character of the character sequence to obtain compressed data; this includes: for the first character in the character sequence... 1 character, when At that time, the response is from the root node to the first node. When a character exists on the path of a leaf node in the Shannon-Vanno tree with an enabled parent node, for the path from the root node to the... If any of the paths of the leaf nodes corresponding to the nth character in the Shannon-Vanno tree have an enabled parent node, then if the nth character in the character sequence... The character to the 1st The first character represents the target extended substring of the enabled parent node, and the enabled parent node is used as a candidate parent node. This indicates the number of extended characters of the enabled parent node. The candidate parent node with the largest number of extended characters is selected as the target parent node, and the codeword of the leaf node corresponding to the character of the target parent node in the Shannon-Vanno tree is used as the prefix codeword; for the character sequence of the th... The character to the 1st For any given character, use the codeword on the path from the target parent node in the Shannon-Vanno tree to that character as the suffix codeword for that character. Indicates the number of extended characters of the target parent node; compares the prefix codeword with the nth character in the character sequence. The character to the 1st The suffix codewords of the nth character are concatenated together to obtain the nth character in the character sequence. The character to the 1st The encoding results of each character are obtained; all encoding results are concatenated to obtain compressed data.
3. The emergency communication method based on a mobile robot dog according to claim 2, characterized in that, The step of determining the necessity of enabling the parent node based on the number of target extended substrings and the number of extended characters includes: using the product of the number of target extended substrings and the number of extended characters as the necessity of enabling the parent node.
4. The emergency communication method based on a mobile robot dog according to claim 1, characterized in that, The process of obtaining candidate characters includes: for any parent node to be enabled, obtaining the layer number of the parent node in the Shannon-Vanno tree. In response to And the 2nd to If a leaf node in a layer has a character that is not assigned to any of the parent nodes to be enabled, then the characters corresponding to the second to third leaves should be removed. Among the characters corresponding to the leaf nodes of the layer, those characters that have not been assigned to any parent node to be enabled are selected as candidate characters.
5. The emergency communication method based on a mobile robot dog according to claim 1, characterized in that, The determination of the preference of the candidate characters includes: predicting the codeword length that each target extended substring can be shortened when encoding the target extended substring using the codeword of the candidate character and the path from the proposed parent node to the extended character, based on the layer number of the proposed parent node in the Shannon-Vanno tree, the number of extended characters of the proposed parent node, and the length of the codeword of the candidate character; multiplying the prediction result by the number of target extended substrings as the total length that all target extended substrings can be shortened; predicting the total length of the marker when encoding the target extended substring using the codeword of the candidate character and the path from the proposed parent node to the extended character, based on the occurrence frequency of the candidate character and the number of target extended substrings; and subtracting the total length of the marker from the total length that all target extended substrings can be shortened to obtain the preference of the candidate character.
6. The emergency communication method based on a mobile robot dog according to any one of claims 1-5, characterized in that, The step of constructing a Shannon-Vanno tree based on a character sequence includes: constructing a co-occurrence matrix of the character sequence; sorting all types of characters according to the co-occurrence matrix; and constructing a Shannon-Vanno tree according to the order of the sorted characters and their frequencies.
7. The emergency communication method based on a mobile robot dog according to claim 6, characterized in that, The step of sorting all types of characters according to the co-occurrence matrix includes: S1: Constructing an empty sequence, denoted as the sorting sequence, to store the results of sorting all types of characters; S2: Among all elements that are different in the co-occurrence matrix, the character corresponding to the row index of the row containing the element with the largest element value is taken as the target character; S3: Adding the target character to the end of the sorting sequence; S4: In the row with the target character as the row index, obtaining all elements whose column index is not in the sorting sequence, and taking the character corresponding to the column index of the column containing the element with the largest element value as the new target character; S5: Repeating steps S3 to S4 until all types of characters have been added to the sorting sequence and stopping the iteration.
8. An emergency communication system based on a mobile robot dog, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the emergency communication method based on a mobile robot dog according to any one of claims 1-7.
Citation Information
Patent Citations
Data analysis-based carrier communication system transmission efficiency optimization method
CN117097441A
Satellite remote sensing-based salt tide real-time monitoring method and system
CN120259908A