Continuous bar code fixed-length coding method and device based on topological event probability

By constructing triples and quadruples, the probability of topological features is calculated and compressed to generate fixed-length codes, which solves the problem of variable length of topological data analysis results, realizes the combination of topological data and machine learning, and improves data processing efficiency.

CN120952033APending Publication Date: 2025-11-14ZHEJIANG UNIVERSITY OF MEDIA AND COMMUNICATIONS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511083621.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing topological data analysis methods fail to effectively utilize topological and probabilistic information during the encoding process, resulting in complex and variable-length encodings that are difficult to integrate with machine learning.

Method used

By constructing a set of persistent homology barcodes in the form of triples, the probability of topological features is calculated and converted into quadruples. These quadruples are then sorted and compressed to generate fixed-length vector codes, which are then encoded using the probabilistic characteristics of topological events.

Benefits of technology

This method converts topology data analysis results into fixed-length codes while preserving topology information, thus bridging topology data analysis and machine learning and improving data processability and application efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120952033A_ABST
    Figure CN120952033A_ABST
Patent Text Reader

Abstract

The invention discloses a continuous bar code fixed-length coding method and device based on topological event probability, and the method comprises the steps: arranging continuous bar codes into topological events and corresponding probabilities, compressing small-probability events when needed, and converting multiple sets with an uncertain number into fixed-length codes with information loss as small as possible. The continuous bar code can be converted into machine learning input after being coded by the method, so that a bridge is established between topology analysis and machine learning. The method can be used for various occasions where continuous bar codes need to be compressed or transmitted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of topology data processing, and in particular to a method and apparatus for continuous barcode fixed-length encoding based on topology event probabilities. Background Technology

[0002] Topological data analysis is a data analysis technique widely used in scientific research and industrial production. Its function is to extract the topological information of implicit models from high-dimensional, noisy sampled data.

[0003] Topological data analysis's mathematical origins lie in the simplicial complex branch of algebraic topology. Its core concept is "persistent homology." Its engineering implementation benefits from the powerful computing capabilities of modern computers, making it possible to run algorithms based on persistent homology on large, finite datasets.

[0004] Homology (sometimes simply called "simple homology") refers to a set of groups on a simplicial complex. These groups reflect the topological properties of the simplicial complex, such as Betti numbers and connectivity, and are therefore called homology groups. The practice of using this tool to "probe" the topological properties of simplicial complexes began in the era of Poincaré's classical topology; it is a variant of the fundamental group theory on simplicial complexes. The elements of the fundamental group are one-dimensional curves on the surface of the manifold. However, the concept of "curves on the surface of the manifold" no longer applies to simplicial complexes; therefore, a sequence of vertices in space (v0,...,v...) is used instead. k These are simplexes, consisting of 1-dimensional, 2-dimensional, ..., n-dimensional simplexes formed by the edges between their vertices. The fundamental elements of a homology group are these simplexes, and the group operations are the ordered adjacencies between simplexes. Furthermore, directions are defined on the simplexes to help determine whether they form cycles.

[0005] The definition of a directed simplex is as follows: Let there be an n-dimensional simplex denoted as (v0, v1, ..., v n ), where {v0,v1...,v k Let} represent the n+1 vertices of the simplex. The direction of the directed simplex is defined by the index order of the vertices, and each edge is a one-dimensional simplex (v... i ,v j Each of them has a direction, pointing from the v corresponding to the smaller of i and j to the v corresponding to the larger of i and j.

[0006] Simplexes of different dimensions are connected by the rule that "the boundary of a higher-dimensional space is a lower-dimensional space." For a simplex (v0, v1, ..., v...), ... nA new lower-dimensional simplex can be generated by deleting one vertex and leaving the remaining vertices. (The superscript indicates that vertex v is deleted) i A face of a simplex is called a face of the original simplex. The direction of each edge of the face is the same as the direction of the original simplex. The union of all faces of a simplex is called its boundary, denoted as . Its interior is defined as the entire simplex minus the boundary, denoted as Int(v0,…v n ).

[0007] The directed simplex extends through the concept of a "chain". A k-dimensional chain on a simplex is defined as a finite standard sum:

[0008]

[0009] Where c i It is an integer and σ i It is a directed k-dimensional directed simplex. According to the definition of direction, we know that:

[0010] (v0,v1)=-(v1,v0)

[0011] Let S be a simple complex, and let C be the group denoted by k-dimensional chains on S. k C k It is a free abelian group and has a one-to-one relationship with a k-dimensional chain on S.

[0012] The chain itself also constitutes a group. Let σ = (v0,...,v...) k ) is a k-dimensional simplex, and it is the chain group C. k An element is defined with boundary operations: C k →C k-1 It is homomorphic to the following definition:

[0013]

[0014] Among them, the directional simplex It is the i-th face obtained by deleting the i-th vertex of σ.

[0015] C k subgroup Z k It is C k The nucleus, that is

[0016]

[0017] Z k It is called a loop, and the boundary operations in k+1 dimensions are like C. k subgroup B k ,Right now

[0018]

[0019] B k This is called the containment boundary. A provable group. It is an abelian group, and the topological space constructed from it is a chain complex. In a chain complex, the boundary is B. k It is ring Z k Part of it.

[0020] With the above preparations, we can define the homology group H on the simple complex S. k :

[0021] H k 9S)=Z k / B k

[0022] H k It is Z k With B k The quotient group. In other words, H is the quotient group when not all k-dimensional cycles on S are boundaries. k Non-empty, geometrically this means that there exist k-dimensional holes in S, and the number of holes, i.e., the Betti number, is the group H. k rank:

[0023] β k =rank(H k (S))

[0024] Homology theory on simplexes and simplex complexes is one of the origins of algebraic topology. The descriptions using Abelian groups as tools are the most common, but there are also scattered articles that use other abstract algebraic tools, such as ordinary groups (which do not require the commutativity of Abelian groups) or category theory.

[0025] The persistent cohomology method is an engineering implementation of cohomology theory, a method for computing the topological properties of a space across a series of varying scales. Properties that can be "persistently" maintained across scales are considered more likely to be properties of the underlying space, rather than being affected by sampling methods, noise, or parameter choices.

[0026] To discover continuous cohomology in a space, this space must first be represented as a simplicial complex of topological homeomorphism. That is, a distance function is defined on the space, and a filter is defined based on this function, which outputs a subset of continuous simplicial complexes. Specifically, Cech filters, Alpha filters, Vietoris-Rips filters, Witness filters, etc., can be used.

[0027] It is generally believed that the origin of the persistent homology method lies in the discovery by mathematician Patrizio Frosini in 1990 that a 1D curve is equivalent to a 0D persistent homology. Vanessa Robins, about 10 years later, studied the image of a homomorphism introduced by inclusion operations between simplistic complexes. Subsequently, Herbert Edelsbrunner et al. formally introduced the definition of persistent homology, proposed specific algorithms, and suggested a method for visualizing the results as a persistent homology diagram. Gunnar Carlsson was a key researcher and promoter of this technique; he re-expressed the original definition more rigorously using the language of abstract algebra and invented a visualization tool equivalent to a persistent homology diagram, called a persistent barcode. Thanks to the promotion by Gunnar Carlsson et al., topological data analysis techniques based on continuous homology methods have been widely applied in various fields such as chemistry, biology, and image processing. Due to the inherent stability of topological properties, it has become a commonly used and reliable data analysis technique, achieving excellent results in areas such as type 2 diabetes subtype determination, CT image analysis, ribonucleic acid sequence classification, and AI security.

[0028] The input for topological data analysis is a point cloud. The process involves selecting a filter according to the aforementioned persistent cohomology theory, traversing the data space, and outputting a persistent cohomology representation, including a persistent barcode or a persistent diagram. The persistent cohomology representation displays the topological characteristics of the data, including connectivity and Betti number. The entire process is as follows:

[0029] 1. Apply a filter to the input data to extract the sub-complex sequence.

[0030] 2. Construct a high-dimensional complex using a boundary matrix simplification algorithm.

[0031] 3. Output the topological structure of the persistent barcode, persistent homology map, or other persistent homology representation.

[0032] 4. Adjust the filter parameters, increase ε by a small amount, and repeat step 1.

[0033] The output of topological data analysis is a multi-set of indefinite size, which is usually represented as a continuous barcode or continuous homology graph for human understanding.

[0034] "Variable size" poses a challenge for applications and storage because some valuable applications require fixed-size data, such as neural network-based machine learning. For example, the earliest experimentally successful neural network system, the perceptron, used input data of the number of pixels in an image of a handwritten digit—a fixed-dimensional vector. The convolutional neural networks that subsequently sparked the AI ​​boom also primarily used images as input, with a fixed dimension—the number of pixels in the image. When the image size was inappropriate, preprocessing was necessary. One of the foundations for machine learning's breakthroughs in natural language processing is the "word embedding" technique, which feeds words (tokens) into a high-dimensional vector space, thus giving each token a fixed-length representation. Platforms like chat-GPT, which triggered the recent AI boom, are based on the Transformer architecture. Their basic approach is to use a fixed-length token sequence as input and continuously predict the probability of the next token appearing.

