Method and apparatus for encoding device health information

By using recursive integer encoding and semi-fixed-length code compression of device health vectors, the problem of large data size and lack of support for detailed information in traditional DHR format is solved, achieving efficient encoding and compatibility.

CN121713178APending Publication Date: 2026-03-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Traditional Device Health Report (DHR) format data is large in size and does not support detailed health information, resulting in high storage and transmission requirements and poor compatibility with existing decoders.

Method used

The device health vector is compressed using recursive integer encoding and semi-fixed-length encoding to generate a compressed device health vector, which includes a summed binary tree and a reduced integer vector. It supports the addition of additional diagnostic information while maintaining compatibility with existing decoders.

Benefits of technology

It achieves efficient encoding of device health reports, reducing storage and transmission requirements, while supporting the addition of detailed diagnostic information and maintaining compatibility with existing decoders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121713178A_ABST
    Figure CN121713178A_ABST
Patent Text Reader

Abstract

A method and apparatus are provided for encoding device health information for remote attestation of health, where device health is represented by integer vectors, where zero values represent a state of health and non-zero values represent a state of unhealth. A summed binary tree is calculated to provide range information and size reduction of a device health vector, and a reduced integer vector representation of the summed binary tree is generated. The reduced integer vector is encoded into binary data based on a general integer code and recursive integer coding. Additional diagnostic information (also represented as an integer vector) is added by appending sub-trees to the summing binary tree and encoding each sub-tree using the same universal integer number and recursive integer coding. This encoding method provides an efficient encoding that results in a minimum data size while maintaining backward compatibility with many currently deployed decoders and verifiers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The various aspects of the disclosed embodiments generally relate to computer security, and in particular to device health certification. Background Technology

[0002] Remote attestation is the process by which a device proves the security and configuration status of its software and hardware to a trusted party. The attesting party sends information (called attestation evidence (AE)) to a verifier, which verifies and audits the information. The verifier then returns the attestation result to the trusted party.

[0003] Device health certification is an emerging approach designed to streamline remote certification by converting the AE (Active Agent) into a more user-friendly format called a device health report (DHR). The DHR is typically generated by the validator and represents the validator's ruling on the AE.

[0004] Traditional DHR formats are mostly text-based, resulting in significantly larger data sizes compared to binary formats. Traditional DHR formats often provide insufficient encoding and generate reports requiring substantial storage and bandwidth. Many traditional DHR formats do not support adding detailed health information, which is often crucial for recovery from failure states. Therefore, adding the extra information needed for failure recovery breaks backward compatibility with existing DHR formats, complicating the deployment of these advanced solutions.

[0005] Therefore, there is a need for an improved method and apparatus that provides efficient encoding while minimizing the size of the resulting DHR, and that also supports the addition of detailed health information while maintaining at least partial backward compatibility with existing decoders and validators. Accordingly, it is desirable to provide methods and apparatus that at least partially address the aforementioned problems. Summary of the Invention

[0006] The disclosed embodiments relate to a method and apparatus for achieving efficient encoding to minimize the amount of data that needs to be signed, verified, transmitted, and / or stored. In addition to a minimum data size, the encoding methods disclosed herein retain at least some backward compatibility with existing decoders and verifiers.

[0007] According to the first aspect, the above and further implementations and advantages are obtained through a method for encoding device health information. The method includes generating a device health vector, wherein the device health vector includes one or more integer values ​​representing the health of a corresponding device. When one or more corresponding device checks fail, each of the one or more integer values ​​has a value greater than zero, and when all corresponding devices in one or more corresponding devices pass checks, each of the one or more integer values ​​has a value equal to zero. The method computes a first summing binary tree, wherein the first summing binary tree includes a root and a plurality of leaf nodes, the leaf nodes being formed by the device health vector. The method constructs the first tree vector by: selecting a descendant node from each non-zero parent node in the first summing binary tree; generating a reduced integer vector, wherein the reduced integer vector includes a head following the first tree vector. The head includes the root and the length of the device health vector. The method encodes the reduced integer vector to form a compressed device health vector, wherein the root and the length of the device health vector are encoded based on a general integer code. The first tree vector is encoded based on recursive integer encoding and a first semi-fixed-length code.

[0008] In one possible implementation, the root sum is encoded based on a predetermined fixed-length code. In some embodiments, using a predetermined fixed-length code may be more advantageous than using a general integer code.

[0009] In one possible implementation, the method further includes: determining an upper bound for the root sum; and encoding the root sum based on the upper bound and a bounded semi-fixed-length code. This property of recursive integer encoding minimizes the size of the resulting compressed data by selecting shorter codewords for nodes closer to the leaf nodes.

[0010] In one possible implementation, the first integer value in the compressed device health vector is zero when the corresponding device is healthy, and non-zero when the corresponding device is unhealthy. This provides backward compatibility with existing coding systems that also use zero to represent health status.

[0011] In one possible implementation, the first semi-fixed-length code includes one or more of a mid-truncated semi-fixed-length code and an end-truncated semi-fixed-length code. The ability to use various semi-fixed-length codes provides the flexibility to tailor implementations for specific applications.

[0012] In one possible implementation, the universal integer code includes one or more of the following: Elijah Gamma code, Elijah Delta code, Exponential Golomb code, Fibonacci code, Goldbach code, and Elijah Omega code. The ability to use a variety of universal integer codes provides flexibility, which can prove useful when customizing implementations for specific applications.

