A method and apparatus for high-order chromatin interaction index establishment and display
By constructing a single data container file based on independently locatable data blocks and an embedded index library, the lag problem of high-order chromatin interaction indexing systems is solved, achieving seamless integration between fast browsing at the regional level and drill-down to details at the evidence level, improving interaction efficiency and stability, and supporting scalable index construction for large-scale data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-26
AI Technical Summary
Existing high-order chromatin interaction indexing systems suffer from lag during user interaction and browsing, especially when large-scale data introduces a large number of random I/O operations and uncontrollable memory usage, resulting in interaction latency and a degraded user experience.
Using independently locatable data blocks as the basic writing unit, a single data container file is constructed and bound to an embedded index library. Efficient support for regional queries and evidence drill-down is achieved through the first and second mapping relationships. Combined with streaming parsing, bucket buffering, local sorting and disk flushing, and K-way merging, memory thresholds are controlled to achieve seamless integration of fast browsing and evidence-level details.
It improves the access efficiency and response stability of high-order chromatin interaction data, reduces memory consumption, ensures response speed and interpretability in interactive browsing scenarios, and supports scalable construction of large-scale data and predictable resource utilization.
Smart Images

Figure CN122290704A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical data processing, and in particular to a method and apparatus for establishing and displaying a high-order chromatin interaction index. Background Technology
[0002] Multi-channel interactive data typically uses read evidence as the basic unit, with the same read often corresponding to multiple genomic fragments, thus naturally forming hyperedge objects. In real-world applications, the data size often exceeds 100GB, and the following requirements must be met simultaneously during interactive browsing: rapid summary rendering under region sliding or zooming operations; the ability to perform evidence drill-down operations on specific regions or selected objects and return traceable read evidence; and maintaining predictable memory peaks on desktops or other resource-constrained environments to ensure the stability of the interactive process.
[0003] Existing high-order chromatin interaction indexing systems mostly employ text file stacking, general columnar files, or project multi-channel interaction data into a two-dimensional matrix for display using a general-purpose Hi-C browser. However, these display methods often require scanning the entire file during region queries or repeatedly calculating large datasets, leading to a significant increase in interaction latency as the file size grows. Furthermore, when a system attempts to uniformly support multiple interaction analysis objects within the same data structure—for example, simultaneously supporting hyperedge evidence, multi-resolution one-dimensional region summary slices, two-dimensional matrix slices, and multimodal overlay information—it often introduces a large number of random I / O operations and uncontrollable memory consumption. This results in noticeable lag during interactive browsing on desktop, severely reducing user browsing efficiency and experience.
[0004] Therefore, there is an urgent need for a method and apparatus for establishing and displaying high-order chromatin interaction indexes. Summary of the Invention
[0005] This application provides a method and apparatus for establishing and displaying a high-order chromatin interaction index, which solves the problem of lag in existing high-order chromatin interaction index systems during user interactive browsing.
[0006] The first aspect of this application provides a method for establishing and displaying a high-order chromatin interaction index. The method includes: constructing a single data container file using independently locatable data blocks as basic writing units, and writing interaction analysis data units into the single data container file; the interaction analysis data unit includes a one-dimensional region summary slice identifier and a read evidence block; constructing an embedded index library bound to the single data container file; the embedded index library includes a first mapping relationship and a second mapping relationship; the first mapping relationship maps the summary slice identifier to the location of the one-dimensional region summary slice identifier. Write cell location; the second mapping relationship is to map the read segment identifier to the read segment evidence block. Write the cell location; respond to the target user's browsing request for the results of the high-order chromatin interaction analysis, determine the request stage corresponding to the browsing request; when the request stage is the region query stage, generate a summary view based on the window range of the browsing request and the first mapping relationship; when the request stage is the evidence drill-down stage, generate hyperedge evidence based on the read segment identifier in the browsing request and the second mapping relationship; display the summary view or hyperedge evidence as the corresponding browsing request result to the target user.
[0007] Optionally, constructing independently locatable data blocks specifically includes: generating corresponding block record information for each data block, the block record information including a type field indicating the content category of the data block, an offset field indicating the physical location of the data block in a single data container file, a length field indicating the byte range occupied by the data block, a compression mark indicating whether the data block has been compressed, and a verification field for integrity verification.
[0008] Optionally, the interaction analysis data unit also includes two-dimensional sparse matrix slices and multimodal overlay information, constructing an embedded index library bound to a single data container file. Specifically, this includes constructing a third mapping relationship, which maps the coordinates of the matrix slices to the coordinates of the two-dimensional sparse matrix slices. Write the cell location; construct the fourth mapping relationship, which maps the multimodal superposition description information to the location of the multimodal superposition information. Write the cell location; multimodal superposition description information includes methylation description information, haplotype description information, structural variation description information, and single-cell tag description information; store the third mapping relationship and the fourth mapping relationship to the embedded index library.
[0009] Optionally, determining the request stage corresponding to the browsing request specifically includes: determining whether the browsing request meets a first determination condition, wherein the first determination condition is that it contains coordinate range information and display scale information, and does not contain an evidence request mark used to indicate evidence drilling; if the browsing request meets the first determination condition, then the request stage is confirmed as the area query stage; determining whether the browsing request meets a second determination condition, wherein the second determination condition is that it contains any one of the reading segment identifier set, the selected object identifier, or the evidence request mark; if the browsing request meets the second determination condition, then the request stage is confirmed as the evidence drilling stage.
[0010] Optionally, before displaying the summary view or hyperedge evidence as the corresponding browsing request result to the target user, the method further includes: setting the decompressed data block used to generate the browsing request result, and executing a replacement strategy according to the byte upper limit cache constraint; the replacement strategy includes one or more of the LRU strategy, ARC strategy, or clock-pro strategy.
[0011] Optionally, after displaying the summary view or hyperedge evidence as the corresponding browsing request result to the target user, the method further includes, during the construction and browsing process, constraining the peak memory usage of a single data container file and the embedded index library, specifically including: S1, reading and parsing interaction data records in a streaming manner, and generating key-value records for sorting and aggregation based on the interaction data records; S2, distributing key-value records to multiple bucket buffers according to chromosome, genome window, or hash rules; S3, when any bucket buffer reaches a preset memory threshold, performing local sorting processing on the key-value records temporarily stored in the bucket buffer, and flushing the sorting results to disk to generate the corresponding intermediate result file; S4, processing multiple key-value records generated in the same bucket buffer... K-way merge processing is performed on the intermediate result files to obtain an ordered stream, and online aggregation processing is performed based on key-value records during the merging process. The online aggregation process involves merging, deduplicating, and sorting multiple interacting segments with the same read segment identifier, and writing the merged segment set into the read segment evidence block. S5: Key-value boundary detection is performed on the ordered stream, and an independently locatable data block is generated when a boundary position where the key value changes is detected. S6: The independently locatable data blocks are written into a single data container file in a preset order, and index entries for writing into the embedded index library are generated simultaneously. S7: Steps S1 to S6 are divided into multiple parallel stages and connected by a bounded queue to achieve I / O and CPU overlap and constrain the peak memory usage.
[0012] Optionally, generating an abstract view specifically includes: establishing at least two linked windows, each linked window maintaining a corresponding genome coordinate range and display modality; for any changes in coordinates within the linked window, selecting a slice resolution from a preset resolution set based on the window scale; generating a set of abstract slice identifiers for the current linked window and its corresponding domain based on the slice resolution; performing batch positioning based on a first mapping relationship and reading the first target data block corresponding to the set of abstract slice identifiers; and rendering the first target data block as an abstract view.
[0013] Optionally, generating super-edge evidence specifically includes: obtaining the second target data block corresponding to the read segment evidence block by offset positioning based on the second mapping relationship; obtaining super-edge evidence by parsing the second target data block; overlaying the super-edge evidence on the summary view of the linked window, and establishing a backtracking association between the super-edge evidence and the read segment evidence block to support backtracking from the super-edge evidence to the corresponding original read segment evidence.
[0014] A second aspect of this application provides a device for establishing and displaying a high-order chromatin interaction index. The device includes an acquisition module and a processing module, wherein... The acquisition module is used to construct a single data container file using independently locatable data blocks as basic writing units, and to write interaction analysis data units into the single data container file. The interaction analysis data unit includes a one-dimensional region summary slice identifier and a read segment evidence block. An embedded index library is constructed and bound to the single data container file. The embedded index library includes a first mapping relationship and a second mapping relationship. The first mapping relationship maps the summary slice identifier to the location of the one-dimensional region summary slice identifier. Write cell location; the second mapping relationship is to map the read segment identifier to the read segment evidence block. Write cell location.
[0015] The processing module is used to respond to the target user's browsing request for the results of high-order chromatin interaction analysis, determine the request stage corresponding to the browsing request; when the request stage is the region query stage, generate a summary view based on the window range of the browsing request and the first mapping relationship; when the request stage is the evidence drill-down stage, generate hyperedge evidence based on the read segment identifier in the browsing request and the second mapping relationship; and display the summary view or hyperedge evidence as the corresponding browsing request result to the target user.
[0016] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described above.
[0017] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing a computer program, the computer program being executed by a processor using any of the methods described above.
[0018] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. Using independently locatable data blocks as the basic writing unit, a single data container file is constructed, and interaction analysis data units are written into the single data container file; an embedded index library is constructed bound to the single data container file; the embedded index library includes a first mapping relationship and a second mapping relationship; when the request stage is a regional query stage, a summary view is generated based on the window range of the browsing request and the first mapping relationship; when the request stage is an evidence drill-down stage, hyperedge evidence is generated based on the read segment identifier in the browsing request and the second mapping relationship; the summary view or hyperedge evidence is displayed to the target user as the corresponding browsing request result, thereby achieving unified support for regional-level fast browsing and evidence-level fine drill-down within the same data system, avoiding full file scanning and redundant calculations, and improving the access efficiency, response stability, and predictability of resource utilization of high-order chromatin interaction data in interactive browsing scenarios.
[0019] 2. By performing streaming parsing, bucketing buffering, local sorting and disk flushing under controlled memory thresholds, K-way merging and online aggregation on the interaction data records, and generating independently locatable data blocks at key-value boundaries and synchronously writing them to a single data container file and an embedded index library, the above processing flow is divided into multiple parallel stages connected by bounded queues. This enables scalable construction of large-scale high-order chromatin interaction data while ensuring complete aggregation of read segment evidence and index consistency. It significantly reduces the pressure of full sorting and memory usage, decouples and controls the I / O and computational overhead of the database construction process, and achieves predictable peak memory usage, stable throughput efficiency, and index construction effect suitable for ultra-large data scales.
[0020] 3. By adaptively selecting the summary slice resolution based on the window scale under multiple linked windows, and relying on the first mapping relationship to achieve batch positioning and fast rendering of summary slices, and simultaneously, based on the second mapping relationship to accurately locate and parse the reading segment evidence block according to the offset when the user triggers drill-down, a seamless connection between regional summary browsing and evidence-level detail drill-down is achieved in the same interactive process. This significantly reduces random I / O and repeated parsing overhead while ensuring the traceability of evidence, and improves the response speed, interpretability, and overall browsing experience stability of high-order chromatin interaction data in interactive browsing scenarios. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating a method for establishing and displaying a high-order chromatin interaction index provided in an embodiment of this application; Figure 2 This is a schematic diagram of a module for establishing and displaying a high-order chromatin interaction index, provided in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0022] Explanation of reference numerals in the attached figures: 21. Acquisition module; 22. Processing module; 301. Processor; 302. Communication bus; 303. User interface; 304. Network interface; 305. Memory. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0024] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0025] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0026] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0027] Please refer to Figure 1 The flowchart illustrates a method for establishing and displaying a high-order chromatin interaction index provided in an embodiment of this application. The flowchart mainly includes the following steps: S101 to S106.
[0028] Step S101: Using independently locatable data blocks as basic writing units, construct a single data container file and write the interaction analysis data units into the single data container file.
[0029] Specifically, a single data container file is created as a unified data carrier, and contiguous write space is reserved within this single data container file. Then, using independently locatable data blocks as the smallest write granularity, the parsed and aggregated interaction analysis data units are encapsulated. Each independently locatable data block corresponds to a contiguous byte range within the container file, and its starting offset and data length are determined during writing. In this step, the interaction analysis data units include at least the following different types of data: one-dimensional region summary slice related data for browsing at multiple resolutions, read evidence block data for evidence-level drill-down, two-dimensional sparse matrix slice data, and multimodal overlay information data. The one-dimensional region summary slice related data represents statistical and summary information of genomic regions at different resolutions. Each region summary slice contains statistical data of the genomic region, such as coverage, counts, or sparse summarization information; read evidence block data refers to the encapsulation of read information related to higher-order chromatin interactions in the original sequencing data into data blocks. Each read evidence block contains multiple interacting fragments associated with a specific chromosomal segment. This fragment information typically includes genomic coordinates, orientation, and length. Two-dimensional sparse matrix slice data represents chromatin interaction relationships within the genome. This data represents the interaction relationships between genomic regions within a chromosomal or genomic window. Because these relationships are typically sparse—meaning not all regions interact—the matrix is sparse, recording only interacting region pairs. Each slice in this matrix corresponds to a specific resolution level, and the sparsity of the matrix allows for efficient representation of large-scale interaction data in the genome. Multimodal overlay information data is used to represent additional information related to chromosomal interactions, such as methylation, haplotypes, structural variations, and single-cell tags. This information is usually presented along with genomic data, providing users with more contextual information to help analyze and interpret chromatin interaction data. For example, methylation information can characterize the regulatory state of gene expression, while haplotype information can be used to understand the impact of genetic variations on interaction patterns.
[0030] The aforementioned data can be written sequentially to a single data container file in a preset order, thus forming a data structure at the physical level consisting of multiple independently locatable data blocks arranged sequentially. By using independently locatable data blocks as the basic writing unit, subsequent random access to any interactive analysis data unit in the single data container file based on offset and length is possible, providing the prerequisites for establishing mapping relationships in the embedded index library and for regional queries and evidence drill-down access.
[0031] In one possible implementation, step S101 further includes: generating corresponding block record information for each data block, the block record information including a type field for indicating the content category of the data block, an offset field for indicating the physical location of the data block in a single data container file, a length field for indicating the byte range occupied by the data block, a compression mark for indicating whether the data block has been compressed, and a verification field for integrity verification.
[0032] Specifically, a data block refers to an interaction analysis data unit that has been written into a single data container file. Each data block carries a specific type of genomic data, such as regional summary slice data for regional browsing, read evidence block data for evidence-level drill-down, matrix data for two-dimensional sparse matrix slices, or multimodal overlay information. To enable independent location and retrieval of these data blocks within a file, each data block generates a block record containing the following aspects: The record uses a type field to indicate the specific content type of the data block, such as whether it is a region summary slice, a read evidence block, a two-dimensional matrix slice, or multimodal overlay information; an offset field indicates the physical location of the data block within a single data container file, i.e., the starting byte offset position of the data block, which, together with the length field, helps the system quickly locate and retrieve the data block; a length field indicates the byte length of the data block, i.e., the number of bytes occupied by the data block, thus ensuring that the data boundaries are not exceeded during retrieval; a compression flag field indicates whether the data block has been compressed; if compressed, this field will mark it as compressed, and decompression is determined based on this flag during decompression; a checksum field stores a checksum value, such as a hash value or CRC code, ensuring that the data has not been corrupted during storage and transmission. This field can be used for integrity verification when retrieving the data block, ensuring data accuracy.
[0033] Step S102: Construct an embedded index library for binding a single data container file; the embedded index library includes a first mapping relationship and a second mapping relationship.
[0034] Specifically, firstly, the system generates corresponding index entries for each interaction analysis data unit in a single data container file and writes these index entries into an embedded index library. The embedded index library includes two main mapping relationships: the first mapping relationship maps the abstract slice identifier to the one-dimensional region abstract slice identifier. The first mapping is the cell location, meaning that this mapping allows a region-level summary slice to be directly located to a specific data block location in the container file using its identifier; the second mapping maps the read segment identifier to the location of the read segment evidence block. The write cell location ensures that each read segment evidence block can be accurately located to its specific storage location in the container file based on the read segment identifier, thereby supporting evidence drill-down query operations.
[0035] In this step, the embedded index maintains these mapping relationships, enabling access to interaction analysis data units to directly locate physical data blocks via the index, eliminating the need for a full scan of the container file and improving the efficiency and accuracy of data access. Each mapping relationship ensures efficient execution of region queries and evidence drill-down by mapping different types of data to their positions within the container file. Furthermore, the embedded index is bound to a single data container file, creating a tight physical coupling between the two and enabling random access, real-time querying, and efficient data parsing. The first mapping relationship maps the summary slice identifier to the location of the one-dimensional region summary slice identifier. Write cell location; the second mapping relationship is to map the read segment identifier to the read segment evidence block. Write cell location.
[0036] In one possible implementation, step S102 further includes: constructing a third mapping relationship, wherein the third mapping relationship maps the coordinates of the matrix slice to the coordinates of the two-dimensional sparse matrix slice. Write the cell location; construct the fourth mapping relationship, which maps the multimodal superposition description information to the location of the multimodal superposition information. Write the cell location; multimodal superposition description information includes methylation description information, haplotype description information, structural variation description information, and single-cell tag description information; store the third mapping relationship and the fourth mapping relationship to the embedded index library.
[0037] Specifically, in addition to mapping the region summary slice identifier and read segment identifier to the corresponding write unit location, the system also needs to construct additional mapping relationships for the two-dimensional sparse matrix slice data and multimodal overlay information data. First, a third mapping relationship is constructed, which maps the matrix slice coordinates to the location of the two-dimensional sparse matrix slice. First, the cell location is written so that the physical location containing the matrix slice data can be accurately located during subsequent data reading. Second, a fourth mapping relationship is constructed, which maps the multimodal superposition description information to the location of the multimodal superposition information. Write cell location. Multimodal superposition description information includes methylation description information, haplotype description information, structural variation description information, single-cell tag description information, etc., which, together with genomic data, are used to comprehensively analyze the mechanisms of chromatin interactions.
[0038] These mapping relationships complement the aforementioned mapping relationships of regional summary slices and read evidence blocks, together forming a complete indexing system that enables all different types of data to be accurately mapped to physical data storage locations based on their respective identifiers and coordinates.
[0039] Step S103: In response to the target user's request to view the results of the high-order chromatin interaction analysis, determine the request stage corresponding to the view request.
[0040] Specifically, the stage of the request is determined based on the input information in the browsing request, and corresponding processing methods are adopted according to different stages of the request to ensure the accuracy and efficiency of the data. Different request stages trigger different query paths and data return strategies.
[0041] In one possible implementation, step S103 further includes: determining whether the browsing request meets a first determination condition, wherein the first determination condition is that it includes coordinate range information and display scale information, and does not include an evidence request mark used to indicate evidence drilling; if the browsing request meets the first determination condition, then confirming that the request stage is the area query stage; determining whether the browsing request meets a second determination condition, wherein the second determination condition is that it includes any one of a set of reading segment identifiers, a selected object identifier, or an evidence request mark; if the browsing request meets the second determination condition, then confirming that the request stage is the evidence drilling stage.
[0042] Specifically, upon receiving a browsing request from the target user, the system first parses the parameters carried in the request and then performs stage-based judgment based on pre-defined rules. The system determines whether the browsing request simultaneously contains coordinate range information to define the browsing area and display scale information to characterize the current display precision. It further determines whether the browsing request does not contain an evidence request marker to indicate evidence drilling. When the browsing request meets the first judgment condition of containing coordinate range information and display scale information but not an evidence request marker, the system identifies the browsing request as a request corresponding to the regional query stage, thereby triggering a regional-level browsing processing path based on one-dimensional regional summary slices. On the other hand, the system also determines whether the browsing request contains any one of the following: a set of read segment identifiers, a selected object identifier, or an evidence request marker. When the browsing request meets the second judgment condition, the system identifies the browsing request as a request corresponding to the evidence drilling stage, thereby triggering an evidence-level parsing and hyper-edge evidence generation processing path based on read segment evidence blocks. Through the above-mentioned determination method, the system can distinguish between the regional query stage and the evidence drill-down stage based on the parameter characteristics of the browsing request itself without introducing additional user interaction, and provide a clear basis for subsequently adopting different index mapping relationships and data access methods.
[0043] Step S104: When the request stage is the regional query stage, a summary view is generated based on the window range of the browsing request and the first mapping relationship.
[0044] Specifically, in this embodiment, when a browsing request is determined to be in the region query stage, the system determines the target genome region based on the window range information carried in the browsing request, and selects a one-dimensional region abstract slice resolution that matches the current window scale from a preset resolution set, in conjunction with the display scale corresponding to the window range. Subsequently, the system generates a set of abstract slice identifiers corresponding to the window range and its adjacent regions based on the selected resolution, and maps the set of abstract slice identifiers to the data block location in a single data container file that carries the corresponding one-dimensional region abstract slice using a first mapping relationship. After locating and reading the data block, the system parses and aggregates the abstract slice data in the data block, and converts the parsing results into a visualized abstract view according to the display modality, so as to support the target user's regional browsing of higher-order chromatin interactions within the window range.
[0045] In one possible implementation, step S104 further includes: establishing at least two linked windows, each linked window maintaining a corresponding genome coordinate range and display modality; for any change in coordinates in the linked window, selecting a slice resolution from a preset resolution set according to the window scale; generating a set of abstract slice identifiers for the current linked window and its corresponding domain based on the slice resolution; performing batch positioning based on a first mapping relationship and reading the first target data block corresponding to the set of abstract slice identifiers; and rendering the first target data block as an abstract view.
[0046] Specifically, during the region query phase, when generating the abstract view, at least two linked windows are first established. Each linked window maintains its own corresponding genome coordinate range and display modality to support simultaneous browsing at multiple scales and angles. When the genome coordinate range in any linked window changes due to scrolling or scaling, the system automatically selects a matching one-dimensional region abstract slice resolution from a preset resolution set based on the current display scale of that window, to avoid loading too much fine-grained slice data within a large window range. Based on the selected resolution, the system generates a set of abstract slice identifiers covering the current linked window range and its adjacent regions, and performs batch positioning operations on the abstract slice identifier set based on a first mapping relationship, thereby reading the first target data block carrying the corresponding abstract slice in a single data container file. After completing the data block reading and parsing, the system renders the abstract slice data in the first target data block into a region-level abstract view according to the display modality corresponding to each linked window, maintaining a consistent spatial alignment across multiple linked windows.
[0047] During resolution selection, the system uses the constraint that the number of slices within the window does not exceed a preset upper limit. By adjusting the slice resolution, the system limits the data size required for a single region query. Let the preset resolution set be... The window length is Then at the selected resolution At that time, the number of slices that need to be loaded in the window Approximately satisfies:
[0048] in, This indicates the length of the genome region currently covered by the linked window. Indicates the resolution of the selected abstract slice. This indicates the number of summary slices that need to be loaded within the viewport at this resolution. The system selects an appropriate... , making Limited to a preset upper limit This ensures the continuity of the abstract while avoiding the amplification of random readings caused by an excessive number of abstract slices.
[0049] During multi-window linkage, the system also synchronizes and maintains the scrolling, zooming, selected object, and bookmark states to ensure that multiple linked windows maintain a consistent browsing state under interactive operations. At the same time, the system serializes the coordinate range, resolution selection result, display mode, and selection state of the linked windows to form shareable deep link parameters, so as to support reproducible access to the same browsing state in the future.
[0050] From the perspective of access cost, during the regional query phase, the system performs batch location and reading of summary slices based on the index. The overall access complexity of its regional query can be expressed as: in, This indicates the number of index entries in the embedded index library. This indicates the number of summary slices loaded within the current viewport. This represents the number of evidence data blocks that may be read during subsequent evidence drill-down phases. This complexity expression reflects that region queries are primarily affected by index lookups and the number of slices, and are decoupled from the overall size of a single data container file.
[0051] Regarding memory usage, although step S104 itself focuses on summary generation during the browsing phase, its resolution selection and batch reading strategy work in conjunction with the memory constraint mechanism of the database construction phase. In the database construction phase, the number of buckets is set to... The bucket buffer threshold is Then the upper bound of the buffer memory used for database creation is approximately: Furthermore, by combining the capacity constraints of merging working sets and bounded queues, a predictable overall memory peak constraint can be formed; during the browsing phase, the number of summary slices... By limiting the data to a preset upper limit, the decompression and caching scale of the first target data block are also kept within a controllable range, thereby ensuring the stability and predictability of system memory usage during multi-window browsing.
[0052] Step S105: When the request stage is the evidence drill-down stage, generate hyperedge evidence based on the read segment identifier in the browsing request and the second mapping relationship.
[0053] Specifically, when a browsing request is determined to be in the evidence drill-down stage, the read segment identifier is extracted from the browsing request, and the read segment identifier is mapped to the physical location of the corresponding read segment evidence block based on the second mapping relationship. Subsequently, the system locates and reads the corresponding second target data block from a single data container file based on the physical location, parses the second target data block to recover multiple fragment information associated with the read segment identifier, and performs necessary normalization processing on the fragment information during the parsing process to form a high-order interaction object composed of multiple fragments corresponding to the same read segment identifier. After completing the above parsing and construction, the system outputs the high-order interaction object as hyperedge evidence for overlay display in the window, and provides a data foundation for subsequent backtracking from the hyperedge evidence to the original read segment evidence, thereby realizing drill-down browsing from regional-level summaries to evidence-level interaction details.
[0054] In one possible implementation, step S105 further includes: obtaining the second target data block corresponding to the read segment evidence block by offset positioning based on the second mapping relationship; obtaining the super-edge evidence by parsing the second target data block; overlaying the super-edge evidence on the summary view of the linked window, and establishing a backtracking association between the super-edge evidence and the read segment evidence block to support backtracking from the super-edge evidence to the corresponding original read segment evidence.
[0055] Specifically, once a browsing request is determined to be in the evidence drill-down stage, the system first maps the read segment identifier carried in the browsing request to the physical write location of the corresponding read segment evidence block based on the second mapping relationship. Then, based on the offset information of this write location, it locates and reads the second target data block corresponding to the read segment evidence block from a single data container file using a random access method. Since the second target data block is written to the single data container file as an independently locatable data block, the system can complete the accurate reading of the target read segment evidence without parsing irrelevant data.
[0056] After reading the second target data block, the system parses it to recover the interaction evidence associated with the read segment identifier. The parsing process includes extracting multiple fragments corresponding to the same read segment identifier from the second target data block, and performing sorting, deduplication, or structured processing on these fragments to form a higher-order interaction object with multiple fragments as endpoints. This higher-order interaction object is the hyperedge evidence. In this way, the system can convert read segment-level evidence, originally stored as data blocks, into a hyperedge representation that can be directly used for browsing and analysis.
[0057] After generating hyperedge evidence, the system overlays it onto the generated summary view in the linked window, allowing regional-level summaries and evidence-level interaction details to be visualized in the same spatial coordinate system. This enables users to intuitively switch between macro and micro levels. Simultaneously, the system establishes a retrospective association between the hyperedge evidence and its source read segment evidence block. This retrospective association includes at least the read segment identifier and physical offset information used to relocate the second target data block. When a user triggers a retrospective operation, the system can again locate the corresponding read segment evidence block based on the second mapping relationship and physical offset information, and display the original read segment evidence content consistent with the hyperedge evidence, thus achieving traceability and consistency in the evidence-level interaction analysis process.
[0058] Step S106: Display the summary view or hyperborder evidence as the corresponding browsing request result to the target user.
[0059] Specifically, after generating and updating the summary view or hyperedge evidence, the system displays the corresponding processing results as the browsing request results to the target user based on the browsing request stage. When the browsing request is in the region query stage, the system returns a summary view generated based on a one-dimensional region summary slice as the browsing result, used to display the regional distribution characteristics of higher-order chromatin interactions within the current window range in a linked window. When the browsing request is in the evidence drill-down stage, the system returns hyperedge evidence obtained and overlaid based on the parsed segment evidence block as the browsing result, used to present the evidence-level interaction details corresponding to the selected region or object to the target user. By displaying the summary view or hyperedge evidence to the target user on demand, the system completes the entire processing flow from browsing request parsing, index positioning, data block reading and parsing to visualization result output, enabling the target user to obtain interaction analysis results matching the current browsing request in a unified interactive interface.
[0060] In one possible implementation, step S106 further includes: setting the decompressed data block used to generate the browsing request result, and executing a replacement strategy according to the byte limit cache constraint; the replacement strategy includes one or more of the LRU strategy, ARC strategy, or clock-pro strategy.
[0061] Specifically, in this embodiment, to ensure stable return of summary views or hyperedge evidence in an interactive browsing scenario where continuous region queries and evidence drill-down alternate, the system sets a cache with a byte capacity limit for the decompressed data blocks used to generate browsing request results in step S106. When the total number of bytes occupied by the cache reaches the byte capacity limit, the decompressed data blocks in the cache are replaced according to a replacement strategy to limit the peak memory usage associated with a single data container file and embedded index library. The decompressed data blocks include the decompression result of the first target data block used to generate the summary view and the decompression result of the second target data block used to parse and generate hyperedge evidence, so that the summary path and the evidence path share the memory budget under a unified cache constraint.
[0062] During the region query phase, the system locates and reads the first target data block carrying the digest slice in batches according to the first mapping relationship. After reading, the first target data block is decompressed, and the decompressed data block content is written to the cache according to the cache key. The cache key is associated with at least the write unit position corresponding to the digest slice identifier set, so that when the linked window scrolls or zooms and accesses the same or adjacent digest slices again, the cache can be directly hit and the decompressed data block content can be reused, thereby reducing the overhead of repeated random reading and repeated decompression. During the evidence drill-down phase, the system locates and reads the second target data block carrying the read segment evidence block according to the second mapping relationship by physical offset. After decompressing the second target data block, the decompressed data block content is also written to the cache, so that when the user repeatedly selects different objects in the same area or repeatedly backtracks to the same read segment evidence, the decompressed read segment evidence block content can be reused to accelerate the generation and return of hyper-edge evidence.
[0063] When the cumulative number of bytes occupied by the decompressed data blocks saved in the cache approaches or reaches the byte capacity limit, the system triggers a replacement policy to eliminate cache entries, so as to release available byte space and allow new decompressed data blocks to enter the cache. The replacement policy can adopt the least recently used policy, by maintaining the recent access time or access sequence of cache entries, and preferentially eliminating the data blocks that have not been accessed for the longest time; the replacement policy can also adopt an adaptive replacement policy, by simultaneously maintaining the recent access set and the frequently accessed set and dynamically adjusting the proportion of the two, so that the cache can adaptively select a better elimination behavior between two different access modes of sequential browsing and repeated drilling down; the replacement policy can also adopt a clock-improved replacement policy, by setting an access bit for cache entries and approximately implementing the recent access characteristic in a clock-scanning manner, so as to reduce the management overhead brought by maintaining an accurate access sequence. Through the above methods, during the process of generating and returning the summary view or hyperedge evidence, the system limits the residence range of the decompressed data blocks within the configurable byte capacity limit, so as to make the interactive peak memory predictable and maintain the ability to return stable browsing request results in the case of multi-window linkage, prefetching and evidence drilling down coexisting.
[0064] In one possible implementation manner, step S106 further includes the following steps: S1 to S7.
[0065] Step S1, read and parse the interaction data records in a streaming manner, and generate key-value records for sorting and aggregation based on the interaction data records.
[0066] Specifically, read the interaction data records one by one from the interaction data source in a streaming manner. The interaction data records are the original records for characterizing the high-order chromatin interaction relationship or the preprocessed interaction records. Without loading the full amount of interaction data at one time, the system performs parsing processing on each read interaction data record, extracts the key information related to subsequent index construction and data aggregation from it, and generates key-value records for sorting and aggregation accordingly. The key-value records include at least one of the read segment identifier for identifying the read segment evidence and the summary slice identifier for identifying the regional summary slice. The key serves as the basis for sorting and aggregation, and the value part associated with the key carries the corresponding interaction fragment information or statistical information. By converting the original interaction data records into key-value record forms, the system can perform bucketing, sorting and online aggregation processing on the interaction data based on the key in subsequent steps, so as to provide a unified data processing entry for generating independently locatable data blocks and constructing a single data container file and an embedded index library, and at the same time ensure that the entire processing process progresses continuously under the condition of controlled memory.
[0067] Step S2, distribute the key-value records to multiple bucket buffers according to chromosomes, genome windows or hash rules.
[0068] Specifically, after key-value records are generated, they are divided and processed according to pre-defined distribution rules, and then distributed to multiple bucket buffers for temporary storage. The distribution rules can be determined based on chromosome identifiers carried in the key-value records, genomic window affiliations, or hash results performed on the key-value records, ensuring that key-value records with the same or similar spatial attributes, or those requiring unified processing in subsequent sorting and aggregation stages, are assigned to the same bucket buffer. Through this distribution method, the system splits the originally globally unordered key-value records into multiple local subsets, allowing subsequent sorting and aggregation operations to be performed independently at the bucket buffer level, thereby reducing the data size processed per instance and avoiding the memory pressure caused by global sorting. Simultaneously, each bucket buffer is independent and can receive and cache key-value records in parallel, providing the foundation for triggering local sorting and disk flushing operations when memory thresholds are reached.
[0069] Step S3: When any bucket buffer reaches a preset memory threshold, perform local sorting on the key-value records temporarily stored in the bucket buffer, and flush the sorting results to disk to generate the corresponding intermediate result file.
[0070] Specifically, the system continuously monitors the memory usage of temporary key-value records in each bucket buffer. When the cumulative memory usage of key-value records in any bucket buffer reaches a preset memory threshold, the system pauses writing new key-value records to that bucket buffer and performs local sorting on the currently temporary key-value records. Local sorting uses the key in the key-value record as the sorting primary key, ensuring that records with the same key value or those to be aggregated consecutively are arranged adjacently in the sorting result, thus providing ordered input for subsequent merging and online aggregation. After completing the local sorting, the system flushes the sorted key-value records to disk sequentially to generate the corresponding intermediate result file and releases the memory space occupied by the sorted records in the bucket buffer, allowing the bucket buffer to continue receiving new key-value records. By triggering local sorting and flushing to disk when the memory threshold is reached, the system decomposes the full sorting problem into multiple controlled-scale external sorting subtasks. While ensuring sorting correctness, it stably limits memory usage within the preset memory threshold, laying the foundation for subsequent multi-round merging processing and the generation of independently locatable data blocks.
[0071] Step S4: Perform K-way merge processing on multiple intermediate result files generated in the same bucket buffer to obtain an ordered stream, and perform online aggregation processing based on key-value records during the merge process; the online aggregation processing is to merge, deduplicate and sort multiple interactive segments with the same read segment identifier, and write the merged segment set into the read segment evidence block.
[0072] Specifically, for multiple intermediate result files generated by flushing the same bucket buffer to disk multiple times in step S3, the system simultaneously opens the intermediate result files after entering the merging phase and performs K-way merging on them. This generates a continuous ordered stream arranged according to the keys in the key-value records without reloading all the data into memory. During the K-way merging process, the system always reads the key-value record corresponding to the current smallest key-value from each intermediate result file in sequence, ensuring that the output ordered stream globally satisfies the requirement of monotonically increasing key-value order, thus providing a stable input structure for subsequent online aggregation.
[0073] During the merging process, the system uses the keys in the key-value records as the aggregation criterion. When consecutively output key-value records have the same read segment identifier, these key-value records are considered to be components of the same interaction evidence object, triggering online aggregation processing. Online aggregation processing includes collecting multiple interaction fragments corresponding to the same read segment identifier one by one, performing genomic coordinate-based sorting on the interaction fragments during the collection process, and performing deduplication on completely duplicated interaction fragments or those equivalent under preset tolerance conditions to avoid redundant fragments amplifying the data size in subsequent evidence analysis. Through the above merging, deduplication, and sorting processes, the system can directly form a structured and ordered set of interaction fragments during the merging stage.
[0074] When the system detects a change in the read segment identifier in the ordered stream, it indicates that all the interaction segments corresponding to the current read segment identifier have been aggregated. At this point, the system writes the set of interaction segments that have completed the aggregation process into the read segment evidence block, which serves as one of the components for generating independently locatable data blocks subsequently. By synchronously performing online aggregation processing during the K-way merging process, the system avoids secondary scanning or aggregation of the merge results, making the construction of the read segment evidence block closely integrated with the external sorting process. This effectively controls the scale of intermediate data and memory usage while ensuring the integrity and orderliness of the evidence.
[0075] Step S5: Perform key-value boundary detection on the ordered stream, and generate independently locatable data blocks when a boundary position where the key value changes is detected.
[0076] Specifically, after the system forms an ordered stream and completes online aggregation processing, it continuously performs key-value boundary detection on the ordered stream. Key-value boundary detection uses the keys in the key-value records as the criterion to determine whether the key of the current output record is consistent with the key of the previous output record. When consecutively output key-value records have the same key, the system treats the corresponding aggregation results as part of the same interaction analysis data unit and continues to accumulate them. When a discrepancy is detected between the current key and the previous key, the system confirms that a key-value boundary has been reached, indicating that the interaction analysis data corresponding to the previous key has been completely output. At this point, the system encapsulates the complete aggregation result formed during the merging and online aggregation process of the previous key, organizing the aggregation result into a logically complete interaction analysis data unit whose content no longer changes, and generates an independently locatable data block accordingly. The independently locatable data block is given a clear data block boundary upon generation; its content corresponds to the interaction analysis result aggregated by the unique key value, and it provides a stable physical write unit for subsequent sequential writing to a single data container file and synchronous generation of index entries. By performing boundary detection based on key value changes in an ordered stream and generating independently locatable data blocks in real time, the system realizes the transformation from a continuous ordered data stream to discrete, randomly accessible data blocks, enabling logical interaction analysis objects to correspond one-to-one with physical storage structures.
[0077] Step S6: Write independently locatable data blocks into a single data container file in a preset order, and simultaneously generate index entries for writing into the embedded index library.
[0078] Specifically, according to a preset data block writing order, independently locatable data blocks are sequentially written to a single data container file. This preset order can be consistent with the ordered order of key-value records, ensuring the physical continuity of similar interaction analysis data units, thus facilitating subsequent sequential reading and caching. During the process of writing independently locatable data blocks to the single data container file, the system determines the starting offset and data length of each data block within the single data container file, and fixes this physical location information after writing is complete.
[0079] While writing independently locatable data blocks, the system synchronously generates index entries for writing to the embedded index library based on the data block's key value and its corresponding physical location information. Each index entry includes at least a logical identifier for identifying the interaction analysis data unit, along with its corresponding data block offset and length information. This allows the logical identifier to be directly mapped to the specific data block location within the single data container file via the embedded index library. By synchronously generating index entries during the data block writing phase, the system ensures consistency between the single data container file and the embedded index library, enabling any written data block to be indexed and used for subsequent area queries or evidence drill-down access immediately after writing.
[0080] Step S7: Divide steps S1 to S6 into multiple parallel stages and connect them through bounded queues to achieve I / O and CPU overlap and constrain peak memory usage.
[0081] Specifically, the processes involved in steps S1 to S6, such as interactive data parsing, key-value record generation, bucket buffer distribution, local sorting and disk flushing, K-way merging and online aggregation, generation of independently locatable data blocks, and synchronous generation of data block writing and index entries, are divided into multiple interconnected parallel processing stages. These parallel processing stages are connected by bounded queues with capacities, allowing intermediate results from the previous stage to be asynchronously consumed by the next stage before the bounded queue capacity is reached. This creates a pipeline-like data processing structure in the overall process.
[0082] Finally, in the embodiments of this application, to ensure good engineering adaptability and implementation flexibility of the technical solution, several specific implementation methods are not limited. Specifically, the embedded index library is not limited in its implementation form; the index module can be implemented in the form of an embedded database or in the form of key-value storage; the corresponding index structure is not limited to a single structure, and can adopt B+ tree index, hash index, sparse index, or any combination of the above index structures to meet the performance requirements under different data scales, access patterns, and update frequencies. In specific implementations, the index library can be implemented using SQLite, RocksDB, LevelDB, or other equivalent embedded index structures; this application is not limited to specific implementation technologies.
[0083] Furthermore, this application does not limit the compression method for independently locatable data blocks. Before or during the writing process, data blocks can be compressed according to actual needs. The compression algorithm used can be LZ4, Zstd, Gzip, or a combination thereof, to achieve a balance between compression ratio, decompression speed, and random access performance. The choice of different compression algorithms does not affect the overall implementation logic of the technical solution of this application.
[0084] Furthermore, this application does not limit the specific prefetching strategy for the prefetching behavior involved in the browsing phase. Prefetching can be dynamically adjusted based on information such as the target user's interaction direction, zoom trend, scrolling speed, and historical access probability in the linked window, to adaptively determine the neighborhood range and granularity of prefetching, thereby reducing repetitive I / O while avoiding resource waste caused by excessive prefetching. The above implementation methods are all equivalent implementations of the technical solution of this application and do not constitute a limitation on the scope of protection of this application.
[0085] Please refer to Figure 2This illustration shows a schematic diagram of a high-order chromatin interaction index building and display device provided in an embodiment of this application. The device includes an acquisition module 21 and a processing module 22, wherein... The acquisition module 21 is used to construct a single data container file using independently locatable data blocks as basic writing units, and to write interaction analysis data units into the single data container file; the interaction analysis data unit includes a one-dimensional region summary slice identifier and a read segment evidence block; an embedded index library is constructed bound to the single data container file; the embedded index library includes a first mapping relationship and a second mapping relationship; the first mapping relationship maps the summary slice identifier to the one-dimensional region summary slice identifier. Write cell location; the second mapping relationship is to map the read segment identifier to the read segment evidence block. Write cell location.
[0086] Processing module 22 is used to respond to a target user's browsing request for the results of high-order chromatin interaction analysis, determine the request stage corresponding to the browsing request; when the request stage is the region query stage, generate a summary view based on the window range of the browsing request and the first mapping relationship; when the request stage is the evidence drill-down stage, generate hyperedge evidence based on the read segment identifier in the browsing request and the second mapping relationship; and display the summary view or hyperedge evidence as the corresponding browsing request result to the target user.
[0087] In one possible implementation, the acquisition module 21 is used to construct independently locatable data blocks, specifically including: generating corresponding block record information for each data block, the block record information including a type field for indicating the content category of the data block, an offset field for indicating the physical location of the data block in a single data container file, a length field for indicating the byte range occupied by the data block, a compression mark for indicating whether the data block has been compressed, and a verification field for integrity verification.
[0088] In one possible implementation, the data acquisition module 21 for interaction analysis further includes two-dimensional sparse matrix slices and multimodal overlay information, constructing an embedded index library bound to a single data container file, specifically including: constructing a third mapping relationship, the third mapping relationship being to map the coordinates of the matrix slice to the coordinates of the two-dimensional sparse matrix slice. Write the cell location; construct the fourth mapping relationship, which maps the multimodal superposition description information to the location of the multimodal superposition information. Write the cell location; multimodal superposition description information includes methylation description information, haplotype description information, structural variation description information, and single-cell tag description information; store the third mapping relationship and the fourth mapping relationship to the embedded index library.
[0089] In one possible implementation, the processing module 22 is used to determine the request stage corresponding to the browsing request, specifically including: determining whether the browsing request meets a first determination condition, the first determination condition being that it contains coordinate range information and display scale information, and does not contain an evidence request mark used to indicate evidence drilling; if the browsing request meets the first determination condition, then confirming that the request stage is the area query stage; determining whether the browsing request meets a second determination condition, the second determination condition being that it contains any one of the following: a set of reading segment identifiers, a selected object identifier, or an evidence request mark; if the browsing request meets the second determination condition, then confirming that the request stage is the evidence drilling stage.
[0090] In one possible implementation, before displaying the summary view or hyperedge evidence as the corresponding browsing request result to the target user, the processing module 22 further includes: setting the decompressed data block used to generate the browsing request result, and executing a replacement strategy according to the byte upper limit cache constraint; the replacement strategy includes one or more of the LRU strategy, ARC strategy, or clock-pro strategy.
[0091] In one possible implementation, after the processing module 22 displays the summary view or hyperedge evidence as the corresponding browsing request result to the target user, the method further includes, during the construction and browsing process, constraining the peak memory usage related to the single data container file and the embedded index library, specifically including: S1, reading and parsing interaction data records in a streaming manner, and generating key-value records for sorting and aggregation based on the interaction data records; S2, distributing the key-value records to multiple bucket buffers according to chromosome, genome window, or hash rules; S3, when any bucket buffer reaches a preset memory threshold, performing local sorting processing on the key-value records temporarily stored in the bucket buffer, and flushing the sorting results to disk to generate the corresponding intermediate result file; S4, for the same bucket... The multiple intermediate result files generated by the buffer undergo K-way merge processing to obtain an ordered stream, and online aggregation processing is performed based on key-value records during the merge process. The online aggregation process involves merging, deduplicating, and sorting multiple interacting segments with the same read segment identifier, and writing the merged segment set into the read segment evidence block. S5: Key-value boundary detection is performed on the ordered stream, and an independently locatable data block is generated when a boundary position where the key value changes is detected. S6: The independently locatable data blocks are written into a single data container file in a preset order, and index entries for writing to the embedded index library are generated simultaneously. S7: Steps S1 to S6 are divided into multiple parallel stages and connected by a bounded queue to achieve I / O and CPU overlap and constrain the peak memory usage.
[0092] In one possible implementation, the processing module 22 is used to generate an abstract view, specifically including: establishing at least two linked windows, each linked window maintaining a corresponding genome coordinate range and display modality; for any change in coordinates in the linked window, selecting a slice resolution from a preset resolution set according to the window scale; generating an abstract slice identifier set for the current linked window and its corresponding domain based on the slice resolution; performing batch positioning based on a first mapping relationship and reading the first target data block corresponding to the abstract slice identifier set; and rendering the first target data block as an abstract view.
[0093] In one possible implementation, the processing module 22 is used to generate super-edge evidence, specifically including: obtaining the second target data block corresponding to the read segment evidence block by offset positioning based on the second mapping relationship; obtaining the super-edge evidence by parsing the second target data block; overlaying the super-edge evidence on the summary view of the linked window, and establishing a backtracking association between the super-edge evidence and the read segment evidence block to support backtracking from the super-edge evidence to the corresponding original read segment evidence.
[0094] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0095] This application also provides an electronic device. (See reference...) Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: at least one processor 301, at least one communication bus 302, a user interface 303, at least one network interface 304, and a memory 305.
[0096] The communication bus 302 is used to enable communication between these components.
[0097] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0098] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0099] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 305, and by calling data stored in memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.
[0100] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. (Refer to...) Figure 3 The memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application for establishing and displaying high-order chromatin interaction indexes.
[0101] exist Figure 3In the illustrated electronic device, the user interface 303 is primarily used to provide an input interface for the user and acquire user input data; while the processor 301 can be used to call the application program for establishing and displaying high-order chromatin interaction indexes stored in the memory 305. When executed by one or more processors 301, the electronic device performs one or more of the methods described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0102] This application also provides a non-transitory computer-readable storage medium storing instructions. When executed by one or more processors, these instructions cause an electronic device to perform one or more of the methods described in the above embodiments.
[0103] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0104] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0105] The units described as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0107] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0108] The above description is merely an exemplary embodiment disclosed in this application and should not be construed as limiting the scope of this application. Any equivalent changes and modifications made in accordance with the teachings of this application shall still fall within the scope of this application.
[0109] This application is intended to cover any variations, uses, or adaptations disclosed herein that follow the general principles disclosed herein and include common knowledge or customary technical means in the art that are not described in this application.
Claims
1. A method for establishing and displaying a high-order chromatin interaction index, characterized in that, The method includes: Using independently locatable data blocks as basic writing units, a single data container file is constructed, and interaction analysis data units are written into the single data container file; the interaction analysis data unit includes a one-dimensional region summary slice identifier and a read segment evidence block; Construct an embedded index library bound to the single data container file; the embedded index library includes a first mapping relationship and a second mapping relationship; the first mapping relationship maps the summary slice identifier to the one-dimensional region summary slice identifier. Write cell location; the second mapping relationship is to map the read segment identifier to the location of the read segment evidence block. Write cell location; In response to a target user's request to view the results of the high-order chromatin interaction analysis, determine the request stage corresponding to the view request; When the request stage is a region query stage, a summary view is generated based on the window range of the browsing request and the first mapping relationship; When the request stage is the evidence drill-down stage, hyperedge evidence is generated based on the read segment identifier in the browsing request and the second mapping relationship. The summary view or the hyperborder evidence is displayed to the target user as the corresponding browsing request result.
2. The method according to claim 1, characterized in that, Constructing independently locatable data blocks specifically includes: For each data block, corresponding block record information is generated. The block record information includes a type field indicating the content category of the data block, an offset field indicating the physical location of the data block in the single data container file, a length field indicating the byte range occupied by the data block, a compression mark indicating whether the data block has been compressed, and a verification field for integrity verification.
3. The method according to claim 1, characterized in that, The interaction analysis data unit further includes two-dimensional sparse matrix slices and multimodal overlay information. The construction of the embedded index library bound to the single data container file specifically includes: Construct a third mapping relationship, which maps the coordinates of the matrix slice to the coordinates of the two-dimensional sparse matrix slice. Write cell location; A fourth mapping relationship is constructed, which maps the multimodal superposition description information to the location of the multimodal superposition information. The location of the writing unit; the multimodal superposition description information includes methylation description information, haplotype description information, structural variation description information, and single-cell tag description information; The third and fourth mapping relationships are stored in the embedded index library.
4. The method according to claim 1, characterized in that, The determination of the request stage corresponding to the browsing request specifically includes: Determine whether the browsing request meets the first determination condition, wherein the first determination condition is that it contains coordinate range information and display scale information, and does not contain an evidence request mark used to indicate evidence drilling; If the browsing request meets the first determination condition, then the request stage is confirmed as the regional query stage; Determine whether the browsing request meets the second determination condition, wherein the second determination condition is any one of the following: a set of reading segment identifiers, a selected object identifier, or the evidence request marker; If the browsing request meets the second determination condition, then the request stage is confirmed as the evidence drilling stage.
5. The method according to claim 1, characterized in that, Before displaying the summary view or the hyperborder evidence as the corresponding browsing request result to the target user, the method further includes: For the decompressed data blocks used to generate the browsing request results, a replacement strategy is executed according to the byte upper limit cache constraint; the replacement strategy includes one or more of the LRU strategy, ARC strategy, or clock-pro strategy.
6. The method according to claim 1, characterized in that, After displaying the summary view or the hyperedge evidence as the corresponding browsing request result to the target user, the method further includes, during the construction and browsing process, constraining the peak memory usage related to the single data container file and the embedded index library, specifically including: S1. Read and parse the interaction data records in a streaming manner, and generate key-value records for sorting and aggregation based on the interaction data records; S2. Distribute the key-value records to multiple bucket buffers according to chromosome, genome window, or hash rules; S3. When any of the bucket buffers reaches a preset memory threshold, perform local sorting on the key-value records temporarily stored in the bucket buffer, and flush the sorting results to disk to generate the corresponding intermediate result file. S4. Perform K-way merge processing on multiple intermediate result files generated by the same bucket buffer to obtain an ordered stream, and perform online aggregation processing based on the key value record during the merge process; the online aggregation processing is to merge, deduplicate and sort multiple interactive segments with the same read segment identifier, and write the merged segment set into the read segment evidence block; S5. Perform key value boundary detection on the ordered stream, and generate the independently locatable data block when a boundary position where the key value changes is detected; S6. Write the independently locatable data blocks into the single data container file in a preset order, and simultaneously generate index entries for writing into the embedded index library. S7. Divide steps S1 to S6 into multiple parallel stages and connect them through bounded queues to achieve I / O and CPU overlap and constrain the peak memory usage.
7. The method according to claim 1, characterized in that, The generation of the summary view specifically includes: Establish at least two linked windows, each of which maintains a corresponding genome coordinate range and display mode; For any change in coordinates within the linked viewport, a slice resolution is selected from a preset resolution set based on the viewport scale; Based on the slice resolution, generate the current linked window and the corresponding domain's summary slice identifier set; Batch positioning is performed based on the first mapping relationship, and the first target data block corresponding to the summary slice identifier set is read; Render the first target data block as the summary view.
8. The method according to claim 7, characterized in that, The generation of hyperedge evidence specifically includes: Based on the second mapping relationship, the second target data block corresponding to the read segment evidence block is obtained by offset positioning; The hyperedge evidence is obtained by parsing the second target data block; The super-edge evidence is overlaid on the summary view of the linked window, and a backtracking association is established between the super-edge evidence and the read segment evidence block to support backtracking from the super-edge evidence to the corresponding original read segment evidence.
9. A device for establishing and displaying a high-order chromatin interaction index, characterized in that, The device includes an acquisition module and a processing module, wherein, The acquisition module is used to construct a single data container file using independently locatable data blocks as basic writing units, and to write interaction analysis data units into the single data container file; the interaction analysis data unit includes a one-dimensional region summary slice identifier and a read segment evidence block; an embedded index library is constructed bound to the single data container file; the embedded index library includes a first mapping relationship and a second mapping relationship; the first mapping relationship maps the summary slice identifier to the location of the one-dimensional region summary slice identifier. Write cell location; the second mapping relationship is to map the read segment identifier to the location of the read segment evidence block. Write cell location; The processing module is configured to respond to a target user's browsing request for the results of high-order chromatin interaction analysis, determine the request stage corresponding to the browsing request, and determine the corresponding request stage based on the request stage; when the request stage is a region query stage, generate a summary view based on the window range of the browsing request and the first mapping relationship; when the request stage is an evidence drill-down stage, generate hyperedge evidence based on the read segment identifier in the browsing request and the second mapping relationship; and display the summary view or the hyperedge evidence as the corresponding browsing request result to the target user.
10. An electronic device, characterized in that, The device includes a processor, a communication bus, a user interface, a network interface, and a memory. The memory is used to store instructions. The user interface and the network interface are both used to communicate with other devices. The communication bus is used to enable communication between the components within the electronic device. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-8.