[0035] In general, machine learning is a technique for fitting implicit functions in a high-dimensional space. The dimension of the high-dimensional space, i.e., the length of the input data, is a prerequisite parameter; inputs of indefinite length are inconvenient to process. To input the valuable topological information of implicit functions obtained from topological data analysis into a machine learning system and combine the two techniques, the problem of fixed-length encoding needs to be solved first. Therefore, the method described in this invention for encoding the output of topological data analysis into fixed-length data serves as a bridge connecting topological data analysis and machine learning.

[0036] There are several papers that convert topological analysis results into vectors, including:

[0037] Bubenik et al. (Bubenik, P. (2015). Statistical topological data analysis using persistence landscapes. J.Mach.Learn.Res. 16, 77-102.) proposed a technique called Persistence Landscape, which defines an invertible mapping that maps persistent landscapes to Banach or Hilbert spaces, and proved its stability. The persistent landscape λ is defined as follows:

[0038] λ:N×R→R

[0039] For a continuous homology graph D={(b i ,d i )} i∈i Define an auxiliary function f (b,d)(t) = max{0, min(tb, dt)}, where b <d,

[0040]

[0041] kmax represents the k-th largest element.

[0042] Developed based on the work of Bubenik et al., persistent homology images are another vectorization method (Adams H, Emerson T, Kirby M, et al. Persistence images: Astable vector representation of persistent homology[J]. Journal of Machine Learning Research, 2017, 18(8): 1-35.). It first transforms the elements of the persistent homology image from a "birth-death" structure to a "birth-lifetime" structure, that is:

[0043]

[0044] Then for each u∈R 2 Define function φ n φ selected in the literature n It is a standard symmetric Gaussian distribution, and E[φ] n ] = u.

[0045] Define another weight function f:R 2 →R ≥0 And f {0}×R ≡0, then discretize R2 using a standard grid structure, with each cell corresponding to a pixel, and its value is:

[0046]

[0047] Betti curves (Umeda Y. Time series classification via topological data analysis[J]. Information and Media Technologies, 2017, 12: 228-239.) are a simple representation of a continuous homology graph. Given a continuous homology graph D and a weight function w: R²→R, its Betti curve is the function β: R→R, defined as:

[0048]

[0049] Where I is an indicator function.

[0050]

[0051] The existing papers on the above-mentioned technologies have the following drawbacks:

[0052] 1) All these papers treat the encoded object as an abstract mathematical object, neglecting its topological and probabilistic implications. However, continuous homology barcodes are not meaningless sets of numbers; they describe rich information such as "how many rings there are in a certain dimension, and how high the probability is." This information can play a crucial role in efficient encoding, but it has not been utilized in these papers.

[0053] 2) The mathematical tool for topological data analysis is algebraic topology. Due to researchers’ inertia, many abstract algebraic methods have been used in the design of coding schemes, making the representation and calculation very complicated.

[0054] 3) When the given output encoding length is insufficient, the "tail" of the data must be compressed reasonably. This reasonableness comes from the sorting of topological and probabilistic information in 1), which is not addressed in these papers.

[0055] These shortcomings reflect the characteristics of academic research: a pursuit of mathematical elegance and purity, with less attention paid to engineering feasibility. Summary of the Invention

[0056] The purpose of this invention is to address the shortcomings of existing technologies by proposing a method and apparatus for continuous barcode fixed-length encoding based on topological event probability.

[0057] The objective of this invention is achieved through the following technical solution: Firstly, this invention provides a method for fixed-length encoding of continuous barcodes based on topological event probability, the method comprising the following steps:

[0058] (1) Construct a set of continuous homology barcodes in the form of triples based on topological structure data. The triple elements include the topological feature dimension and the times of appearance and disappearance during the filtering process.

[0059] (2) Calculate the probability of the topological features associated with each barcode and put them into triples to construct quaternions;

[0060] (3) Sort the appearance and disappearance times of the triplet elements in the barcode set together in ascending order, remove duplicate values, and obtain the time series set ε′ of the barcode. k ,{ε′ k |1≤k≤N,N≤2M}, where N is the number of time points in the time series set and M is the total number of barcodes;

[0061] (4) Define the variable s representing the topological structure and its probability:

[0062] s=((c0,c1...cj ...c D ),q)

[0063] (c0,c1...c j ...c D ) is a D+1 dimensional vector, c j Let q represent the number of topological features in dimension j, where q is (c0, c1...c...). j ...c D The probability of them occurring simultaneously;