[0013] In one possible implementation, the bit length used to encode descendant nodes in the tree vector is determined based on the value of the corresponding parent node. Choosing the bit length based on the parent node allows successively shorter bit lengths to be used for nodes closer to the leaf nodes.

[0014] In one possible implementation, recursive integer encoding includes interpolation encoding. Interpolation encoding is a well-understood form of recursive integer encoding and can therefore offer advantages for certain applications.

[0015] In one possible implementation, a descendant node consists of either a left child or a right child, and the selection of a descendant node is performed according to either breadth-first or depth-first order. The flexibility in how the summation binary tree is traversed allows for beneficial alternative implementations.

[0016] In one possible implementation, the steps of computing the summation binary tree and constructing the tree vector are performed in an interleaved manner. Interleaving these steps can provide economy during execution, thereby reducing computational resources such as memory consumption and processing time.

[0017] In one possible implementation, the method further includes: generating one or more diagnostic vectors, wherein each of the one or more diagnostic vectors includes additional device health information associated with a corresponding value in a device health vector; generating an extended point vector, wherein each value in the extended point vector associates a value in a device health vector with a corresponding diagnostic vector in one or more diagnostic vectors; computing a second summing binary tree including a second root node and a plurality of leaf nodes, wherein the plurality of leaf nodes include a first diagnostic vector from the one or more diagnostic vectors, and the second root node corresponds to a leaf node in the first summing binary tree. The method: constructs a second tree vector by selecting a descendant node from each non-zero parent node in the second summing binary tree; generates a second reduced integer vector including the length of the second diagnostic vector and the second tree vector; encodes the second reduced integer vector to form a compressed binary health vector, wherein the length of the second diagnostic vector is encoded based on a general integer code, and the second tree vector is encoded based on a recursive integer code and a first semi-fixed-length code. These additional method steps provide efficient encoding that also allows the inclusion of additional device health information while maintaining backward compatibility with entities using only compressed device health vectors.

[0018] In one possible implementation, the steps of computing the second summing binary tree and constructing the second tree vector are performed in an interleaved manner. Interleaving these steps can provide economy during execution, thereby reducing computational resources such as memory consumption and processing time.

[0019] According to the second aspect, the above and further implementations and advantages are obtained by means of an apparatus comprising a processor communicatively coupled to a memory, wherein the memory includes program instructions that, when executed by the processor, cause the processor to perform the method according to any one of the preceding claims.

[0020] According to the third aspect, the above and further implementation methods and advantages are obtained through a computer program product, the computer program product including a non-transitory computer-readable medium storing program instructions, which, when executed by a processor, cause the processor to perform the method according to the first aspect.

[0021] These and other aspects, implementations, and advantages of the exemplary embodiments will become apparent from the embodiments described herein in conjunction with the accompanying drawings. However, it should be understood that such description and drawings are for illustrative purposes only and should not be construed as limiting the disclosed invention; any limitation on the invention should be referenced to the appended claims. Additional aspects and advantages of the invention will be set forth in the following description, and some aspects and advantages will be apparent from the description or may be learned by practicing the invention. Furthermore, aspects and advantages of the invention may be realized and obtained by means or combinations particularly pointed out in the appended claims. Attached Figure Description

[0022] In the following detailed description of the invention, the invention will be explained in detail with reference to exemplary embodiments shown in the accompanying drawings, wherein like reference numerals denote like elements, and:

[0023] Figure 1 A flowchart is shown of an exemplary method for efficiently encoding device health information incorporating aspects of the disclosed embodiments.

[0024] Figure 2 A schematic diagram of an exemplary summation binary tree incorporating aspects of the disclosed embodiments is shown.

[0025] Figure 3 A schematic diagram is shown illustrating an exemplary method for appending additional diagnostic information to an coded DHR, incorporating aspects of the disclosed embodiments.

[0026] Figure 4 A reduced integer vector representation of an exemplary health vector with additional diagnostic vectors attached, incorporating aspects of the disclosed embodiments, is shown.

[0027] Figure 5 A flowchart is shown of an exemplary method 500 for attaching additional diagnostic information to a compression device health vector incorporating aspects of the disclosed embodiments.

[0028] Figure 6 A block diagram of an exemplary computing device incorporating aspects of the disclosed embodiments is shown. Detailed Implementation

[0029] Figure 1 A flowchart is shown of an exemplary method 100 for efficiently encoding device health information. This exemplary encoding method 100 minimizes the amount of data that needs to be signed by a proof module, verified based on the signature, transmitted over a network, and stored in memory. Since secure memory is typically much smaller than the main memory of many general-purpose computing devices, the resulting minimized data is particularly useful when performing signing or signature verification within secure memory.

[0030] The exemplary method 100 of the disclosed embodiments typically includes: generating a device health report (DHR), which provides information about the health of a computing device; and compressing the DHR using an efficient encoding process (also referred to herein as encoding). A novel data formatting scheme supports extending the device health report with additional diagnostic and health information while maintaining backward compatibility with existing decoders and validators used with non-extended device health report formats. These improvements and advantages are achieved in part by using a flexible and scalable novel data format, followed by compressing the formatted data using an efficient data compression scheme.

