Cloud computing-based lung cancer gene data management system
The cloud-based lung cancer gene data management system utilizes sequence deconstruction, Huffman coding, and index storage technologies to solve the problems of gene data redundancy and low retrieval efficiency in traditional systems, achieving efficient gene data storage and retrieval.
Patent Information
- Application Number
- CN202511894369.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-17
AI Technical Summary
Traditional lung cancer gene data management systems fail to effectively utilize the triplet codon features of gene sequences, resulting in high redundancy in the storage of massive gene data, occupying a large amount of physical space, and having low data throughput efficiency during large-scale sequence retrieval or specific site mutation analysis, making it difficult to meet the rapid access requirements in high-throughput sequencing scenarios.
The cloud-based lung cancer gene data management system calculates the position offset of base characters and sorts them into different containers through a sequence deconstruction module, uses a high-frequency encoding module to construct a Huffman binary tree to generate binary bit strings, a mutation difference module to record synonymous mutation information, and combines an index storage module to realize a columnar storage structure for precise data location.
It significantly reduces the data storage volume of gene sequence data, improves read and write throughput performance, solves the problems of storage bloat and retrieval latency in the management of massive gene information, and significantly improves data management efficiency.
Smart Images

Figure CN121687218A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of healthcare technology, and in particular to a cloud-based lung cancer gene data management system. Background Technology
[0002] The healthcare technology field primarily encompasses the core aspects of using computer technology to collect, store, process, and transmit various types of information in healthcare services. Its overall technological focus is on building a systematic medical data environment to support the orderly conduct of clinical operations and medical research. Among these, a traditional lung cancer gene data management system refers to an electronic system specifically designed to organize and manage gene testing data and related clinical information of lung cancer patients. Traditional lung cancer gene data management systems are typically deployed using localized independent servers or LAN architectures. They utilize standard database software to establish data table structures to accommodate gene sequencing results and basic patient records, and complete data entry, querying, and simple statistical tasks through manual operation or pre-set script interfaces.
[0003] Existing technologies typically use a general database structure to directly store the gene sequences of lung cancer patients. This approach simply treats gene data as ordinary text characters and stacks them line by line, failing to utilize the triplet codon features of gene sequences for targeted optimization. This results in extremely high redundancy in the storage of massive gene data and occupies a large amount of physical space. When faced with large-scale sequence retrieval or mutation analysis at specific sites, the general database engine needs to perform a full character scan and comparison, causing excessive disk read / write load and low data throughput efficiency. The processing bottleneck of a single node in a local area network architecture limits the response speed of clinical data mining and makes it difficult to meet the needs of rapid data retrieval in high-throughput sequencing scenarios. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a cloud-based lung cancer gene data management system.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a cloud-based lung cancer gene data management system includes: The sequence deconstruction module calculates the positional offset of base characters in the exon sequence data of lung cancer patients based on the coordinates of the protein translation start site and performs a remainder operation. Based on the remainder result of the remainder operation, the base characters are divided into the first base container, the middle base container, or the last base container to construct a sequence sub-container set. The high-frequency encoding module counts the frequency of occurrence of the base characters in the first base container and the middle base container, constructs a Huffman binary tree based on the frequency of occurrence, and uses the binary bit string generated by the Huffman binary tree to replace the base characters to generate an amino acid definition data block. The mutation difference module compares the base characters in the terminal base container with the reference bases of the reference terminal sequence, generates a record of no change or a record of a mutated character, and merges the record of no change and the record of a mutated character to generate a synonymous mutation auxiliary data block. The index storage module calculates the byte length of the amino acid definition data block and the synonymous mutation auxiliary data block, generates the starting byte offset address and constructs a file header index area, and combines the file header index area, the amino acid definition data block and the synonymous mutation auxiliary data block to generate a columnar gene storage file.
[0006] As a further embodiment of the present invention, the sequence sub-container set includes a first base container, a middle base container, and a last base container; the amino acid definition data block is specifically a binary bit string; the synonymous mutation auxiliary data block includes a no-change identifier bit and a variant character record; the file header index area includes a starting byte offset address; and the columnar gene storage file includes a file header index area, an amino acid definition data block, and a synonymous mutation auxiliary data block.
[0007] As a further aspect of the present invention, the specific function of the sequence destructuring module is as follows: The coordinate positioning submodule retrieves a genome annotation file from the genome database of the cloud computing platform that matches the exon sequence data of the lung cancer patient's gene, parses the genome annotation file, and extracts the coordinates of the protein translation start site corresponding to each exon in the exon sequence data of the lung cancer patient's gene. The offset calculation submodule traverses each base character in the exon sequence data of the lung cancer patient's gene and uses the coordinates of the protein translation start site corresponding to its exon as a reference to calculate the difference between the absolute position of each base character in the sequence and the reference, thereby obtaining the position offset of multiple base characters. The grouping and aggregation submodule performs a modulo-3 remainder operation on each position offset to obtain a remainder result. Based on the value of the remainder result being 0, 1, or 2, the corresponding base character is respectively assigned to the preset first base container, middle base container, or last base container. After all the base characters are assigned, a sequence sub-container set is generated.
[0008] As a further aspect of the present invention, the specific logic of the grouping and aggregation submodule in classifying the base characters into the differentiation container is as follows: The position offset is obtained, and a modulo-3 remainder operation is applied to the position offset to obtain the remainder result, which determines the position of the base character in its corresponding triplet codon. The value of the remainder result is determined. When the remainder result is equal to 0, the current base character is determined to be the first base of the codon and stored in the first base container. When the remainder result is equal to 1, it is determined to be the middle base of the codon and stored in the middle base container. When the remainder result is equal to 2, it is determined to be the last base of the codon and stored in the last base container. After processing all the position offsets, the first base container, the middle base container, and the last base container, which have been filled with data, are encapsulated into the sequence sub-container set.
[0009] As a further aspect of the present invention, the specific function of the high-frequency encoding module is as follows: The frequency statistics submodule integrates all the base characters in the first base container and the middle base container, counts the total number of occurrences corresponding to the four standard base characters, and calculates the occurrence frequency of each base character based on the ratio of the total number of occurrences to the total number of characters after integration. The tree construction submodule treats each base character and its corresponding frequency as an independent leaf node, iteratively selects the two nodes with the lowest frequency among all current nodes and merges them to generate the current parent node, and sets the frequency value of the parent node as the sum of the frequency values of the two child nodes, until all nodes are merged into a root node, thus completing the construction of the Huffman binary tree. The encoding and replacement submodule starts from the root node of the Huffman binary tree, assigns binary code "0" to all left branch paths, and assigns binary code "1" to all right branch paths, thereby generating a variable-length binary bit string for each base character represented by the leaf node and replacing the original character to generate an amino acid definition data block.
[0010] As a further aspect of the present invention, the process by which the encoding replacement submodule generates the amino acid definition data block is specifically as follows: Based on the constructed Huffman binary tree, a base encoding mapping table is created, which stores four standard base characters and their unique corresponding binary bit strings. Following the original sequence order, all the base characters in the first base container are read sequentially. For each read base character, the base encoding mapping table is queried to obtain the corresponding binary bit string. All the obtained binary bit strings are then concatenated in order to form the first base encoding string. The median base container is processed using the same query and concatenation logic to form a median base encoding string. The first base encoding string and the median base encoding string are then concatenated sequentially, and byte alignment processing is performed to generate the amino acid definition data block.
[0011] As a further aspect of the present invention, the specific function of the variation difference module is as follows: The reference acquisition submodule extracts the standard sequence of the corresponding gene region, which includes only the third base of the codon, from the standard human genome database of the cloud computing platform based on the identification information of the exon sequence data of the lung cancer patient's gene, and constructs the reference end sequence; The differential alignment submodule performs a one-to-one, position-synchronized differential alignment between the patient's base character sequence in the last base container and the reference base sequence in the reference last sequence. If the patient's base character matches the reference base at the same position, a no-change identifier is generated. The data fusion submodule, if the base character is inconsistent with the reference base, uses the ASCII code or custom code of the patient's base character as the variant character record, and serially fuses all the unchanged identifier bits generated throughout the comparison process with the variant character record in the original sequence order to generate a synonymous mutation auxiliary data block.
[0012] As a further aspect of the present invention, the generation process of the synonymous mutation auxiliary data block is specifically as follows: Initialize an empty synonym mutation auxiliary data block and a counter for recording the number of consecutive unmutated bases; The comparison results are sequentially traversed. When the result is the unchanged flag bit, the value of the counter is incremented by one. When the result is the mutated character record, the value of the counter is first judged. If the value is greater than a preset run-length encoding compression threshold, the count value is converted into a target run-length encoding and written into the synonym mutation auxiliary data block. Then, the current mutated character record is appended and written, and the counter is reset. If the counter value does not exceed the run-length encoding compression threshold when the mutated character record is encountered, the corresponding number of original unchanged flag bits are directly written, and then the mutated character record is appended. After the traversal is completed, the same run-length encoding judgment and writing operation is performed on the last count value to generate the synonym mutation auxiliary data block.
[0013] As a further aspect of the present invention, the specific function of the index storage module is as follows: The length measurement submodule receives the amino acid definition data block and the synonymous mutation auxiliary data block, calculates and obtains the byte length of the amino acid definition data block and the byte length of the synonymous mutation auxiliary data block; The offset address generation submodule calculates the starting byte offset address of the amino acid definition data block as the fixed length value of the file header based on a predefined fixed file header length, and calculates the starting byte offset address of the synonym mutation auxiliary data block as the sum of the fixed file header length and the byte length of the amino acid definition data block; The file construction submodule creates the file header index area and writes the two calculated starting byte offset addresses into it. At the same time, it strictly follows the calculated offset addresses to sequentially append the amino acid definition data block and the synonymous mutation auxiliary data block to the file, generating a columnar gene storage file.
[0014] As a further aspect of the present invention, the file header index area further includes a data integrity check code, the generation process of which is as follows: Before the file construction submodule writes the amino acid definition data block and the synonymous mutation auxiliary data block into the columnar gene storage file, a verification operation is performed on the contents of the amino acid definition data block and the synonymous mutation auxiliary data block; The data integrity check code is calculated using the following formula: ; in, This represents the data integrity check code. This represents the byte length of the amino acid definition data block. This represents the byte length of the synonym mutation auxiliary data block. This represents the value of the i-th byte in the amino acid definition data block. This represents the value of the j-th byte in the synonym mutation auxiliary data block. This represents the byte position index of the amino acid definition data block. The byte position index representing the synonym mutation auxiliary data block. Represents a pre-defined prime number base. It represents a large prime number used for modulo operations; The calculated data integrity check code, along with the starting byte offset address, is written into the file header index area. The data integrity check code is used to verify the integrity of the columnar gene storage file during data reading by re-executing the check operation and comparing the check code.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, the sequence is deconstructed into different levels of containers by calculating the offset of bases relative to the translation start site. A binary tree is constructed using the occurrence frequency of core bases that determine the amino acid type to generate a compact binary bit string. For terminal bases that are prone to synonymous mutations, difference comparison is used to record variation information, thereby significantly reducing the data storage volume of gene sequence data. The combination of columnar storage structure and byte-level indexing enables accurate data location, significantly improving read and write throughput performance while reducing disk storage pressure, and effectively solving the problems of storage bloat and retrieval delay in the management of massive gene information. Attached Figure Description
[0016] Figure 1 This is a flowchart of the overall process of the cloud-based lung cancer gene data management system of the present invention; Figure 2 This is a flowchart illustrating the gene sequence splitting process according to codon positions in this invention. Figure 3 This is a flowchart of the process for generating amino acid definition data blocks based on Huffman coding in this invention. Figure 4 This is a flowchart of the process for generating synonymous mutation auxiliary data blocks based on differential alignment in this invention. Figure 5 This is a flowchart illustrating the construction process of the columnar gene storage file of this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the software-based technical solution is described in detail below with reference to system architecture diagrams and embodiments. It should be understood that the specific embodiments described herein are only for explaining the technical solutions of this invention and do not constitute a limitation on the scope of protection.
[0018] In the description of this invention, the system architecture relationships or data processing flows indicated by terms such as "layer," "module," "interface," "data flow," "client," and "server" are all defined based on the architecture diagram or flowchart corresponding to the embodiments. This way of describing is only used to clearly illustrate the logical relationships between the elements in the technical solution, and not to limit the physical deployment form. The term "multiple" includes two or more technical units, including but not limited to multiple data nodes, processing threads, service instances, or functional components and other scalable elements. The specific number is determined according to the actual business scenario and needs to be specifically specified.
[0019] Please see Figure 1 and Figure 2 This invention provides a technical solution: a cloud-based lung cancer gene data management system comprising: The sequence deconstruction module calculates the positional offset of base characters in the exon sequence data of lung cancer patients based on the coordinates of the protein translation start site and performs a remainder operation. Based on the remainder result of the remainder operation, the base characters are divided into the first base container, the middle base container, or the last base container to construct a sequence sub-container set. The sequence container set includes the first base container, the middle base container, and the last base container; The specific functionality of the sequence destructuring module is as follows: The coordinate localization submodule retrieves the genome annotation file that matches the exon sequence data of the lung cancer patient's gene from the genome database of the cloud computing platform, parses the genome annotation file and extracts the coordinates of the protein translation start site corresponding to each exon in the exon sequence data of the lung cancer patient's gene; The offset calculation submodule iterates through each base character in the exon sequence data of lung cancer patients' genes, and uses the coordinates of the protein translation start site corresponding to its exon as a reference to calculate the difference between the absolute position of each base character in the sequence and the reference, thus obtaining the position offset of multiple base characters. The grouping and collection submodule performs a modulo-3 remainder operation on each position offset to obtain the remainder result. Based on the remainder result being 0, 1, or 2, the corresponding base characters are respectively assigned to the preset first base container, middle base container, or last base container. After all base characters are assigned, a sequence sub-container set is generated. The specific logic of the grouping and aggregation submodule in sorting base characters into the differentiation container is as follows: Obtain the position offset and apply modulo-3 remainder operation to the position offset to obtain the remainder result. The remainder result determines the position of the base character in its corresponding triplet codon. The value of the remainder result is determined. When the remainder result is equal to 0, the current base character is determined to be the first base of the codon and stored in the first base container. When the remainder result is equal to 1, it is determined to be the middle base of the codon and stored in the middle base container. When the remainder result is equal to 2, it is determined to be the last base of the codon and stored in the last base container. After processing all position offsets, the first base container, the middle base container, and the last base container, which have been filled with data, are encapsulated into a sequence sub-container set.
[0020] In one specific embodiment, the sequence deconstruction module processes EGFR exon 19 sequence data (in FASTA format) from a lung cancer patient numbered "LC-PT-2025-001". First, the coordinate positioning submodule is initiated. This submodule receives the gene exon sequence data of "LC-PT-2025-001", whose identifier is "Gene:EGFR,Exon:19", and sends a structured query to the genome database on the cloud computing platform (a local mirror database of Ensembl built on PostgreSQL). The query command is: SELECT start_coord FROM gene_annotations WHERE gene_name='EGFR' AND feature_type='CDS' AND exon_number=19;. After the database executes the query, it returns the relevant records from the matching genome annotation file (GTF format). Suppose the obtained record fragment is: chr7ENSEMBLCDS2552420025524300.+0gene_id"ENSG00000146648";transcript_id"ENST00000275493.2";exon_number"19";. The coordinate localization submodule parses this line of text and identifies the value "25524200" in the fourth column as the coordinates of the protein translation start site (CDS) corresponding to this exon.
[0021] Next, the offset calculation submodule begins execution. This submodule receives the protein translation start site coordinates "25524200" output from the previous submodule as a baseline. Simultaneously, it reads the exon sequence data of the lung cancer patient gene to be processed from the FASTA file, assuming the sequence fragment is "GATTACA". The offset calculation submodule initializes an iterator, traversing from the first base character "G" in the sequence. The absolute position of the first base "G" in the genome is 25524200, and its position offset is calculated as: 25524200 - 25524200 = 0. The iterator moves to the second base "A", whose absolute position is 25524201, and its position offset is calculated as: 25524201 - 25524200 = 1. The iterator continues to move to the third base "T", whose absolute position is 25524202, and its position offset is calculated as: 25524202 - 25524200 = 2. Similarly, after traversing and calculating all the base characters in the sequence "GATTACA", a set of position offset arrays corresponding one-to-one with the base characters is obtained: [0,1,2,3,4,5,6].
[0022] Subsequently, the grouping and aggregation submodule receives the base character sequence "GATTACA" and its corresponding position offset array [0,1,2,3,4,5,6]. This submodule pre-creates three empty character containers in memory: a first base container, a middle base container, and a last base container. The submodule starts a loop, performing a modulo-3 operation on each position offset. In the first loop, the position offset "0" is obtained, and the modulo-3 operation (0 mod 3) is applied to it, resulting in a remainder of "0". The value of the remainder is evaluated; since it equals 0, the corresponding base character "G" is determined to be the first base of the codon and is stored in the first base container. In the second loop, the position offset "1" is obtained, and the modulo-3 operation (1 mod 3) is performed, resulting in a remainder of "1". Since it equals 1, the corresponding base character "A" is determined to be the middle base of the codon and is stored in the middle base container. In the third loop, the position offset "2" is obtained, and the modulo-3 operation (2 mod 3) is performed, resulting in a remainder of "2". Since the value equals 2, the corresponding base character "T" is determined to be the last base of the codon and stored in the last base container. In the fourth loop, the position offset "3" is obtained, 3 mod 3, and the remainder result is "0", so the corresponding base character "T" is stored in the first base container. This logic continues: the fifth base "A" (offset 4, remainder 1) is stored in the middle base container, the sixth base "C" (offset 5, remainder 2) is stored in the last base container, and the seventh base "A" (offset 6, remainder 0) is stored in the first base container. After processing all position offsets, the contents of the first base container after data filling are ['G', 'T', 'A'], the middle base container is ['A', 'A'], and the last base container is ['T', 'C']. Finally, these three filled data containers are encapsulated into a structured data set, generating a sequence sub-container set.
[0023] Please see Figure 1 and Figure 3 The high-frequency encoding module counts the frequency of occurrence of base characters in the first and middle base containers, constructs a Huffman binary tree based on the frequency of occurrence, and uses the binary bit string generated by the Huffman binary tree to replace the base characters to generate amino acid definition data blocks. The amino acid definition data block is specifically a binary bit string; The specific functions of the high-frequency encoding module are as follows: The frequency statistics submodule integrates all base characters in the first base container and the middle base container, counts the total number of occurrences of the four standard base characters, and calculates the occurrence frequency of each base character based on the ratio of the total number of occurrences to the total number of characters after integration. The tree construction submodule treats each base character and its corresponding frequency as an independent leaf node. Iteratively, it selects the two nodes with the lowest frequency among all current nodes and merges them to generate the current parent node. The frequency value of the parent node is set as the sum of the frequency values of the two child nodes. This process continues until all nodes are merged into a root node, thus completing the construction of the Huffman binary tree. The encoding and replacement submodule starts from the root node of the Huffman binary tree, assigns binary code 0'' to all left branch paths, and assigns binary code 1'' to all right branch paths, thereby generating a variable-length binary bit string for each base character represented by the leaf node and replacing the original character to generate an amino acid definition data block; The process of generating amino acid definition data blocks by the encoding replacement submodule is as follows: Based on the constructed Huffman binary tree, a base encoding mapping table is created, which stores four standard base characters and their unique corresponding binary bit strings. Following the original sequence order, all base characters in the first base container are read sequentially. For each read base character, the base encoding mapping table is queried to obtain the corresponding binary bit string. All the obtained binary bit strings are then concatenated in order to form the first base encoding string. The same query and concatenation logic is used to process the median base container to form a median base encoding string. The first base encoding string and the median base encoding string are concatenated in sequence, and byte alignment processing is performed to generate an amino acid definition data block.
[0024] In one specific embodiment, the high-frequency encoding module receives the sequence sub-container set generated by the previous module. The frequency statistics submodule first extracts the first base container ['G', 'T', 'A'] and the median base container ['A', 'A'] from this set. Then, all base characters within these two containers are integrated to form a unified character list: ['G', 'T', 'A', 'A', 'A']. The total number of characters in this list is 5. Next, the submodule traverses this integrated list and counts the total occurrence count of each of the four standard base characters (A, C, G, T). The results are: character 'A' appears 3 times, character 'C' appears 0 times, character 'G' appears 1 time, and character 'T' appears 1 time. Based on the ratio of the counted occurrence counts to the total number of characters after integration (5), the frequency of each base character is calculated. The frequency of the character 'A' is 3 / 5 = 0.6; the frequency of the character 'C' is 0 / 5 = 0.0; the frequency of the character 'G' is 1 / 5 = 0.2; and the frequency of the character 'T' is 1 / 5 = 0.2.
[0025] Next, the tree-building submodule receives this set of base characters and their frequencies: {A:0.6,C:0.0,G:0.2,T:0.2}. Since the frequency of the character 'C' is 0, it does not participate in the tree-building process. The submodule treats each remaining base character and its corresponding frequency as an independent leaf node, initializing the node set to [(G,0.2),(T,0.2),(A,0.6)]. The submodule iteratively performs the merging operation. In the first iteration, it selects the two nodes with the lowest frequencies among all current nodes, namely (G,0.2) and (T,0.2). These two nodes are merged to generate a parent node, whose frequency value is set to the sum of the frequencies of the two child nodes, i.e., 0.2 + 0.2 = 0.4. At this time, the node set is updated to [(parent node_GT,0.4),(A,0.6)]. In the second iteration, the two remaining nodes (parent node _GT, 0.4) and (A, 0.6) are merged to generate the root node, whose frequency value is 0.4 + 0.6 = 1.0. At this point, all nodes have been merged into a single root node, and the Huffman binary tree is complete.
[0026] Finally, the encoding replacement submodule generates codes based on the constructed Huffman binary tree. In the Huffman tree structure of this embodiment, when merging two nodes, the child node with higher frequency is placed on the right and the child node with lower frequency is placed on the left. Starting from the root node, all left branch paths are assigned binary code '0', and all right branch paths are assigned binary code '1'. Based on this rule, the path from the root node to node 'A' is a right branch, so the code for 'A' is '1'; the path from the root node to 'parent node_GT' is a left branch, then from 'parent node_GT' to node 'G' is a left branch, and to node 'T' is a right branch, so the code for 'G' is '00' and the code for 'T' is '01'. Based on this, a base encoding mapping table is created, the content of which is {A:'1',G:'00',T:'01'}. The submodule reads all base characters in the first base container ['G','T','A'] in the original sequence order. For the first character 'G', the mapping table is consulted to obtain the binary bit string '00'. For the second character 'T', '01' is obtained. For the third character 'A', '1' is obtained. All the obtained binary bit strings are concatenated in order to form the first base encoding string: "00011". Next, the same query and concatenation logic is used to process the middle base container ['A', 'A']. The character 'A' is queried in sequence to obtain two '1's, which are concatenated to form the middle base encoding string: "11". Subsequently, the first base encoding string "00011" and the middle base encoding string "11" are concatenated in sequence to obtain the bit string "0001111". This bit string is 7 bits long. The system performs byte alignment processing, and according to the preset rule of padding the end with '0' until the total length is an integer multiple of 8, a '0' is added to the end of this bit string to obtain the final 8-bit binary bit string "00011110". This binary bit string is the generated amino acid definition data block.
[0027] Please see Figure 1 and Figure 4 The variation difference module compares the base characters in the last base container with the reference bases of the reference last sequence, generates a record of no change or a record of a variant character, and merges the record of no change and the record of a variant character to generate a synonymous mutation auxiliary data block. Synonymous mutation auxiliary data blocks include unchanged flags and mutated character records; The specific functions of the mutation difference module are as follows: The reference acquisition submodule extracts the standard sequence of the corresponding gene region, which includes only the third base of the codon, from the standard human genome database of the cloud computing platform based on the identification information of the gene exon sequence data of lung cancer patients, and constructs the reference end sequence. The differential alignment submodule performs a one-to-one, position-synchronized differential alignment between the patient's base character sequence in the last base container and the reference base sequence in the reference last position sequence. If the patient's base character is consistent with the reference base at the same position, an unchanged identifier bit is generated. The data fusion submodule, if the base characters are inconsistent with the reference bases, will record the ASCII code or custom code of the patient's base characters as variant characters, and will serially fuse all unchanged flags generated throughout the alignment process with the variant character records in the original sequence order to generate a synonymous mutation auxiliary data block. The specific process for generating synonymous mutation auxiliary data blocks is as follows: Initialize an empty synonym mutation helper data block and a counter for recording the number of consecutive unmutated bases; The comparison results are sequentially traversed. When the result is a no-change flag, the counter value is incremented by one. When the result is a mutated character record, the counter value is first judged. If the value is greater than a preset run-length encoding compression threshold, the counter value is converted into a target run-length encoding and written into the synonym mutation auxiliary data block. Then the current mutated character record is appended and written, and the counter is reset. If the counter value does not exceed the run-length encoding compression threshold when encountering a mutated character record, the corresponding number of original unchanged flag bits are written directly, and then the mutated character record is appended. After the traversal is completed, the same run-length encoding judgment and writing operation is performed on the last count value to generate a synonym mutation auxiliary data block.
[0028] In one specific embodiment, the variation difference module receives a terminal base container from the sequence deconstruction module, containing ['T', 'C']. First, the reference acquisition submodule is initiated. Based on the identifier information "Gene:EGFR,Exon:19" of the currently processed lung cancer patient gene exon sequence data, it sends a request to the standard human genome database (GRCh38 / hg38 reference genome) on the cloud computing platform. The purpose of the request is to extract the reference sequence corresponding to the same genomic coordinate range (25524200 to 25524206) as the patient sequence "GATTACA". Assume the reference sequence returned by the database is "GATTTAA". The reference acquisition submodule further processes this reference sequence, extracting only the bases at the third position of the codons. For the sequence "GATTTAA", its codon grouping is GATTTTAA…, and the bases at the third position are 'T' and 'A' respectively. Therefore, the constructed reference terminal sequence is ['T', 'A'].
[0029] Next, the differential alignment submodule receives the patient's last base container ['T', 'C'] and the reference last sequence ['T', 'A']. The submodule performs a one-to-one, position-synchronized differential alignment of these two sequences. Alignment position 1: The patient's base character is 'T', and the reference base is also 'T'. They match, so an unchanged flag is generated internally. Alignment position 2: The patient's base character is 'C', and the reference base is 'A'. They do not match, and the submodule determines that a mutation has occurred here.
[0030] Subsequently, the data fusion submodule processes the results of the differential alignment. For the inconsistency at alignment position 2, the ASCII code (decimal 67) of the patient's base character 'C' is recorded as the variant character. At this time, the original result sequence generated by the entire alignment process is [no change flag, variant character record (67)]. The submodule initializes an empty synonymous mutation auxiliary data block and a counter for recording the number of consecutive unvariated bases, with an initial value of 0. The submodule sequentially traverses the alignment results. When traversing to the first result "no change flag", the counter value is incremented by one to become 1. When traversing to the second result "variant character record (67)", the previously accumulated count value needs to be processed. The submodule first determines whether the counter value (1) is greater than a preset run-length encoding compression threshold.
[0031] The optimal value for the run-length encoding compression threshold needs to be determined experimentally. The experimental procedure is as follows: Exon sequencing data samples from 1000 lung cancer patients from different sources were selected, and their third codon sequence was compared with a reference sequence. Thresholds of 2, 3, 4, 5, and 6 were set, and run-length encoding (RLE) was used to compress consecutive "unchanged" sites. The compression format was defined as: an RLE marker byte (e.g., 0xFF) followed by a byte indicating the consecutive number of sites. The total size of the "synonymous mutation helper data block" generated after compression for all samples at each threshold was recorded. The experimental data are summarized below: Table 1. Experimental data on the effect of run-length encoding compression threshold on data compression ratio; As shown in Table 1, by comparing the compression effects of different thresholds, the highest compression ratio of 28.00% was achieved when the threshold was set to 4. If the threshold continues to increase, the proportion of RLE overhead (marker bytes) increases due to frequent interruptions of short, continuous, unmutated sequences, resulting in a decrease in the overall compression ratio. Therefore, in this embodiment, the run-length encoding compression threshold is set to 4.
[0032] Returning to the current example, the counter value is 1, which does not exceed the run-length encoding compression threshold of 4. Therefore, the submodule directly writes a predefined byte 0x00 representing the original unchanged flag bit into the synonym mutation auxiliary data block. Subsequently, the current mutated character record (i.e., decimal 67, whose byte representation is 0x43) is appended. After writing, the counter is reset to 0. At this point, the content of the synonym mutation auxiliary data block is [0x00, 0x43]. Since all alignment results have been traversed, the count value at the end is 0, requiring no further operation. The final generated synonym mutation auxiliary data block is a byte array [0, 67] containing 2 bytes.
[0033] Please see Figure 1 and Figure 5 The index storage module calculates the byte length of the amino acid definition data block and the synonymous mutation auxiliary data block, generates the starting byte offset address and constructs the file header index area, and combines the file header index area, amino acid definition data block and synonymous mutation auxiliary data block to generate a columnar gene storage file; The file header index area includes the starting byte offset address; The columnar gene storage file includes a file header index area, an amino acid definition data block, and a synonymous mutation auxiliary data block; The specific functions of the index storage module are as follows: The length measurement submodule receives the amino acid definition data block and the synonymous mutation auxiliary data block, calculates and obtains the byte length of the amino acid definition data block and the byte length of the synonymous mutation auxiliary data block; The offset address generation submodule calculates the starting byte offset address of the amino acid definition data block as the fixed length of the file header based on a predefined fixed file header length, and calculates the starting byte offset address of the synonym mutation auxiliary data block as the sum of the fixed file header length and the byte length of the amino acid definition data block. The file construction submodule creates a file header index area and writes the calculated two starting byte offset addresses into it. At the same time, it strictly follows the calculated offset addresses to append the amino acid definition data block and the synonymous mutation auxiliary data block to the file in sequence, generating a columnar gene storage file. The file header index area also includes a data integrity check code, the generation process of which is as follows: Before the file construction submodule writes the amino acid definition data block and the synonymous mutation auxiliary data block into the columnar gene storage file, a verification operation is performed on the contents of the amino acid definition data block and the synonymous mutation auxiliary data block. Calculate the data integrity check code using the following formula: ; in, Represents a data integrity check code. This represents the byte length of the amino acid definition data block. The length in bytes representing the synonym mutation auxiliary data block. This represents the value of the i-th byte in the amino acid definition data block. This represents the value of the j-th byte in the synonym mutation auxiliary data block. The byte position index representing the amino acid definition data block. The byte position index representing the synonym mutation auxiliary data block. Represents a pre-defined prime number base. It represents a large prime number used for modulo operations; The calculated data integrity check code, along with the starting byte offset address, is written into the file header index area. The data integrity check code is used to verify the integrity of the columnar gene storage file during the data reading process by re-executing the check operation and comparing the check code.
[0034] In one specific embodiment, the index storage module receives the amino acid definition data block and the synonymous mutation auxiliary data block generated by the preceding module. First, the length measurement submodule is initiated. The amino acid definition data block received by this submodule is a binary bit string "00011110", which, after byte alignment, forms a single byte, the length of which is specified in the submodule. The value is calculated as 1. The received synonymous mutation auxiliary data block is a byte array [0, 67], and its byte length is... The value is calculated as 2.
[0035] Next, the offset address generation submodule calculates the storage location of each data block based on a predefined fixed header length value. This fixed header length is set to 24 bytes. This length is designed to accommodate two starting byte offset addresses (8 bytes each, totaling 16 bytes) and a data integrity checksum (8 bytes). The submodule calculates the starting byte offset address of the amino acid definition data block as the fixed header length value, i.e., 24. Subsequently, it calculates the starting byte offset address of the synonym mutation auxiliary data block as the fixed header length (24) and the byte length of the amino acid definition data block. The sum of (1) is 24+1=25.
[0036] Before the file construction submodule writes the data blocks to the file, a verification operation is performed on the contents of the amino acid definition data block and the synonymous mutation auxiliary data block to generate a data integrity checksum. This checksum is calculated using the following formula: ; This formula performs a polynomial rolling hash calculation, where, Represents the final data integrity check code; This represents the byte length of the amino acid definition data block; in this example, its value is 1. This represents the byte length of the synonym mutation auxiliary data block, which is 2 in this example; The position index in the data block representing the amino acid definition is The decimal value of the byte; The position index in the synonym mutation auxiliary data block is The decimal value of the byte; As the byte position index of the amino acid definition data block, its value ranges from 1 to... ; As the byte position index of the synonym mutation auxiliary data block, its value ranges from 1 to... ; It represents a pre-defined prime number that serves as the basis for polynomial hashing; Represents a large prime number used for modulo operations; summation symbol This indicates a weighted summation of all bytes within a specified range, with the weights determined by... The power of the byte position is determined by the byte's position, ensuring that each byte and its position uniquely contribute to the final checksum. In this embodiment, the prime base... Set to 31, a large prime number Set as The choice of these two values is to effectively reduce the probability of hash collisions in practical applications, thereby enhancing the reliability of data integrity verification.
[0037] Based on the above parameters, the actual calculation is as follows: the amino acid definition data block is "00011110", and its decimal value is 30. The synonymous mutation auxiliary data block is [0, 67], therefore , Parameter values are assigned as follows: , , , .
[0038] Substitute into the formula for calculation: Part 1 (Amino acid definition data block): .
[0039] Part Two (Synonymous Mutation Auxiliary Data Block): .
[0040] Add the two results together and take the modulo: Calculated data integrity check code It is 97.
[0041] Finally, the file construction submodule creates the file header index area. The calculated starting byte offset address 24 of the amino acid definition data block, the starting byte offset address 25 of the synonymous mutation auxiliary data block, and the data integrity check code 97 are all converted to 64-bit unsigned integer format and written to the specified positions in the file header index area. Subsequently, strictly following the calculated offset addresses, the amino acid definition data block (1 byte) and the synonymous mutation auxiliary data block (2 bytes) are appended after the file header. Ultimately, a columnar gene storage file with a total size of 24 + 1 + 2 = 27 bytes is generated, containing the index, core data, and check information.
[0042] The above embodiments illustrate preferred embodiments of the present invention. Any equivalent adjustments to the technical solution based on software engineering methods are within the scope of protection, including but not limited to: implementing algorithm logic using different programming languages, refactoring functional modules into services, adjusting data interaction protocols, and optimizing resource scheduling strategies. Any implementation scheme derived from reasonable modifications to the data processing flow, service call chain, or system architecture layer without departing from the core technology of the present invention should be considered within the scope of protection defined by the claims of the present invention.
Claims
1. A cloud computing-based lung cancer gene data management system, characterized by, The system comprises: A sequence deconstruction module, which calculates the position offset of base characters in lung cancer patient gene exon sequence data based on protein translation start site coordinates and performs a modulo operation, and divides the base characters into a sequence container set of first base containers, middle base containers, or last base containers based on the remainder results of the modulo operation; A high-frequency coding module, which counts the frequency of the base characters in the first base containers and the middle base containers, constructs a Huffman binary tree based on the frequency, and replaces the base characters with a binary bit string generated by the Huffman binary tree to generate an amino acid definition data block; A variation difference module, which compares the base characters in the last base container with reference bases of a reference last sequence to generate a no-change identification bit or a variation character record, and fuses the no-change identification bit and the variation character record to generate a synonymous mutation auxiliary data block; An index storage module, which calculates the byte length of the amino acid definition data block and the synonymous mutation auxiliary data block, generates a start byte offset address, and constructs a file header index area, and generates a columnar gene storage file by combining the file header index area, the amino acid definition data block, and the synonymous mutation auxiliary data block. 2.The cloud-computing based lung cancer gene data management system according to claim 1, wherein, The sequence container set comprises first base containers, middle base containers, and last base containers, the amino acid definition data block is specifically a binary bit string, the synonymous mutation auxiliary data block comprises a no-change identification bit and a variation character record, the file header index area comprises a start byte offset address, and the columnar gene storage file comprises a file header index area, an amino acid definition data block, and a synonymous mutation auxiliary data block. 3.The cloud-computing based lung cancer gene data management system according to claim 1, wherein, The specific function of the sequence deconstruction module is: A coordinate positioning submodule, which obtains a genome annotation file matched with lung cancer patient gene exon sequence data to be processed from a genome database of a cloud computing platform, parses the genome annotation file, and extracts protein translation start site coordinates corresponding to each exon in the lung cancer patient gene exon sequence data; An offset calculation submodule, which traverses each base character in the lung cancer patient gene exon sequence data, takes the protein translation start site coordinates corresponding to the exon to which the base character belongs as a reference, calculates the difference between the absolute position of each base character in the sequence and the reference, and obtains the position offset of a plurality of base characters; A grouping and collection submodule, which performs a modulo-3 remainder operation on each position offset to obtain a remainder result, and according to the values of the remainder results being 0, 1, or 2, respectively collects the corresponding base characters into a preset first base container, middle base container, or last base container, and generates a sequence container set after completing the allocation of all base characters. 4.The cloud-computing based lung cancer gene data management system according to claim 3, wherein, The specific logic of the grouping and collection submodule for dividing the base characters into differentiated containers is: Obtain the position offset, and apply a modulo-3 remainder operation to the position offset to obtain the remainder result, which determines the position of the base character in the triplet codon to which it belongs. determining the value of the remainder result, when the remainder result is equal to 0, determining that the current base character is the first base of the codon and storing it in the first base container, when the remainder result is equal to 1, determining that it is the middle base of the codon and storing it in the middle base container, when the remainder result is equal to 2, determining that it is the last base of the codon and storing it in the last base container; After processing all the position offsets, the first base container, the middle base container and the last base container filled with data are packaged into the sequence container set. 5.The cloud-computing based lung cancer gene data management system according to claim 1, wherein, The specific function of the high-frequency coding module is: The frequency statistics submodule integrates all the base characters in the first base container and the middle base container, counts the total number of occurrences of the four standard base characters, and calculates the occurrence frequency of each base character according to the ratio of the total number of occurrences to the total number of characters after integration. The tree construction submodule takes each base character and the corresponding occurrence frequency as an independent leaf node, iteratively selects the two nodes with the smallest frequency from all current nodes to merge and generate a current parent node, and sets the frequency value of the parent node as the sum of the frequency values of the two child nodes, until all nodes are merged into a root node, and the Huffman binary tree is constructed. The encoding replacement submodule assigns binary code "0" to all left branch paths and binary code "1" to all right branch paths from the root node of the Huffman binary tree, thereby generating a variable-length binary bit string for each leaf node represented by the base character, and replacing the original character to generate an amino acid definition data block. 6.The cloud-computing based lung cancer gene data management system according to claim 5, wherein, The process of generating the amino acid definition data block by the encoding replacement submodule is as follows: Based on the constructed Huffman binary tree, a base encoding mapping table is created, which stores four standard base characters and their unique corresponding binary bit strings. According to the original sequence order, all base characters in the first base container are read in sequence, for each read base character, the base encoding mapping table is queried to obtain the corresponding binary bit string, and all obtained binary bit strings are spliced in sequence to form a first base encoding string. The same query and splicing logic is used to process the middle base container to form a middle base encoding string, and the first base encoding string and the middle base encoding string are sequentially connected and byte-aligned to generate the amino acid definition data block. 7.The cloud-computing based lung cancer gene data management system according to claim 1, wherein, The specific function of the variation difference module is: The reference acquisition submodule extracts the standard sequence including only the third position base of the codon in the corresponding gene region from the standard human genome database of the cloud computing platform according to the identification information of the lung cancer patient gene exon sequence data, and constructs a reference last sequence. The difference comparison submodule performs one-to-one and position-synchronous difference comparison between the patient base character sequence in the last base container and the reference base sequence in the reference last sequence, and generates a no change identification bit if the patient base character is consistent with the reference base at the same position. The data fusion sub-module records the ASCII code or self-defined code of the patient base character as the variation character if the base character is inconsistent with the reference base, and serially fuses all the non-change identification bits and the variation character in the original sequence order to generate a synonymous mutation auxiliary data block. 8.The cloud-computing based lung cancer gene data management system according to claim 7, wherein, The generation process of the synonymous mutation auxiliary data block is specifically as follows: initializing an empty synonymous mutation auxiliary data block and a counter for recording the number of continuous non-variation bases; sequentially traversing the output alignment result, adding one to the value of the counter when the result is the non-change identification bit, and first judging the value of the counter when the result is the variation character record, if the value is greater than a preset run-length encoding compression threshold, converting the counter value into a target run-length encoding and writing it into the synonymous mutation auxiliary data block, then appending the current variation character record and resetting the counter; if the value of the counter does not exceed the run-length encoding compression threshold when the variation character record is encountered, directly writing the corresponding number of original non-change identification bits, then appending the variation character record, and performing the same run-length encoding judgment and writing operation on the tail counter value after traversal to generate the synonymous mutation auxiliary data block. 9.The cloud-computing-based lung cancer gene data management system of claim 1, wherein, The specific function implementation of the index storage module is as follows: The length measurement sub-module receives the amino acid definition data block and the synonymous mutation auxiliary data block, calculates and obtains the byte length of the amino acid definition data block and the byte length of the synonymous mutation auxiliary data block; The offset address generation sub-module calculates the starting byte offset address of the amino acid definition data block as the file header fixed length value according to a predefined file header fixed length, and calculates the starting byte offset address of the synonymous mutation auxiliary data block as the sum of the file header fixed length and the byte length of the amino acid definition data block; The file construction sub-module creates the file header index area and writes the two calculated starting byte offset addresses into it, and strictly according to the calculated offset addresses, sequentially appends the amino acid definition data block and the synonymous mutation auxiliary data block to the file to generate a columnar gene storage file. 10.The cloud-computing-based lung cancer gene data management system according to claim 9, wherein, The file header index area also includes a data integrity check code, and the generation process of the data integrity check code is specifically as follows: Before the file construction sub-module writes the amino acid definition data block and the synonymous mutation auxiliary data block into the columnar gene storage file, a verification operation is performed on the contents of the amino acid definition data block and the synonymous mutation auxiliary data block; The data integrity check code is calculated by the following formula: ; wherein, represents the data integrity check code, represents the byte length of the amino acid definition data block, represents the byte length of the synonymous mutation auxiliary data block, represents the value of the i-th byte in the amino acid definition data block, represents the value of the j-th byte in the synonymous mutation auxiliary data block, represents the byte position index of the amino acid definition data block, represents the byte position index of the synonymous mutation auxiliary data block, represents a preset prime base, represents a large prime number for modulus operation; The calculated data integrity check code is written into the file header index area together with the starting byte offset address, and the data integrity check code is used to verify the integrity of the columnar gene storage file by re-executing the verification operation and comparing the check code during data reading. The data fusion sub-module records the ASCII code or self-defined code of the patient base character as the variation character if the base character is inconsistent with the reference base, and serially fuses all the non-change identification bits and the variation character in the original sequence order to generate a synonymous mutation auxiliary data block. The generation process of the synonymous mutation auxiliary data block is specifically as follows: initializing an empty synonymous mutation auxiliary data block and a counter for recording the number of continuous non-variation bases; sequentially traversing the output alignment result, adding one to the value of the counter when the result is the non-change identification bit, and first judging the value of the counter when the result is the variation character record, if the value is greater than a preset run-length encoding compression threshold, converting the counter value into a target run-length encoding and writing it into the synonymous mutation auxiliary data block, then appending the current variation character record and resetting the counter; if the value of the counter does not exceed the run-length encoding compression threshold when the variation character record is encountered, directly writing the corresponding number of original non-change identification bits, then appending the variation character record, and performing the same run-length encoding judgment and writing operation on the tail counter value after traversal to generate the synonymous mutation auxiliary data block. The specific function implementation of the index storage module is as follows: The length measurement sub-module receives the amino acid definition data block and the synonymous mutation auxiliary data block, calculates and obtains the byte length of the amino acid definition data block and the byte length of the synonymous mutation auxiliary data block; The offset address generation sub-module calculates the starting byte offset address of the amino acid definition data block as the file header fixed length value according to a predefined file header fixed length, and calculates the starting byte offset address of the synonymous mutation auxiliary data block as the sum of the file header fixed length and the byte length of the amino acid definition data block; The file construction sub-module creates the file header index area and writes the two calculated starting byte offset addresses into it, and strictly according to the calculated offset addresses, sequentially appends the amino acid definition data block and the synonymous mutation auxiliary data block to the file to generate a columnar gene storage file. The file header index area also includes a data integrity check code, and the generation process of the data integrity check code is specifically as follows: Before the file construction sub-module writes the amino acid definition data block and the synonymous mutation auxiliary data block into the columnar gene storage file, a verification operation is performed on the contents of the amino acid definition data block and the synonymous mutation auxiliary data block; The data integrity check code is calculated by the following formula: The calculated data integrity check code is written into the file header index area together with the starting byte offset address, and the data integrity check code is used to verify the integrity of the columnar gene storage file by re-executing the verification operation and comparing the check code during data reading.