[0064] And the set S of topological events and their probabilities:

[0065]

[0066] Where 1 ≤ n ≤ N-1, and N is {ε′ k The number of elements in}; set all q n =0;

[0067] (5) Traverse the quadruple combinations in step (2), compare the occurrence and disappearance times with the times in the time series set in step (3), and find those that do not satisfy ( and )or( and The quaternion combination of conditions modifies its topological events and probabilities to If q k =0, then let q k =p i Otherwise let q k =q k p i That is, the joint probability is calculated according to the "AND" relationship, where p i The probability value calculated in step (2);

[0068] (6) Arrange set S according to q n Sort the values ​​from largest to smallest to obtain a new set S'. After necessary compression, store the resulting vector V = (v1, v2, ... v3) of the barcode set initially set to 0. i ...v (D+2)L In this context, L is the preset value for the vector length.

[0069] Furthermore, in step (1), the specific details of the continuously homogenized barcode triples are as follows:

[0070] t=(h,ε birth ,ε death )

[0071] Where t represents the code bar, h∈H, H={0,1,2...D}, and ε represents an integer representing the dimension. The highest dimension D is determined by the dimension of the input data for topology analysis, the topological structure, and the topology analysis filtering process. birth It is the moment of birth of the code bar, ε death It is the death moment of the code bar. The code bar t records the dimension of a certain topological feature and the times when it appears and disappears during the filtering process.

[0072] Furthermore, the number of barcodes in the set is limited by the inherent topological structure of the data and is also affected by the filtering direction factor in the topological analysis process, making it an indefinite value.

[0073] Furthermore, in step (2), for each code bar t i Create a probability value p i traverse each i increases from 1 to M, p i The calculation formula is:

[0074]

[0075] Where, ε max Indicates all and The maximum value in, ε min Indicates all and Find the minimum value in the set, and then put the calculated probability value into a triplet to construct a 4-tuple combination:

[0076] Furthermore, in step (6), if the number of elements in S' is less than or equal to L, then its elements are copied sequentially into V.

[0077] Furthermore, in step (6), if the number of elements in S' is greater than L, then first sort s'1 to s' L-1 The elements are copied sequentially from v1 to v2 of V. (D+2)(L-1) In, then from s' L to s' N-1 The data is compressed into a s″=((c″0,c″1,...,c″) j ,...,c″ D After ), q″), copy sequentially to v (D+2)(L-1)+1 to v (D+2)L The specific compression process is as follows:

[0078]

[0079] Secondly, the present invention also provides a continuous barcode fixed-length encoding device based on topological event probability, including a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it implements the continuous barcode fixed-length encoding method based on topological event probability.

[0080] Thirdly, the present invention also provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the aforementioned method for continuous barcode fixed-length encoding based on topological event probability.

[0081] Fourthly, the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the aforementioned method for continuous barcode fixed-length encoding based on topological event probability.

[0082] The beneficial effects of this invention are:

[0083] This invention conforms to the essence of continuous cohomology methods, especially the filtering process therein, and proposes a method for calculating the probability of a single topological feature, based on the following assumptions:

[0084] 1. The ratio of the survival period to the total time of the filtration process is its probability;

[0085] Second, this probability remains unchanged at all points on the same code bar. This reflects the idea that topological properties, i.e., changes in size do not affect topological features.

[0086] When multiple topological features occur simultaneously, this invention calculates the probability of this event as a joint probability, which is an "AND" relationship internally. When the given encoding storage space is insufficient and compression is necessary, a compromise is made: it is assumed that the event containing the maximum number of features in each time period may occur, which is an "OR" relationship, and addition is performed with a negative sign as a special marker.

[0087] The key points of this invention are: first, topological meaning, specifically, the topological meaning represented by a code bar does not change with the size changes during filtering; and second, probabilistic meaning, namely, the probability of constructing and recording single events, multiple events, and compressed special events. This idea has never been proposed before. Furthermore, this invention proposes a method for prioritizing the retention of high-probability events based on importance when target storage space is insufficient, and for merging multiple topological events when the fixed encoding length is too short to accommodate all topological events. Attached Figure Description

[0088] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0089] Figure 1 This is a schematic diagram of the original continuous barcode;

[0090] Figure 2 This is a schematic diagram of the ε-sorting in this invention;

[0091] Figure 3 This is a schematic diagram illustrating how a continuous barcode, processed by this invention, is used as input into a machine learning platform.

[0092] Figure 4 This is a structural diagram of a continuous barcode fixed-length encoding device based on topological event probability provided by the present invention. Detailed Implementation