[0031] In one embodiment, a method for encoding device health information includes: generating a device health vector, wherein the device health vector includes one or more integer values ​​representing the health of a corresponding device. Each of the one or more integer values ​​has a value greater than zero when one or more corresponding device checks fail, and each of the one or more integer values ​​has a value equal to zero when all corresponding devices in one or more corresponding devices pass checks. The method computes a first summing binary tree, wherein the first summing binary tree includes a root and a plurality of leaf nodes formed by the device health vector. The method constructs the first tree vector by: selecting a descendant node from each non-zero parent node in the first summing binary tree; generating a reduced integer vector, wherein the reduced integer vector includes a head following the first tree vector. The head includes the root and the length of the device health vector. The method encodes the reduced integer vector to form a compressed device health vector, wherein the root and the length of the device health vector are encoded based on a general integer code. The first tree vector is encoded based on recursive integer encoding and a first semi-fixed-length code.

[0032] Exemplary method 100 is particularly useful and offers significant advantages in facilitating device health verification in remote attestation schemes. As used herein, the term remote attestation (RA) refers to the process by which a device generates cryptographically verifiable evidence (referred to as attestation evidence, AE) regarding the security and configuration state of its hardware and software. AEs typically include information such as the bootloader's identity, the integrity of the operating system (OS) kernel, and the OS state. AEs are generated through trusted mechanisms, such as within a trusted execution environment or other trusted computing environments executing within the device, making it more difficult for an attacker to compromise the AE than to compromise the verified component itself. Unfortunately, AEs typically require considerable storage space and transmission bandwidth and can be difficult to parse and evaluate.

[0033] Device health attestation (DHA) is an emerging technology designed to simplify remote attestation by converting assertions (AEs) into a more easily understood format called a device health report (DHR). The DHR is generated by an entity called the verifier and represents the verifier's ruling on the AE. Unlike the AE, the DHR typically does not include the attestation statement itself. DHA is gaining popularity, and leading companies are beginning to deploy their own DHA solutions and offer them in commercial devices. It's worth noting that in some solutions, the entity generating the DHR can be on the same physical device as the attester, or the attester can directly generate the DHR.

[0034] A Device Health Report (DHR) typically includes an overall assessment of device health but usually does not provide diagnostic information. For example, a DHR might indicate a problem with the integrity of the system software running on the device. A DHR can provide coarse-grained details about the problem, such as a failed integrity check of the OS system call table. However, a DHR typically does not include detailed diagnostic information, such as which system call table entries failed the integrity check. This more detailed diagnostic information has proven extremely useful in many situations. For example, detailed diagnostic information is very useful in determining whether a device can be restored to a known good configuration, or whether the device has been so severely damaged that a recovery image cannot be injected and loaded. Diagnostic information can also predict and prevent future attacks by providing information about which device components are the primary targets of attacks and which components are less vulnerable. Additional diagnostic information can also be analyzed using machine learning techniques to automatically detect common attack patterns and develop mitigation strategies.

[0035] Traditional DHR formats are typically text-based, relying on cumbersome formats such as XML and JSON. These text-based formats often result in reports that are an order of magnitude larger than binary formats.

[0036] Refer again Figure 1 The flowchart, exemplary method 100 generates (102) a device health vector, wherein the device health vector includes one or more integer values ​​representing the health of a corresponding device, wherein each of the one or more integer values ​​has a value greater than zero when one or more corresponding device checks fail, and wherein each of the one or more integer values ​​has a value equal to zero when all corresponding device checks in one or more corresponding device checks pass. As used herein, the terms vector and integer vector are used to describe an ordered set of one or more integer values. When used to represent device health information, such as when DHR is represented by a device health vector, each of the one or more integer values ​​is non-negative, and an integer value of zero indicates a healthy state, while an integer value greater than zero indicates an unhealthy state. Optionally, integer values ​​greater than zero can be used to provide the number of failed tests or device checks. As will be discussed further below, each position in the device health vector may be reserved as needed for certain device health checks or groups of device health checks.

[0037] In today's interconnected environment, various devices are linked together via the internet and various technologies, often referred to as the Internet of Things (IoT). Many of these interconnected devices are small sensors or other low-cost devices with limited computing resources. To ensure that device health certificates are available on these devices, it is beneficial to compress the Data Health Provider (DHR), thereby minimizing the amount of data that needs to be cryptographically signed, verified, stored in memory, or transmitted over the network.

[0038] Exemplary method 100 employs an efficient coding method 112 (referred to herein as recursive integer coding or recursive range coding) to reduce the size of the DHR. Coding begins with the computation (104) of a binary tree of sums. As used herein, a binary tree of sums refers to a pairwise binary tree of sums with the device health vector as its leaves or leaf nodes. The binary tree of sums has a root node whose value represents the sum of the leaves, referred to herein as the root sum. The computation 104 of the binary tree of sums can be conceptually viewed as an iterative process in which the pairwise sums of the leaf nodes are computed to form a first-level integer vector. The elements of the first-level integer vector can be referred to as intermediate nodes of the binary tree of sums. The number of elements in the first-level integer vector will be half the number of elements in the device health vector. The first-level integer vector is then subjected to pairwise summations to generate a second-level integer vector. This process is repeated until a vector with only one element (the root node) is reached.

[0039] Each leaf node of the summation binary tree corresponds to an integer in the device health vector. Except for leaf nodes with no descendants, every node in the summation binary tree is a parent node and has two descendant nodes. The value of each parent node represents the sum of its two descendant nodes. As used in this paper, the term "descendant node" refers to one of the two direct descendant nodes of a parent node, sometimes also called a child node. The terms "descendant" and "child node" are used interchangeably in this paper, referring to the direct descendants of the parent node.

[0040] The device health vector is an integer vector where each position in the vector represents the result of a specific device check or group of device checks. Therefore, maintaining the position of each value within the device health vector is crucial. To achieve this, it is important to select nodes in a manner that allows the decoder to determine the correct order of the device health vector when choosing descendant nodes to include in the tree vector. For example, in one embodiment, the left child node is selected. Alternatively, the order can be maintained by selecting the right child node.

[0041] Recall that a successful health check is represented by a zero value in the device health vector. Therefore, it can be expected that during normal operation, most (if not all) values ​​in the device health vector will have zero values, and a fully healthy device can be represented by a single zero-valued integer.

[0042] In a binary tree, all nodes in a subtree (e.g., subtree 222) will also have a zero value if they originate from a parent node with a value of zero (e.g., node 226). Therefore, the zero subtree 222 can be recreated by the decoder based solely on the zero-value parent node 226, and it is not necessary to include any nodes from the all-zero subtree 222 in the tree vector. The tree vector is constructed (106) by selecting a descendant node or child node from each non-zero parent node in the summing binary tree 200. Based on the parent node and the selected descendant node, another or unselected descendant node can be determined during decoding.

[0043] During the construction of the tree vector (106), the summation binary tree is traversed starting from the root and at each level of the tree in a predetermined order. The summation binary tree can be traversed in breadth-first order, as shown in the following reference. Figure 2 As shown. Alternatively, in some embodiments, it may be advantageous to traverse the summing binary tree in depth-first order.

[0044] During decoding, reconstructing the summation binary tree and the final device health vector requires not only the tree vector but also knowledge of the root sum and the length of the device health vector. It should be noted that the leaf count of the summation binary tree is equal to the length of the device health vector. To facilitate the reconstruction of the device health vector, exemplary method 100 generates (108) reduced integers, where the reduced integer vector includes a header followed by the first tree vector, where the header includes the root sum and the length of the device health vector. In some embodiments, it may be advantageous to place the root sum first in the header of the length of the device health vector. Placing the root sum first allows a validator that may not understand the complete device health vector to identify a healthy device by examining the first integer value in the device health vector. Alternatively, in some embodiments, it may be advantageous to place the length of the device health vector first, followed by the root sum.

[0045] As a final step in compression, exemplary method 100 encodes (110) the reduced integer vector to form a compressed device health vector. The compressed device health vector includes the root sum and the length of the device health vector based on general integer code encoding, followed by a first tree vector based on recursive integer encoding and a first semi-fixed-length code encoding.

[0046] As used herein, the term "general integer code" refers to a prefix code that maps non-negative integers to binary codewords. In the field of data compression, the term "general integer code" can sometimes be used to describe a narrower type of prefix code that maps only positive integers to binary codewords. However, those skilled in the art will readily recognize that this narrower interpretation can be easily extended to cover the entire set of non-negative integers by shifting the initial integer value by 1 and shifting it back during decoding. Examples of general integer codes suitable for use in exemplary method 100 include Elijah Gamma code, Elijah Delta code, exponential Golomb code, Fibonacci code, Goldbach code, and Elijah Omega code.

[0047] In one embodiment, encoding the reduced integer vector 110 includes encoding the root and sum based on a predetermined fixed-length code. The bit length of the fixed-length code used to encode the root and sum can be selected to match the bit length of a bitmap already encoded using an existing DHR encoding method. For example, the root and sum can be encoded using 32 (32) bits so that it matches the bit length of a typical computer word. Matching the bit length to an existing DHR encoding method provides backward compatibility with a large class of decoders and verifiers that have been programmed to make binary health / unhealthy determinations based on a first decoded integer value.

[0048] In some embodiments, an upper bound for the root sum can be determined. When the upper bound for the root sum can be determined, once the upper bound is determined, the root sum can be encoded using a semi-fixed-length code of bit length selected based on the determined upper bound. In some embodiments, determining the bit length during encoding can provide improved compression of the resulting binary data.

[0049] Improved compression of reduced integer vectors can be achieved by leveraging properties built into the tree vector during the construction of the 106 tree. In a summation binary tree, the boundary of each child node is a value less than or equal to the value of its parent node; that is, each child node has a value less than or equal to the value of its parent node. During the construction of the tree vector (106), the summation binary tree is traversed from the root node to the leaf nodes. By selecting the bit length used to encode the child nodes based on the value of their parent nodes, successively shorter codewords can be used as the encoding approaches the leaf nodes. This use of successively shorter codewords is referred to in this paper as recursive integer encoding or recursive range encoding.

[0050] Interpolation encoding, similar to the more general recursive integer encoding described above, was originally developed for use on sorted lists of integer values ​​(such as sorted lists used by indexing applications). In some embodiments, it may be advantageous to implement the recursive integer encoding portion of exemplary method 100 based on interpolation encoding techniques.