[0093] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are merely illustrative and not intended to limit the invention.

[0094] A typical application of topological data analysis is the analysis of CT scan data to aid in the early diagnosis of patients with respiratory infectious diseases. Due to the sudden onset and near-asymptomatic nature of respiratory infectious diseases, early CT screening is a more effective preventative measure. CT images of patients with respiratory infectious diseases exhibit the following characteristics:

[0095] First, the edges of both lungs show ground-glass-like shadows and solid nodules with irregular patterns. These features correspond to topological connectivity and loops, which can be captured by the H0 and H1 bars in a continuous barcode.

[0096] II. Compared to normal individuals, patients with respiratory infectious diseases exhibit more dramatic changes in CT signals, which are reflected in CT data as unique "peaks," local minima, and saddle points. The peaks are topologically homeomorphic to two-dimensional simple complexes (tetrahedrons), representing a persistent three-dimensional void in topological structure, and in a continuous barcode, this is represented by an H2 bar extending to the rightmost end. Local minima and saddle points are also represented by H2 bars, with the bar's starting point corresponding to the minimum value and its ending point being the saddle point.

[0097] The key point of this invention is to provide a continuous barcode fixed-length encoding method based on topological event probability. This involves two main aspects of topological data analysis: topology and probabilistic properties. Topology refers to "geometric independence"—data of different sizes and shapes share the same topology, and topological features are the truly valuable information. Probabilistic properties refer to the topological analysis method "inferring" the topology of implicit functions through the construction of simple complexes on point clouds; essentially, it is a probability. Furthermore, during the filtering process, due to geometric independence, the probability of a certain feature existing is the same throughout its lifespan (from the beginning to the end of the barcode line).

[0098] The subject of CT sampling is the human body, whose tissues are continuously distributed in three-dimensional space. A CT scanner acquires data from a set of discrete points. Whether the human tissue between two discrete sampling points is continuous or discontinuous reflects the connectivity problem on a one-dimensional topology, H0. The continuous cohomology method sets a value ε as a measure of connectivity. Different filters use ε in different ways, but it can be consistently described as follows: a fixed ε is a "prediction" of the continuity of sampling points; two points within the ε constraint are considered connected, and those with a distance greater than this constraint are considered discontinuous. Under a fixed ε, H0, H1, H2, and higher-dimensional simplicial complexes are constructed using the continuous cohomology method. Then, ε is amplified, and the topological reconstruction process is repeated until ε reaches a maximum value. If a topological feature persists after multiple εs (i.e., the continuous code strip is long), its probability of existence is high; otherwise, it is low.

[0099] Topological data analysis of CT data has achieved good results in the early diagnosis of respiratory infectious diseases. With the increase in available cases, machine learning methods are being used more extensively for in-depth research. However, because the results of topological data analysis—specifically, the continuous barcodes of variable length—cannot be used as input for machine learning, the two methods cannot be combined.

[0100] This invention organizes persistent barcodes into topological events and their corresponding probabilities, and uses joint probability logic to organize and encode the information. When necessary, low-probability events are compressed, and a variable number of multisets are converted into fixed-length codes with minimal information loss. Persistent barcodes encoded using this invention can be converted into machine learning input, thus establishing a bridge between topological analysis and machine learning. Furthermore, this invention can also be used in various situations requiring compression or transmission of persistent barcodes.

[0101] The specific implementation process of this invention is as follows:

[0102] 1. Representation of the triplet and output code of a continuous barcode:

[0103] Topological analysis based on the persistence cohomology method for chest CT data produces persistence barcodes. Continuity cohomology graphs are equivalent to persistence barcodes; they are essentially the same. A persistence barcode is a set of "bars," where "bar" is the original word "interval."

[0104] A code bar t is a sum of triples:

[0105] t=(h,ε birth ,ε death )

[0106] The code bar t records the dimension of a certain topological feature and its appearance and disappearance times during the filtering process. Here, h∈H, H={0,1,2...D}, is an integer representing the dimension of the topological feature. 0-dimensional features express connectivity, indicating frosted glass-like shadows and irregular patterns; 1-dimensional features indicate solid nodules; 2-dimensional features indicate peaks, local minima, or saddle points. The highest dimension D is determined by the dimension of the input data for topological analysis, the topological structure, and the filtering process of the topological analysis. ε birth It is the moment when a topological feature is born, ε death That is the moment it disappears.

[0107] A persistent barcode (PB) is a collection of barcodes:

[0108] PB={t i}