[0051] Several variants of semi-fixed-length codes are available, depending on which portion of the possible integer range is assigned to the shorter codeword. For example, some alternatives involve assigning the shorter codeword to integers in the middle range. Alternatively, the shorter codeword can be assigned to integers in the higher range. Assigning the shorter codeword to integers in the middle range is referred to herein as middle-truncated semi-fixed-length coding. Assigning the shorter codeword to either the high end or the low end of the integer range is referred to herein as end-truncated semi-fixed-length coding. For example, the choice of a particular variant to use can be based on information about the distribution of the integer values ​​to be encoded.

[0052] To help understand Figure 1 The exemplary method 100 shown describes each method step (e.g., the step of calculating (104) the summation of the binary tree and the step of constructing (106) the tree vector) as a separate step. It should be understood that it is not necessary or recommended to fully complete a step before starting the next step. In some embodiments, computational advantages and resource conservation can be achieved by performing certain steps (e.g., the steps of calculating (104) and selecting (106)) together in an interleaved manner, where intermediate results from one step are used in subsequent steps before the previous step is fully completed. Interleaving method steps can reduce the amount of computational resources required to generate the tree vector, such as memory and processing time. Alternatively, any or all of the steps listed in the exemplary method 100 can be interleaved as needed.

[0053] Now for reference Figure 2 A schematic diagram of an exemplary summation binary tree 200 in conjunction with various aspects of the disclosed embodiments can be seen. The summation binary tree 200 includes a root node 212 (referred to herein as root sum) and a plurality of leaf nodes 202. Each leaf node 202 is the only node in the summation binary tree 202 that has no descendant nodes, and each integer value in the device health vector corresponds to a single leaf node among the plurality of leaf nodes 202. An intermediate node 224 is included in the summation binary tree 200 to complete the binary tree between the leaf nodes 202 and the root sum 212. In addition to the leaf nodes 202, each node in the summation binary tree 200 has two descendant nodes, also referred to herein as child nodes. For example, a parent node 214 has two descendant nodes, or child nodes 214 and 216.

[0054] The summation binary tree 200 illustrates a possible example of a device health vector 202 comprising 32 integers with the following values: (0,0,0,0,0,0,5,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,12 0,0,0,0,0,0,0,0,0). In the illustrated embodiment, each position or integer value in the device health vector 202 is reserved for the result of a specific device check or group of device checks. For example, in one embodiment, the first four integers 204 may be reserved for boot integrity check results, the integer 206 at position 5 may be reserved for kernel code integrity check results, and the integer 208 at position 6 may indicate the number of unauthorized system calls in the device's OS system call table. For example, in this context, unauthorized may refer to a situation where a hash check of a system call against a whitelist fails to detect a match. In the exemplary device health vector 202, the integer at position 210 indicates the number of system calls that failed the integrity check.

[0055] The construction of the tree vector 106 is accomplished by selecting a descendant node from each non-zero parent node (e.g., selecting descendant nodes 218 and 220 from non-zero parent nodes 216 and 218, respectively). The selected node is shown in the summation binary tree 200 with shading (e.g., with shading as shown on the selected node 214). In the example shown, one of the selected descendant nodes is the left child node, and the summation binary tree 200 is traversed in breadth-first order. Alternatively, the right child node can be selected, and the tree can be traversed in depth-first order if needed. For all zero subtrees, such as the subtree typically indicated by the number 222, it is not necessary to include any child nodes in the tree vector. All zero subtrees, such as subtree 222, can be reconstructed from the zero parent node 226 during decoding.

[0056] Generating the (108) reduced integer vector is achieved by adding a header to the beginning of the tree vector. The header includes the root sum and the length of the device health vector, which is also the number of leaf nodes 202 in the summing binary tree 200. The header values ​​can be included in any desired order. In the illustrated embodiment, the root sum is placed first. In some environments, placing the root sum first can provide backward compatibility with existing devices.

[0057] The integer vector is compressed and reduced to form binary data with a minimum number of bits. Table 1 shows the encoding of the reduced integer vector into binary codewords. The first column in Table 1 shows the binary codeword used to represent each integer value in the reduced integer vector, and the second column provides additional information about the encoding. In the example shown in Table 1, the first two integer values ​​(root and leaf counts) are encoded using general Elijah-Gamab code, a concrete example of a suitable general integer code. The remaining values ​​(forming the tree vector) are encoded using recursive integer encoding and a semi-fixed-length code with intermediate truncation. The boundaries of the bit length used to select the semi-fixed-length code for each integer value in the tree vector are provided in the second column.

[0058]

[0059] In some embodiments, it may be desirable to include additional diagnostic or health information in the encoded DHR, such as a compressed device health vector generated using the exemplary method 100 described above. Including additional diagnostic information in a manner that preserves backward compatibility with existing devices, such as existing decoders and validators, provides benefits beyond what the information itself offers.

[0060] Figure 3 A schematic diagram 300 is shown illustrating an exemplary method for appending additional diagnostic information to an encoded DHR, described in conjunction with aspects of the disclosed embodiments. As an illustrative example, the above-described encoding of the exemplary diagnostic health vector 202 is extended with two additional diagnostic vectors 306, 308. Conceptually, including the additional diagnostic vectors can be viewed as appending subtrees 302, 304 to corresponding leaves 208, 312 of a summing binary tree 200. Each of the subtrees 306, 308 is itself a summing binary tree computed based on its corresponding additional diagnostic vectors 306, 308. As will be discussed further below, when the additional diagnostic health vectors are included, the first summing binary tree 200 remains unchanged and produces the same compressed device health vector, thereby maintaining backward compatibility with decoders and verifiers that can use the compressed device health vectors but do not understand the additional diagnostic information.

[0061] continue Figure 2In the previous example shown, the sixth integer 208 in the exemplary device health vector 202 corresponds to the number of system calls that failed their integrity checks. For example, knowing exactly which system calls failed can be very useful when determining recovery strategies or developing security enhancements. The results of the integrity checks can be encoded in an exemplary diagnostic vector 306, where each element corresponds to a specific system call, with a value of zero indicating a successful integrity check and a value of one indicating a failed integrity check for the corresponding system call. A second summing binary tree 302 is computed, where the root sum 208 of the second summing binary tree 302 corresponds to the associated leaf node of the first summing binary tree 200.

[0062] The second additional diagnostic vector 308, corresponding to the twenty-fourth entry in the exemplary health vector 202, includes... Figure 3 In the example shown, a third summation binary tree 304 is computed for the second additional diagnostic vector 308 during encoding preparation. It should be noted that diagnostic vectors with an odd number of elements (such as the exemplary diagnostic vector 308) can be zero-padded if necessary to facilitate the computation of the corresponding summation binary tree.

[0063] Using a similar process as described above, construct a tree vector for each of subtrees 302 and 304, where each tree vector includes a descendant node from each non-zero parent node in the corresponding subtree 302 or 304. Decoding the tree vectors to recover the corresponding diagnostic vectors requires knowing the root sum and length of the additional diagnostic vectors. The root sum is available in the diagnostic health vectors, therefore the leaf count (which is also the length of the diagnostic vector) and the tree vectors are needed in the additional data.

[0064] Figure 4 A reduced integer vector representation 400 of an exemplary health vector 406, with additional diagnostic vectors 412, 420, incorporating aspects of the disclosed embodiments, is shown. The integer representation 400 is consistent with the above references. Figure 3 The example described corresponds to this. The integer 400 represents the encoding (406) of the first summing binary tree 200, which, as described above, begins with the root and 402 and the number of leaves 404 of the exemplary summing binary tree 200, followed by the selected left child node 422.

[0065] A list of node indices that each of the diagnostic subtrees 412 and 420 depends on is appended to the encoded first tree 406. In the illustrated embodiment, the extended point vector 408 includes two indices, where a first index with a value of 5 is the index of the sixth element of the device health vector, and a second value with a value of 23 is the index of the twenty-fourth element of the device health vector. Each diagnostic subtree 412 and 420 is then encoded in the order in which they appear in the extended point vector 408. The root of each diagnostic subtree 412 and 420 is obtained from the decoded diagnostic health vector 202, so it does not need to be repeated when encoding each subtree 412 and 420. Therefore, the encoding of each diagnostic subtree begins with leaf counts 410 and 416, followed by the selected left child nodes 414 and 418 of the corresponding diagnostic subtree 412 and 420.

[0066] Finally, the integer representation of the additional diagnostic vector 422 is encoded as a binary codeword. Table 2 shows exemplary binary encodings of the additional diagnostic vectors 306 and 308 represented by the integer value 422. The first column shows the binary codeword generated for each integer value, and the second column provides notes on the encoding. Encoding of the additional diagnostic vectors begins with encoding the extended point vectors, which provide the index (5, 23) for each extended leaf node 208, 312. The integer values ​​in the extended point vectors are encoded using a general integer code, which is gamma code in the example shown.

[0067]

[0068] The leaf count or length of each additional diagnostic vector is encoded using a general integer code, which is a gamma code in the example shown in Table 2. Elements of each of the tree vectors 412 and 420 are encoded using recursive integer encoding, where integer values ​​are encoded using semi-fixed-length codes, and the bit length of the semi-fixed-length code is determined based on the value of the corresponding parent node. The integer values ​​and corresponding boundaries for each value in the tree vector are given in column 2 of Table 2.

[0069] Table 3 shows the final binary-encoded compressed device health vector of the additional diagnostic data generated for the example above. Note: Comma have been added to the data in Table 3 for readability; commas are not present in the actual binary data.

[0070]

[0071] Figure 5A flowchart illustrating an exemplary method 500 for appending additional diagnostic information to a compressed device health vector, incorporating aspects of the disclosed embodiments, is shown. The exemplary method 500 of the disclosed embodiments is adapted to add additional diagnostic or other device health information to a compressed device health vector, as described above with reference to... Figure 1 The described exemplary method 100 generates a compressed device health vector.

[0072] Exemplary method 500 begins by generating (502) one or more diagnostic vectors, wherein each of the one or more diagnostic vectors includes additional device health information associated with a corresponding value in the device health vector. Any desired diagnostic or health information may be advantageously used, wherein the desired health information is represented by one or more integer values ​​combined in the one or more diagnostic vectors. Each additional diagnostic vector provides information corresponding to one or a set of checks, as indicated by the values ​​in the device health vector. Similar to the conventions used in the device health vector, in the diagnostic vectors, a healthy state is represented by a zero value, and an unhealthy state is represented by a value greater than zero.

[0073] An extended point vector 504 is generated, where each value in the extended point vector represents an index that associates a value in the device health vector with a corresponding diagnostic vector among one or more diagnostic vectors. In one embodiment, the extended point vector includes zero-based index values ​​to identify positions within the device health vector. Each value in the extended point vector is converted to binary using any suitable general integer encoding. The binary-encoded extended point vector is then appended to the compressed device health vector.