[0109] Where 1 ≤ i ≤ M, and M is the total number of code bars. M is limited by the inherent topological structure of the data, and is also affected by accidental factors in the topology analysis process, such as the filtering direction.

[0110] The purpose of this invention is to convert the code bar set PB into a vector with minimal information loss:

[0111] V = (v1, v2, ..., v i ,...,v (D+2)L )

[0112] Where L is a preset integer, such as 64.

[0113] 2. Calculate the probability of occurrence of the topological features associated with each code bar.

[0114] (1) Iterate through each Where i increases from 1 to M, find and The maximum and minimum values ​​in the range are denoted as ε. max and ε min .

[0115] (2) For each code bar t i Create a probability value pi traverse each i increases from 1 to M, p i The calculation formula is:

[0116]

[0117] Now t i It can be written as a 4-element combination:

[0118] The probability calculation above is merely an example of this invention. Other functions can also be used to calculate the probability, such as regressing a function p using statistical methods. i = f(PB);

[0119] 3. ε sorting. As mentioned earlier, each t contains two "time" values ​​ε. birth ε death And there are a total of 2M or There may be repetitions, for example All Sort the elements together in ascending order (1≤i≤M), keeping only one of each duplicate, and denote the resulting ordered set as {ε′}. k |1≤k≤N,N≤2M}, where ε′ k Monotonically increasing.

[0120] 4. Define a variable s to represent the topological structure and its probabilities:

[0121] s=((c0,c1,...,c j ,...,c D ),q)

[0122] (c0,c1,...,c j ,...,c D ) is a D+1 dimensional vector, c j Let q represent the number of topological features in dimension j, where q is (c0, c1, ..., c j ,...,c D The probability of both occurring simultaneously. The probability p in step 2. i It is a code bar in ε min Gradient to ε max The probability of occurrence during the process, where q is the probability of multiple code bars existing simultaneously under a specific value of ε, and q is the probability of multiple p i The joint probability.

[0123] 5. Define a set S = {s} that records topological events and their probabilities. n}, Where 1 ≤ n ≤ N-1, and N is {ε′k The number of elements in the} array. Set all... q n =0.

[0124] 6. Calculate S.

[0125] Let i increment from 1 to M, and iterate through each... For each t i :

[0126]

[0127] This allows us to calculate all topological events and their probabilities of occurrence.

[0128] 7. S = {s} n According to q n Sort the values ​​from largest to smallest to obtain a new set S' = {s' n},in:

[0129]

[0130] n increases from 1 to N-1.

[0131] 8. Compress S' as necessary and store it in V, where V = (v1, v2, ..., v i ,...,v (D+2)L Note that V is defined in step 1.

[0132] All v i The initial value is 0. If N-1≤L, then s' n The elements are copied sequentially into V, and the process ends.

[0133] 9. If N-1>L, then first transfer s'1 to s' L-1 The elements are copied sequentially from v1 to v2 of V. (D+2)(L-1) Then, for those who will be s' L To s'N -1 The data is compressed into a s″=((c″0,c″1,...,c″) j ,...,c″ D In ),q″), the method is as follows:

[0134]

[0135] Then copy the "s" element to "v" in sequence. (D+2)(L-1)+1 to v (d+2)L The middle section ends here.

[0136] The processing method for code bars exceeding a predetermined quantity is as follows: on topological events, the "or" relationship is used to obtain the sum of probabilities, resulting in s". The last term is obtained by polynomial compression. Each event may occur. The maximum value of the feature quantity is taken, and the "or" relationship is used for the sum of probabilities; this special meaning is marked by taking the negative value of the probability value.

[0137] The significance of this invention is to establish a connection between the topological analysis results based on the persistent homology method and the machine learning model. The method is to organize the former (persistent barcode) into topological events and their corresponding probabilities, integrate small-probability events, and convert a multiset with an indefinite number into a fixed-length vector with minimal information loss.

[0138] The persistent barcode generated from CT scan data is relatively large. Here, a small amount of data is simulated to illustrate the principle of this invention. According to industry practice, when h = 0, the notation H0 is taken to represent 0-dimensional homology, which indicates ground-glass opacities and irregular patterns in the CT example of respiratory infectious diseases; 1-dimensional homology H1 indicates solid nodules, and 2-dimensional homology H2 indicates peaks, local minima, or saddle points. ε birth is the moment when the corresponding homology feature appears, and ε death is the moment when it disappears.

[0139] The persistent barcode PB data is as follows:

[0140]

[0141]

[0142] M = 6, and the graph is as Figure 1 shown.

[0143] Calculate the probability of the appearance of the topological feature associated with the code bar:

[0144] ε max = 80, ε min = 0

[0145]

[0146] Sort ε to obtain {ε′ k} = {0, 10, 20, 30, 40, 60, 80}, N = 7, as Figure 2 shown.

[0147] Calculate the set S = {s n}, 1 ≤ n ≤ 6. Since the topological features exist simultaneously in a period, the probability values are calculated as joint probabilities:

[0148] s1 = {(3, 0, 0), q1 = p1p2p3 = 3 / 256}

[0149] s2={(2,0,0),q2=p2p3=3 / 32}

[0150] s3={(1,1,0),q3=p3p4=3 / 32}

[0151] s4={(0,2,0),q4=p4p5=3 / 32}

[0152] s5={(0,1,1),q5=p5p6=3 / 16}

[0153] s6 = {(0,0,1), q6 = p6 = 1 / 2}

[0154] Let S = {s n According to probability q n After sorting, we get S'. Items with higher probabilities are retained first, while those with lower probabilities may be compressed.

[0155] s'1=s6={(0,0,1),1 / 2}={(0,0,1),0.5}

[0156] s'2=s5={(0,1,1),3 / 16}={(0,1,1),0.1875}

[0157] s'3=s2={(2,0,0),3 / 32}={(2,0,0),0.09375}

[0158] s'4=s3={(1,1,0),3 / 32}={(1,1,0),0.09375}

[0159] s'5=s4={(0,2,0),3 / 32}={(0,2,0),0.09375}

[0160] s'6=s1={(3,0,0),3 / 256}={(3,0,0),0.01171875}

[0161] If V = (v1, v2, ... v i ...v (D+2)L If there is enough space, for example, L = 8, and D = 2, then:

[0162] V = (0, 0, 1, 0.5, 0,1,1,0.1875 2,0,0,0.09375, 1,1,0,0.09375, 0,2,0,0.09375, 3,0,0,0.01171875 0,0,0,0, 0,0,0,0)

[0163] Finish.

[0164] If V = (v1, v2, ... v i ...v (D+2)L If the space is insufficient, for example, L=4, then compress s'4 to s'6 into s", as follows:

[0165]

[0166] The final value is V = (0, 0, 1, 0.5). 0,1,1,0.1875 2,0,0,0.09375, 3,2,0,-0.19921875)

[0167] The framework of this invention that operates between topology analysis and machine learning is as follows: Figure 3 As shown: CT data consists of a three-dimensional matrix and its features, such as density. Figure 3 The right side of the diagram shows a typical convolutional neural network. Its typical processing method is to divide the data along the z-axis, and each layer goes through multiple combinations of convolution and pooling. Finally, it enters a feedforward neural network, and multiple feedforward networks enter a larger feedforward neural network, which then enters subsequent processing such as Softmax. Figure 3 The left side of the diagram represents topological data analysis. First, a filter, such as Vietoris-Rips, and a filtering direction are selected. Then, ε is minimized, and a set of simplex complexes is reconstructed and recorded. Next, ε is slightly increased, and the process of topological reconstruction and recording is repeated. ε is continuously increased until it reaches its maximum value. This results in a multiset of indefinite length recording the analysis results, i.e., a continuous barcode. Different filtering directions may produce different outputs. In practical applications, considering computational overhead, only one filtering direction is often used, i.e., the entire... Figure 3 There is only one longitudinal flow on the left side.

[0168] Each continuous barcode generates a fixed-length code using the encoding method of this invention. Multiple fixed-length codes can be concatenated into a single fixed-length long code, which is then fed into the feedforward module of a convolutional neural network as input data. In this way, the topological information of the original CT data is integrated into machine learning using the encoding method of this invention. This invention is also applicable to data from other applications or higher-dimensional data.

[0169] Corresponding to the aforementioned embodiment of a continuous barcode fixed-length encoding method based on topological event probability, the present invention also provides an embodiment of a continuous barcode fixed-length encoding device based on topological event probability.

[0170] See Figure 4 The present invention provides a continuous barcode fixed-length encoding device based on topological event probability, comprising a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it is used to implement a continuous barcode fixed-length encoding method based on topological event probability in the above embodiment.

[0171] The embodiment of the continuous barcode fixed-length encoding device based on topological event probability provided by this invention can be applied to any device with data processing capabilities, such as a computer. The device embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 4 The diagram shown is a hardware structure diagram of any device with data processing capabilities, where the continuous barcode fixed-length encoding device based on topological event probability provided by the present invention is located. (Except for...) Figure 4 In addition to the processor, memory, network interface, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0172] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0173] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0174] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a continuous barcode fixed-length encoding method based on topological event probability as described in the above embodiments.