[0074] Then, each of the one or more diagnostic vectors is encoded and appended to the final binary data in the order they appear in the extended point vector. For each diagnostic vector, a summation binary tree 506 is computed, where the summation binary tree includes a root node and multiple leaf nodes, each leaf node corresponding to a value in the diagnostic vector.

[0075] A (508) diagnostic tree vector, also referred to herein as a second tree vector, is constructed from the (506) summation binary tree by selecting a child node from each non-zero parent node in the corresponding summation binary tree. When constructing the (508) diagnostic tree vector, the order is maintained by ensuring that the summation binary tree is traversed in the same order (i.e., breadth-first or depth-first order), and the same descendant node (i.e., the same left or right child node) used when encoding the device health vector should be selected.

[0076] As discussed above, it may be advantageous to compute the (506) summation binary tree and construct the (508) tree vector in an alternating manner. In some embodiments, alternating these operations can provide computational advantages.

[0077] A (512) reduced diagnostic integer vector, also referred to herein as a second reduced integer vector, is generated for the diagnostic vector, wherein the reduced diagnostic integer vector includes the length of the diagnostic vector followed by the corresponding diagnostic tree vector. When decoding the reduced diagnostic integer vector, the root and value can be obtained from the decoded device health vector and do not need to be included in the reduced diagnostic integer vector.

[0078] The second reduced diagnostic integer vector is encoded by 512 to form a compressed binary health vector. The length of the second diagnostic vector is encoded based on a general integer code, and the second tree vector is encoded based on a recursive integer code and a first semi-fixed-length code, as described above with respect to Table 2. Any suitable general integer code can be advantageously used when encoding the length of the diagnostic vector. The tree vector is encoded based on a recursive integer code and a semi-fixed-length code, where the bit length of the semi-fixed-length code for each selected child node is determined based on the value of the corresponding parent node.

[0079] Figure 6 A block diagram of an exemplary computing device 600 incorporating aspects of the disclosed embodiments is shown. The exemplary device 600 is adapted to perform the above-referenced... Figures 1 to 5 The exemplary method 100 is described. The efficient encoding and minimal resulting dataset size produced by the exemplary method 100 reduce computational resource requirements, thereby allowing small and low-cost computing devices to be used in the exemplary computing device 600.

[0080] In one embodiment, exemplary device 600 includes a processor 602 communicatively coupled to memory 604 and a network interface 606. The processor 602 is used to interact with other networked computing devices via the network interface 606. In some embodiments, it is advantageous to include a secure execution environment 608 within device 600 to protect sensitive algorithms and prevent unauthorized access to or modification of confidential information, such as key materials.

[0081] Device 600 can be any desired type of computing or communication device, including but not limited to mobile communication devices such as smartphones, wearable devices, or tablets. In some embodiments, device 600 can be a personal computing device such as a laptop or other type of personal computing device, a server device such as a server device used in a cloud computing data center, a small sensor or other Internet of Things (IoT) type device, or any desired computing device including a processor, memory, and components for communicating via a computer network.

[0082] like Figure 6As shown in the example, processor 602 is communicatively coupled to memory 604 for reading data stored in memory 604 and performing operations thereon. In some embodiments, device 600 may also include system memory (not shown), such as a disk drive or solid-state drive for providing high-capacity long-term storage capabilities.

[0083] Processor 602 may typically include any suitable processing device, including but not limited to high-performance multi-core computer processing devices (such as those used in large cloud computing data centers), multi-core or single-core microprocessors (such as those used in workstations and laptops), processing devices in embedded systems (such as systems on a chip, SoC), or any suitable or specialized processing device (such as for mobile communication devices, smartphones, tablets, tablet computers, telecommunications equipment, and smart devices (such as sensors configured for the Internet of Things)).

[0084] Memory 604 may include any desired type or combination of computer-accessible memory, such as random-access memory (RAM), read-only memory (ROM), or other suitable types of volatile and non-volatile computer memory.

[0085] Network interface 606 is communicatively coupled to device 600 for exchanging data and messages between device 600 and other endpoints or nodes in a computer network. Network interface 606 can be any suitable type of computer network for allowing device 600 or other computerized devices to share information and resources. Network interface 606 can be adapted to use any desired network protocol to exchange information over any desired type of physical computer network medium (e.g., wired, optical, or wireless media). When operating in a virtual environment, the network can be used for communication through a virtual network existing within the virtual environment.

[0086] Wired networks include any desired type of computer network used to transmit information over network links (such as links made of wires) using electrical signals. Optical networks include any type of network used to transmit information over network links using optical signals, such as links made of optical fiber. Wireless networks include any suitable type of computer network that uses radio signals to transmit information over the air, such as Wi-Fi, Bluetooth, Long Term Evolution (LTE), or other wireless broadband communication mechanisms.

[0087] In some embodiments, device 600 includes a secure execution environment (SEE) 608, sometimes also referred to as a trusted execution environment (TEE). SEE 608 may include any desired type of secure execution environment, such as a trusted execution environment (TEE), a trusted application (TA), a trusted platform module (TPM), an enclave, or other suitable type of secure execution environment. For example, as is the case with most modern smartphones manufactured today, device 600 may include an implementation of an ARM® architecture TrustZone™ TEE.

[0088] In some embodiments, it may be advantageous to include a device health check module 610, which performs device health check operations and generates or verifies integer values ​​representing device health check results. When needed, the device health check module can be protected within a secure execution environment 608, or alternatively, it can be implemented as a separate hardware or software module stored in memory 604.

[0089] The codec module 612 may be included in some embodiments to perform the encoding and decoding required to perform the exemplary method 100 described above. The codec module 612 may be implemented as a separate hardware-based module when needed, or it may be included as a software module stored in memory 604 or protected in SEE 608.

[0090] Therefore, although the essential novel features of the invention applicable to exemplary embodiments thereof have been shown, described, and pointed out herein, it should be understood that those skilled in the art can make various omissions, substitutions, and changes to the form and details of the illustrated apparatus and methods, as well as the operational procedures, without departing from the spirit and scope of the invention. Furthermore, all combinations of those elements that are explicitly desired to perform substantially the same function in substantially the same manner to achieve the same result are within the scope of the invention. Moreover, it should be recognized that structures and / or elements shown and / or described in connection with any form or embodiment of the disclosed invention can be incorporated as general design choices into any other form or embodiment disclosed, described, or suggested. Therefore, its intent is limited only as indicated by the scope of the appended claims.

Claims

1. A method (100) for encoding device health information, characterized in that, The method includes: Generate (102) device health vector, wherein the device health vector includes one or more integer values ​​representing the health of the corresponding device, wherein each of the one or more integer values ​​has a value greater than zero when one or more corresponding devices fail the check, and each of the one or more integer values ​​has a value equal to zero when all of the one or more corresponding devices pass the check; Calculate (104) a first summing binary tree, wherein the first summing binary tree includes a root and a plurality of leaf nodes, the plurality of leaf nodes including the device health vector; The (106) first tree vector is constructed by selecting a descendant node from each non-zero parent node in the first summing binary tree; Generate (108) reduced integer vector, wherein the reduced integer vector includes a head following the first tree vector, and wherein the head includes the root and the length of the device health vector; The reduced integer vector is encoded (110) to form a compressed device health vector, wherein the root and the length of the device health vector are encoded based on a general integer code, and the first tree vector is encoded based on a recursive integer code and a first semi-fixed-length code.

2. The method (100) according to claim 1, characterized in that, The root and the sum are encoded based on a predetermined fixed-length code.

3. The method (100) according to claim 1 or 2, characterized in that, Also includes: Determine the upper bound of the root sum; The root and the bounded semi-fixed-length code are encoded based on the upper bound and the bounded semi-fixed-length code.

4. The method (100) according to any one of the preceding claims, characterized in that, When the corresponding device is healthy, the first integer value in the compression device health vector is zero; when the corresponding device is unhealthy, the first integer value is non-zero.

5. The method (100) according to any one of the preceding claims, characterized in that, The first semi-fixed-length code includes one or more of the middle truncated semi-fixed-length code and the end truncated semi-fixed-length code.

6. The method (100) according to any one of the preceding claims, characterized in that, The general integer code includes one or more of the following: Elijah Gamma code, Elijah Delta code, Exponential Columbus code, Fibonacci code, Goldbach code, and Elijah Omega code.

7. The method (100) according to any one of the preceding claims, characterized in that, The bit length used to encode descendant nodes in the tree vector is determined based on the value of the corresponding parent node.

8. The method (100) according to any one of the preceding claims, characterized in that, The recursive integer encoding includes interpolation encoding.

9. The method (100) according to any one of the preceding claims, characterized in that, A descendant node includes one of a left child node and a right child node, and the selection of a descendant node is performed according to one of breadth-first order and depth-first order.

10. The method (100) according to any one of the preceding claims, characterized in that, The steps of calculating the summation binary tree (104) and constructing the tree vector (106) are performed in an interleaved manner.

11. The method (100) according to any one of the preceding claims, characterized in that, Also includes: Generate (502) one or more diagnostic vectors, wherein each of the one or more diagnostic vectors includes additional device health information associated with a corresponding value in the device health vector; Generate (504) extended point vectors, wherein each value in the extended point vectors associates a value in the device health vector with a corresponding diagnostic vector in one or more diagnostic vectors; The calculation (506) includes a second summation binary tree comprising a second root node and a plurality of leaf nodes, wherein the plurality of leaf nodes includes a first diagnostic vector among the one or more diagnostic vectors, and the second root node corresponds to a leaf node in the first summation binary tree; The (508) second tree vector is constructed by selecting a descendant node from each non-zero parent node in the second summing binary tree; Generate (510) a second reduced integer vector including the length of the second diagnostic vector and the second tree vector; The second reduced integer vector is encoded (512) to form a compressed binary health vector, wherein the length of the second diagnostic vector is encoded based on the general integer code, and the second tree vector is encoded based on the recursive integer code and the first semi-fixed-length code.

12. The method (100) according to any one of the preceding claims, characterized in that, The steps for calculating (506) the second summing binary tree and constructing (508) the second tree vector are performed in an interleaved manner.

13. An apparatus (600), characterized in that, The processor (602) includes a processor (604) that is communicatively coupled to a memory (604), the memory (604) including program instructions that, when executed by the processor (602), cause the processor (602) to perform the method according to any one of the preceding claims.

14. A computer program product, characterized in that, The method includes a non-transitory computer-readable medium storing program instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 12.