[0175] The computer-readable storage medium can be an internal storage unit of any data processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0176] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for continuous barcode fixed-length encoding based on topological event probability.

[0177] The above embodiments are used to explain and illustrate the present invention, but not to limit the present invention. Any modifications and changes made to the present invention within the spirit and scope of the claims shall fall within the protection scope of the present invention.

Claims

1. A method for fixed-length encoding of continuous barcodes based on topological event probability, characterized in that, The method includes the following steps: (1) Construct a set of continuous homology barcodes in the form of triples based on topological structure data. The triple elements include the topological feature dimension and the times of appearance and disappearance during the filtering process. (2) Calculate the probability of the topological features associated with each barcode and put them into triples to construct quaternions; (3) Sort the appearance and disappearance times of the triplet elements in the barcode set together in ascending order, remove duplicate values, and obtain the time series set ε′ of the barcode. k ,{ε′ k |1≤k≤N,N≤2M}, where N is the number of time points in the time series set and M is the total number of barcodes; (4) Define the variable s representing the topological structure and its probability: s=((c0,c1...c j ...c D ),q) (c0,c1...c j ...c D ) is a D+1 dimensional vector, c j Let q represent the number of topological features in dimension j, where q is (c0, c1...c...). j ...c D The probability of them occurring simultaneously; And the set S of topological events and their probabilities: Where 1 ≤ n ≤ N-1, and N is {ε′ k The number of elements in}; set all q n =0; (5) Traverse the quadruple combinations in step (2), compare the occurrence and disappearance times with the times in the time series set in step (3), and find those that do not satisfy ( and )or( and The quaternion combination of conditions modifies its topological events and probabilities to If q k =0, then let q k =p i Otherwise let q k =q k p i That is, the joint probability is calculated according to the "AND" relationship, where p i The probability value calculated in step (2); (6) Arrange set S according to q n Sort the values ​​from largest to smallest to obtain a new set S'. After necessary compression, store the resulting vector V = (v1, v2, ... v3) of the barcode set initially set to 0. i ...v (D+2)L In this context, L is the preset value for the vector length.

2. The method for fixed-length encoding of continuous barcodes based on topological event probability according to claim 1, characterized in that, In step (1), the specific details of the continuously coherent barcode triplet are as follows: t=(h,e birth ,he death ) Where t represents the code bar, h∈H, H={0,1,2...D}, and ε represents an integer representing the dimension. The highest dimension D is determined by the dimension of the input data for topology analysis, the topological structure, and the topology analysis filtering process. birth It is the moment of birth of the code bar, ε death It is the death moment of the code bar. The code bar t records the dimension of a certain topological feature and the times when it appears and disappears during the filtering process.

3. The method for fixed-length encoding of continuous barcodes based on topological event probability according to claim 1, characterized in that, The number of barcodes in the set is limited by the inherent topological structure of the data and is also affected by the filtering direction factor in the topological analysis process, so it is an indefinite value.

4. The method for fixed-length encoding of continuous barcodes based on topological event probability according to claim 1, characterized in that, In step (2), for each code bar t i Create a probability value p i Iterate through each t i =(h i , i increases from 1 to M, p i The calculation formula is: Where, ε max Indicates all and The maximum value in, ε min Indicates all and The minimum value in the set is used to construct a 4-tuple by placing the calculated probability value into the triplet: t i =(h i , p i ).

5. The method for fixed-length encoding of continuous barcodes based on topological event probability according to claim 1, characterized in that, In step (6), if the number of elements in S' is less than or equal to L, then its elements are copied sequentially into V.

6. The method for fixed-length encoding of continuous barcodes based on topological event probability according to claim 1, characterized in that, In step (6), if the number of elements in S' is greater than L, then first sort s'1 to s' L-1 The elements are copied sequentially from v1 to v2 of V. (D+2)(L-1) In, then from s' L to s' N-1 The data is compressed into a s″=((c″0,c″1,...,c″) j ,...,c″ D After ), q″), copy sequentially to v (D+2)(L-1)+1 to v (D+2)L The specific compression process is as follows:

7. A continuous barcode fixed-length encoding device based on topological event probability, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that, When the processor executes the executable code, it implements a continuous barcode fixed-length encoding method based on topological event probability as described in any one of claims 1-6.

8. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements a continuous barcode fixed-length encoding method based on topological event probability as described in any one of claims 1-6.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements a continuous barcode fixed-length encoding method based on topological event probability as described in any one of claims 1-6.