Performance monitoring and optimization method and system for bio-sequence reasoning framework

By acquiring task description information of biological sequence reasoning tasks, performing stage division and constructing performance feature vectors, accurately locating bottlenecks and invoking optimization strategies, the inefficiency of biological sequence reasoning tasks in existing technologies is solved, and efficient and dynamic performance monitoring and optimization are achieved.

CN122433899APending Publication Date: 2026-07-21BEIJING ELECTRONIC DIGITAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610504368.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-16
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing performance monitoring and optimization technologies are insufficient to reflect the true performance characteristics of biological sequence reasoning tasks, cannot meet the needs of large-scale, high real-time sequence analysis, and lack the ability to dynamically adjust optimization strategies.

Method used

By acquiring the task description information of the biological sequence reasoning task, the system divides the task into stages, generates a reasoning stage sequence, constructs a reasoning performance feature vector, accurately locates performance bottlenecks, and calls corresponding optimization strategies for dynamic adjustment.

Benefits of technology

It improves the execution efficiency of biological sequence reasoning tasks, meets the needs of large-scale, high real-time sequence analysis, and realizes dynamic, effective, and efficient intelligent control of the biological sequence reasoning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433899A_ABST
    Figure CN122433899A_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses a performance monitoring and optimization method and system for a biological sequence inference framework. The method comprises: in response to an execution request of a biological sequence inference task, obtaining task description information of the inference task; the task description information at least includes inference model type, sequence length feature, inference stage division information and execution resource configuration information; according to the task description information, the execution process of the inference task is divided into stages, and an inference stage sequence is generated; the performance indicators of each inference stage collected are correspondingly associated with the inference stage sequence, and an inference performance feature vector is constructed; according to the inference performance feature vector, the performance abnormal stage and the corresponding performance bottleneck type are determined; and the optimization strategy corresponding to the performance bottleneck type is called and executed. The method can effectively improve the execution efficiency of the biological sequence inference task and meet the demand of large-scale and high real-time sequence analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of bioinformatics analysis technology, and in particular to a performance monitoring and optimization method and system for a biological sequence reasoning framework. Background Technology

[0002] Biological sequence reasoning tasks are characterized by complex computational graph structures, diverse model reasoning stages, and significant fluctuations in data scale and sequence length. Unlike general computing tasks, their performance bottlenecks are often closely related to factors such as sequence length distribution, model structure, reasoning stage segmentation methods, and intermediate result caching strategies.

[0003] Existing performance monitoring and optimization technologies are mainly designed for general computing resources or service requests. They are usually based on system-level indicators or fixed rules for analysis, which makes it difficult to reflect the true performance characteristics of biological sequence reasoning tasks at different inference stages. They lack the ability to perceive the performance of biological sequence reasoning tasks at different execution stages and it is difficult to establish a correlation between system-level performance indicators and the structure of the reasoning task. As a result, the performance analysis results are difficult to directly map into executable optimization actions. At the same time, the optimization strategies are usually static rules that cannot be dynamically adjusted with the inference load and lack a closed-loop mechanism for performance monitoring, analysis and optimization oriented towards the inference process. Summary of the Invention

[0004] In view of this, the present disclosure provides a performance monitoring and optimization method and system for biological sequence reasoning frameworks, which can solve the problems of low execution efficiency of biological sequence reasoning tasks in the prior art and inability to meet the needs of large-scale, high real-time sequence analysis.

[0005] In a first aspect, embodiments of this disclosure provide a performance monitoring and optimization method for a biological sequence reasoning framework, including: In response to an execution request for a biological sequence reasoning task, the task description information of the reasoning task is obtained; the task description information includes at least the reasoning model type, sequence length characteristics, reasoning stage division information, and execution resource configuration information. Based on the task description information, the execution process of the reasoning task is divided into stages, and a reasoning stage sequence is generated; The stage performance indicators corresponding to each collected inference stage are associated with the inference stage sequence to construct an inference performance feature vector; Based on the inference performance feature vector, determine the performance anomaly stage and its corresponding performance bottleneck type; Invoke and execute the optimization strategy corresponding to the performance bottleneck type.

[0006] Secondly, this disclosure also provides a performance monitoring and optimization system for biological sequence reasoning frameworks, including: The task description information acquisition unit is used to acquire the task description information of the reasoning task in response to the execution request of the biological sequence reasoning task; the task description information includes at least the reasoning model type, sequence length characteristics, reasoning stage division information, and execution resource configuration information. The segmentation unit is used to divide the execution process of the reasoning task into stages based on the task description information and generate a reasoning stage sequence. The association unit is used to associate the stage performance indicators corresponding to each collected inference stage with the inference stage sequence to construct an inference performance feature vector; The bottleneck acquisition unit is used to determine the performance anomaly stage and its corresponding performance bottleneck type based on the inference performance feature vector. The execution unit is used to call and execute the optimization strategy corresponding to the performance bottleneck type.

[0007] The performance monitoring and optimization method for biological sequence reasoning framework disclosed in this application first responds to the execution request of the biological sequence reasoning task by obtaining the task description information of the reasoning task. Based on the task description information, the execution process of the reasoning task is divided into stages, generating a reasoning stage sequence, transforming the black-box task into a computable structured object, and elevating performance monitoring from system-level indicators to the reasoning stage level, thereby improving the accuracy of performance perception. Second, the stage performance indicators corresponding to each collected reasoning stage are correlated with the reasoning stage sequence to construct a reasoning performance feature vector. This step achieves accurate bottleneck location by establishing a mapping relationship between the reasoning task structure and performance indicators. Finally, based on the reasoning performance feature vector, the abnormal performance stage and its corresponding performance bottleneck type are determined, and the optimization strategy corresponding to the performance bottleneck type is called and executed, effectively avoiding blind resource adjustments and realizing dynamic, effective, and efficient intelligent control of the biological sequence reasoning process. This effectively improves the execution efficiency of the biological sequence reasoning task and can meet the needs of large-scale, high-real-time sequence analysis.

[0008] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

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

[0010] Figure 1 This is a flowchart illustrating the performance monitoring and optimization method for a biological sequence reasoning framework provided in this embodiment of the disclosure.

[0011] Figure 2 A flowchart illustrating a method for obtaining task description information for a reasoning task provided in an embodiment of this disclosure.

[0012] Figure 3 This is a flowchart illustrating a method for generating a reasoning stage sequence provided in an embodiment of the present disclosure.

[0013] Figure 4 This is a flowchart illustrating the method for constructing inference performance feature vectors provided in this embodiment of the disclosure.

[0014] Figure 5 A flowchart illustrating the method for obtaining performance anomaly stages and their corresponding performance bottleneck types provided in this embodiment of the disclosure.

[0015] Figure 6 This is a flowchart illustrating the method for invoking and executing optimization strategies corresponding to performance bottleneck types, as provided in an embodiment of this disclosure. Detailed Implementation

[0016] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0017] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0018] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0019] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0020] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0021] Reference Figure 1 This application discloses a performance monitoring and optimization method for biological sequence reasoning frameworks, including: S100, in response to the execution request of the biological sequence reasoning task, obtains the task description information of the reasoning task.

[0022] The task description information includes at least the inference model type, sequence length characteristics, inference stage division information, and execution resource configuration information.

[0023] S200: Based on the task description information, the execution process of the reasoning task is divided into stages, and a reasoning stage sequence is generated. S300 associates the stage performance indicators corresponding to each collected inference stage with the inference stage sequence to construct an inference performance feature vector; S400, based on the inference performance feature vector, determines the performance anomaly stage and its corresponding performance bottleneck type; S500 invokes and executes the optimization strategy corresponding to the performance bottleneck type.

[0024] The performance monitoring and optimization method for biological sequence reasoning framework disclosed in this application can transform black-box tasks into computable structured objects by analyzing the execution requests and dividing the stages of biological sequence reasoning tasks. This elevates performance monitoring from system-level indicators to the reasoning stage level, improving the accuracy of performance perception. By establishing a mapping relationship between the structure of reasoning tasks and performance indicators, precise bottleneck location is achieved. Finally, the optimization strategy corresponding to the performance bottleneck type is invoked and executed, effectively avoiding blind resource adjustments. This enables dynamic, effective, and efficient intelligent control of the biological sequence reasoning process, thereby effectively improving the execution efficiency of biological sequence reasoning tasks and meeting the needs of large-scale, high-real-time sequence analysis.

[0025] Reference Figure 2 The methods for obtaining task description information for the S100 inference task specifically include: S110, parses and verifies the legality of execution requests for biological sequence reasoning tasks, and filters out invalid requests and illegal format sequences; S120: Collect inference model type, sequence length features, inference stage division information, and execution resource configuration information in layers, and uniformly format them into structured data. Generate a task fingerprint that uniquely corresponds to the inference task, associate and store the task fingerprint with the structured data, and record it as the task description information of the inference task.

[0026] For example, in a biological sequence reasoning scenario, upon receiving a reasoning task request, the request is first parsed and validated. First, it checks whether the request carries a valid task identifier and whether the user's permissions are legitimate. Then, it verifies whether the sequence file is in a standard biological sequence format such as FASTA or FASTQ. Next, the sequence content is read. For DNA sequences, only valid characters such as A, T, C, and G are retained; for protein sequences, only standard amino acid characters are retained. Blank lines, garbled characters, and abnormal characters are removed. Sequences that are too short, too long, or exceed the batch limit are also filtered to ensure that all tasks entering subsequent processes are legitimate and valid.

[0027] After verification, task-related information is collected layer by layer. First, the type, architecture, computational precision, and backend of the inference model are recorded. Then, the sequence type, single length, total batch size, average length, and maximum length are counted. Next, the preset inference stages, stage dependencies, and resource configurations such as the number of CPU cores, memory, GPU model, batch size, and concurrency are obtained. This information is organized into unified structured data. Then, a unique task fingerprint is generated by combining the model type, sequence type, length range, batch size, and GPU model. The fingerprint and structured data are bound and stored as the task description information for the inference task, which is used for subsequent stage division and performance monitoring.

[0028] Reference Figure 3 The method for generating the S200 inference stage sequence specifically includes: S210, based on the inference model type in the task description information, call the semantic template corresponding to the model and obtain the initial stage boundary set corresponding to the semantic template.

[0029] The semantic template incorporates computational semantic boundaries unique to biological sequence reasoning, including sequence embedding encoding boundaries, self-attention computational boundaries, structural prediction head boundaries, and post-processing optimization boundaries.

[0030] For example, for a genome-language inference model, the semantic template corresponding to the model includes: k-mer encoding stage, position encoding fusion stage, multi-layer Transformer iteration stage, and downstream task adaptation stage, and then generates an initial set of stage boundaries with semantic labels.

[0031] For protein structure prediction inference models, the corresponding semantic template includes: MSA feature extraction stage, paired feature encoding stage, Evoformer iteration stage, and structure decoding stage. The semantic stage division outputs an initial stage boundary set, with each boundary accompanied by a calculated semantic label, thus generating an initial stage boundary set with semantic labels.

[0032] S220: Based on the execution resource configuration information, inference stage division information, and initial stage boundary set in the task description information, dynamically adapt and adjust the resources of each semantic stage to generate a stage set with resource constraint tags.

[0033] Specifically, when the computational complexity (i.e., the required memory or number of computing cores) of a certain semantic stage exceeds the threshold of the memory capacity or number of computing cores of a single computing unit, internal stage segmentation is automatically triggered. During segmentation, the large-granularity semantic stage is broken down into several resource-aligned sub-stages according to the natural boundaries of tensor operations in the computation graph. That is, it is split into multiple appropriately sized sub-stages that can match the current hardware resources. At the same time, each sub-stage is assigned an independent resource sandbox identifier to ensure that each uses its own dedicated resources and does not interfere with each other. Next, it checks whether the hardware is a heterogeneous computing unit such as a CPU or GPU. If so, a data format conversion stage is inserted at the junction of stages to ensure that the data format before and after is adapted to different execution units and to ensure a smooth computation process. After completing the segmentation and format adaptation processing, a set of stages with resource constraint tags is output.

[0034] When the computational complexity of a certain semantic stage does not exceed the memory capacity of a single computational unit or the threshold of the number of computational cores, the information is divided according to the inference stage and the inference task is executed by default.

[0035] S230, based on the sequence length characteristics in the stage set and task description information, execute stage merging and pipeline orchestration to generate the inference stage sequence.

[0036] Specifically, stage merging and pipeline orchestration are performed based on the stage set marked with resource constraints and the sequence length feature in the task description. When processing short-sequence inference tasks, adjacent low-computation-density stages with low computational cost and fast execution are merged into a composite stage to reduce the time consumption caused by frequent switching between stages. When processing long-sequence inference tasks, checkpoint stages are inserted inside computationally intensive stages with high computational cost and long execution time to facilitate rapid recovery after execution interruption without recalculating from scratch, balancing fault recovery and execution efficiency. After merging and orchestration, each stage is labeled with a stage identifier, computational semantic type, resource requirement information, and upstream and downstream dependencies. This information is organized into an ordered execution flow, ultimately generating an inference stage sequence, i.e., a directed acyclic graph of stage execution. Each node in the graph corresponds to an inference stage, and the directed edges between nodes represent the stage execution dependencies.

[0037] Reference Figure 4 The method for constructing the S300 inference performance feature vector specifically includes: S310 collects the stage performance indicators for each inference stage.

[0038] Among them, the performance indicators of a stage include at least the stage execution time, resource consumption characteristics, and intermediate result scale information.

[0039] Specifically, non-invasive acquisition probes are deployed at the entry and exit points of each inference stage in the inference stage sequence to collect information on the stage execution time, resource consumption characteristics, and intermediate result scale of each stage. Furthermore, the resource consumption characteristics include CPU usage information, GPU usage information, I / O bandwidth utilization rate, etc. The intermediate result scale information refers to the quantitative scale description of the intermediate calculation results, transitional feature data, and temporary cache information generated in each stage of biological sequence inference, including but not limited to indicators that characterize the volume of intermediate products, such as data dimension, sequence length, number of features, storage size, and data sparsity.

[0040] S320 normalizes the execution time of each stage to the percentile ranking of historical tasks of the same type, encodes the resource consumption feature into a multi-dimensional resource pressure label, and encodes the intermediate result scale information into a data flow intensity index to obtain the local feature sub-vector of each inference stage. The stage association characteristics can be obtained through this step.

[0041] Specifically, historical execution data of the same type of biological sequence reasoning task are collected, and execution stage duration data that are completely consistent with the target stage are selected, with a sample size of no less than 100 groups, forming a standardized historical duration distribution sample set. The original execution duration of the target stage is substituted into the historical duration sample set, and the percentile value of this duration in the sample set is calculated. The calculation formula is the ratio of the number of historical samples with a duration less than or equal to the target stage duration to the total number of historical samples. Then, the percentile ranking is converted into a decimal form in the 0-1 interval and used as the normalized feature value of the stage duration, that is, the stage duration feature component.

[0042] Resource stress levels are categorized using a four-level stress classification standard, adaptable to all hardware resource dimensions. For example, low stress is defined as resource utilization < 30%, with a coding value of 0.2; medium stress is defined as 30% ≤ resource utilization < 60%, with a coding value of 0.5; high stress is defined as 60% ≤ resource utilization < 90%, with a coding value of 0.8; and overload stress is defined as resource utilization ≥ 90%, with a coding value of 1.0. For the four types of raw resource data—CPU utilization, memory utilization, IO throughput, and GPU utilization—each is mapped to a corresponding stress coding value in the 0-1 range, based on the aforementioned stress thresholds. The stress coding values ​​for each dimension are then concatenated in a fixed order (CPU, memory, IO, GPU) to form a multi-dimensional resource stress label sub-vector, with the number of dimensions consistent with the monitored resource dimensions.

[0043] The total size of intermediate cache files in this stage is selected as the core quantification indicator, while the total data volume of candidate sequences and the data volume of floating-point matrices are taken into account for auxiliary calibration. The maximum intermediate data size of the corresponding stage of the same type of historical task is extracted as the normalization benchmark value. The logarithmic normalization formula is used to eliminate the difference in data dimensions. If the intermediate data size of the current stage exceeds the historical maximum value, the intensity index is directly assigned to 1.0 to ensure the standardization of feature values.

[0044] S330 encodes the inference model type in the task description information as an architecture identifier, the sequence length feature as a scale level, and the execution resource configuration information as a resource sufficiency index, forming a global context feature.

[0045] Specifically, the inference model type is extracted from the task description information, including but not limited to Hidden Markov Models (HMMs), deep learning models, and multi-sequence alignment models; a pre-defined model architecture classification dictionary is used, and each model is uniquely identified and encoded according to its technical approach. For example, Hidden Markov Models are encoded as 01; Transformer-type deep learning models are encoded as 02; CNN-LSTM hybrid models are encoded as 03; and MAFFT models are encoded as 04. The target model type is mapped to the dictionary as a fixed-length binary or numerical identifier, which serves as the architecture identifier (i.e., the architecture identifier feature component).

[0046] Extract core biological sequence length information for the task, including the total length of the target protein sequence, the number of sequences to be compared, and the average length of a single sequence; pre-define scale classification standards, quantifying the sequence size into 4 levels of labels, for example, ultra-small scale is a total sequence length < 1000aa, coded as 01; small scale is 1000aa ≤ total sequence length < 5000aa, coded as 02; medium scale is 5000aa ≤ total sequence length < 20000aa, coded as 03; large scale is a total sequence length ≥ 20000aa, coded as 04; map the target sequence length comparison standard to scale level (i.e., scale level feature components).

[0047] Extract task execution resource configuration information, including the number of allocated CPU cores, total memory, GPU memory size, and number of computing nodes; construct a resource sufficiency index quantification model, with the following calculation formula: Where R is the resource abundance index (value from 0 to 1). To allocate the number of CPU cores, For the maximum number of CPU cores, To allocate total memory, For maximum total memory, To allocate GPU memory, For the maximum GPU video memory, , , Each resource has a weight coefficient (summing up to 1, adjustable according to task characteristics, defaulting to 1 / 3); the resource sufficiency index is calculated and used as a resource feature component. Finally, the global context feature vector is concatenated in a fixed order (architecture identifier, scale level, resource sufficiency index) to form the global context feature vector. The vector dimension is fixed to ensure standardized representation of global features.

[0048] S340 concatenates the global context features into the local feature sub-vectors of each stage to generate enhanced feature sub-vectors for each inference stage, thereby achieving deep binding between indicators and stage sequences.

[0049] Specifically, post-concatenation is adopted to ensure the core status of local features and the consistency of the dimensions of the concatenated vectors. If the length of the global context feature vector does not match the length of the local feature sub-vector, zero padding is used to achieve dimension unification. For each inference stage of the protein homology sequence inference task (e.g., sequence preprocessing and index construction, database retrieval and candidate matching, multiple sequence alignment and scoring inference, result clustering and confidence output), the global context feature vector is concatenated one by one to the end of the corresponding local feature sub-vector to generate the enhanced feature sub-vector for each inference stage. The positions of each component of the global feature are fixed during concatenation to ensure the dimensional consistency and comparability of the enhanced feature vectors at different stages.

[0050] S350 associates the enhanced feature vector with the corresponding position information and directed edges between nodes in the inference stage sequence to generate an inference performance feature vector that integrates global structural information and stage association characteristics.

[0051] Specifically, the execution flow of the biological sequence reasoning task is abstracted as a directed acyclic graph (DAG) structure. Nodes correspond to each reasoning stage, and each node is uniquely identified by its stage number (e.g., S1, S2, S3, S4, corresponding to the four stages mentioned above). Directed edges correspond to the execution dependencies between stages, with the direction of the directed edges pointing from the preceding stage to the following stage, representing the entry into the database retrieval stage after sequence preprocessing. Positional information includes the sequential position of each node in the DAG, its in-degree (i.e., the number of preceding stages), and its out-degree (i.e., the number of following stages). Then, the stage number and execution order index of each reasoning stage are used as positional features and bound to the corresponding enhanced feature sub-vectors. Specifically, directed edge association is performed, that is, the preceding stage identifier and the following stage identifier of each stage are extracted as association features and bound to the corresponding enhanced feature sub-vectors. Structural feature fusion is performed, that is, the positional features, directed edge association features, and enhanced feature sub-vectors are concatenated dimensionally, or graph embedding technology is used to transform the structural information into a low-dimensional vector and fuse it with the enhanced feature sub-vectors. The final feature vector generation incorporates location information, directed edge association information, global context information, and local stage features to generate an inference performance feature vector.

[0052] Reference Figure 5 The S400 method for "determining the performance anomaly stage and its corresponding performance bottleneck type based on the inference performance feature vector" specifically includes: S410 identifies performance anomaly stages in the inference performance feature vector based on anomaly detection algorithms.

[0053] Specifically, time-series distributions are established for the stage execution duration distribution, resource consumption characteristic distribution, and intermediate result size of each performance anomaly stage. The 3σ principle is used to determine that feature points deviating from the mean by 3 times the standard deviation are anomalies, and the execution stage containing anomalies is identified as the abnormal execution stage.

[0054] S420 analyzes the anomalies in the distribution of stage execution time, resource consumption characteristics, and intermediate result size for each performance anomaly stage, and obtains the corresponding anomaly analysis results.

[0055] Among them, resource usage characteristics include at least one of CPU utilization, GPU utilization, peak memory / video memory usage, IO read / write throughput, and parallel efficiency; S430, determine the type of performance bottleneck in the anomaly analysis results.

[0056] The performance bottleneck type is any one of the following: computation bottleneck, memory bottleneck, I / O bottleneck, parallel bottleneck, or sequence feature bottleneck.

[0057] When the execution time of a stage is abnormal and the CPU / GPU utilization is consistently greater than the preset threshold (close to 100%), and there is no obvious abnormality in memory / IO read / write throughput, the performance bottleneck type is determined to be a computing bottleneck.

[0058] When the intermediate result size is abnormal and memory / video memory usage reaches the threshold, indicating an impending memory overflow or a surge in swap partition usage, the performance bottleneck type is determined to be a memory bottleneck.

[0059] When the execution time of a stage is dominated by IO waiting and IO read / write throughput is at full capacity, while the CPU / GPU is in an idle waiting state, the performance bottleneck type is determined to be an IO bottleneck.

[0060] When the efficiency of multi-threaded / multi-GPU parallelism is lower than a preset threshold, core utilization is uneven, or there is synchronous waiting or barrier blocking, the performance bottleneck type is determined to be a parallel bottleneck.

[0061] When the execution time of a stage is strongly linearly correlated with the sequence length, there are too many serial steps that cannot be parallelized, and the size of intermediate results increases exponentially with the length of the sequence, the performance bottleneck type is determined to be a sequence feature bottleneck.

[0062] Reference Figure 6 The methods for invoking and executing optimization strategies corresponding to the performance bottleneck type of S500 specifically include: S510 determines the attribution confidence of the performance bottleneck type.

[0063] This step specifically includes: obtaining the execution time anomaly score, resource usage anomaly score, and intermediate result size anomaly score for the corresponding performance anomaly stage, and performing normalization processing to obtain the time score, resource score, and intermediate result score; determining the time weight coefficient, resource weight coefficient, and intermediate result weight coefficient based on the feature sensitivity dimension of the performance bottleneck type; and determining the attribution confidence level corresponding to the performance bottleneck type by weighting and summing the time score, resource score, and intermediate result score using the time weight coefficient, resource weight coefficient, and intermediate result weight coefficient.

[0064] Among them, the score for abnormal execution time is: This formula can be used to obtain information on how much longer the execution time is compared to normal.

[0065] The abnormal resource usage score is calculated by dividing the abnormality of CPU usage information, GPU usage information, and I / O bandwidth utilization rate by one. Specifically, a single resource utilization rate exceeding the threshold (e.g., 95%) is scored as 1 point, and normal is scored as 0 points. The abnormal resource usage score is the number of abnormal resource items / the total number of resource items.

[0066] The score for anomalies in intermediate result size is: This formula can analyze whether intermediate data is abnormally inflated.

[0067] The sum of the duration weight coefficient, resource weight coefficient, and intermediate result weight coefficient is 1.

[0068] If the performance bottleneck type is a computing bottleneck, it means that we need to focus on duration and computing resources. Therefore, the duration weight coefficient is determined to be greater than the resource weight coefficient, and the intermediate result weight coefficient is 0.

[0069] If the performance bottleneck type is memory bottleneck, it means that we need to focus on the size of intermediate results and memory usage. Therefore, we should determine that the resource weight coefficient and the intermediate result weight coefficient are both greater than the duration weight coefficient.

[0070] If the performance bottleneck type is an IO bottleneck, it means that you need to focus on duration, IO wait, and IO throughput. Determine that the duration weight coefficient is equal to the resource weight coefficient, and the intermediate result weight coefficient is 0.

[0071] If the performance bottleneck type is a parallel bottleneck, it means that we need to focus on parallel efficiency, uneven resource distribution, and synchronization waiting. We need to determine that the duration weight coefficient is less than the resource weight coefficient, and the intermediate result weight coefficient is 0.

[0072] If the performance bottleneck type is a sequence feature bottleneck, it means that we need to focus on the duration, sequence length, and intermediate results as the sequence expands. We need to determine that the duration weight coefficient is equal to the intermediate result weight coefficient and greater than the resource weight coefficient.

[0073] S520 calls the optimization strategy corresponding to the performance bottleneck type from the preset optimization strategy template library.

[0074] S530 determines the execution order of optimization strategies based on attribution confidence and executes the corresponding optimization strategies based on the execution order.

[0075] When the performance bottleneck type is a computational bottleneck, the optimization strategies implemented include one or more of the following: reducing the computational precision of the corresponding inference stage, performing operator fusion on computationally intensive operators, and dynamically adjusting CPU / GPU core binding and computing power allocation.

[0076] When the performance bottleneck is a memory bottleneck, the optimization strategies implemented include one or more of the following: enabling inference intermediate result caching or reuse strategies to cache and incrementally reuse frequently used tensors, performing slice calculations and batch processing of intermediate results to reduce peak memory usage, and timely releasing unused intermediate tensors to reduce memory residency time.

[0077] When the performance bottleneck is an I / O bottleneck, the optimization strategies implemented include one or more of the following: using prefetching, asynchronous loading, and batch I / O merging to reduce I / O latency; caching or memory mapping hot data locally to reduce repeated disk / network reads; and adjusting the data storage format to adopt a more compact serialization format to improve I / O efficiency.

[0078] When the performance bottleneck type is a parallel bottleneck, the optimization strategies implemented include one or more of the following: adjusting the execution mode of the inference phase to re-divide and load balance tasks within the phase, adjusting the number of parallel threads or the communication method between devices to reduce synchronization waiting overhead, and adopting pipelined parallel computing and communication to improve overall parallel efficiency.

[0079] When the performance bottleneck is a sequence feature bottleneck, the optimization strategies implemented include one or more of the following: truncating or windowing long sequences, vectorizing or batching serial iteration steps, and reusing intermediate calculation results from historical sequences to avoid repeated calculations from scratch.

[0080] The performance monitoring and optimization method for biological sequence reasoning framework disclosed in this application also includes: after executing the optimization strategy, re-collecting the performance feature vector of the corresponding abnormal execution stage, and re-determining the abnormality and bottleneck; if it is determined to be abnormal and the performance bottleneck type remains unchanged, increasing the execution intensity of the optimization strategy or switching to a stronger optimization strategy of the same type.

[0081] Furthermore, the performance of the inference task execution process after applying the optimization strategy is collected again, and the inference performance characteristics before and after optimization are compared and analyzed. Based on the comparison results, the optimization strategy template is dynamically adjusted, thereby forming a performance monitoring and optimization closed loop based on inference semantics.

[0082] The performance monitoring and optimization method for biological sequence reasoning frameworks disclosed in this application further includes: instantiating the optimization strategy template into executable optimization actions; applying the optimization actions to the execution process of subsequent reasoning tasks; collecting performance data again on the execution process of the reasoning task after applying the optimization strategy; comparing and analyzing the reasoning performance characteristics before and after optimization; and dynamically adjusting the optimization strategy template based on the comparison results, thereby forming a performance monitoring and optimization closed loop based on reasoning semantics.

[0083] Specifically, the optimization strategy template may include at least: inference phase resource adjustment strategies, inference phase execution mode adjustment strategies, and inference intermediate result caching or reuse strategies. The abstract strategy descriptions in the optimization strategy template are mapped to specific runtime configuration instructions, including: inference phase resource adjustment strategies instantiated as memory allocator parameters, GPU memory reservation ratios, etc.; inference phase execution mode adjustment strategies instantiated as computation graph rewriting rules, batch processing dynamic scheduling thresholds, and operator execution priority instructions; and inference intermediate result caching or reuse strategies instantiated as cache capacity quotas, replacement strategy selection, and similarity index construction instructions. The instantiation process fine-tunes parameters based on the real-time state of the current execution environment to ensure the executability of the optimization actions.

[0084] The instantiated optimization actions are injected into the execution flow of subsequent inference tasks of the same type, re-triggering the performance acquisition and feature construction process to obtain the inference performance feature vector after applying the optimization strategy. When the optimization effect reaches the expected threshold, the current optimization strategy template and its parameter configuration are marked as a valid strategy; when the optimization effect does not meet expectations or has a negative impact, the strategy is rolled back and the failure mode is recorded.

[0085] The performance monitoring and optimization method for biological sequence reasoning framework disclosed in this application first responds to the execution request of the biological sequence reasoning task by obtaining the task description information of the reasoning task. Based on the task description information, the execution process of the reasoning task is divided into stages, generating a reasoning stage sequence, transforming the black-box task into a computable structured object, and elevating performance monitoring from system-level indicators to the reasoning stage level, thereby improving the accuracy of performance perception. Second, the stage performance indicators corresponding to each collected reasoning stage are correlated with the reasoning stage sequence to construct a reasoning performance feature vector. This step achieves accurate bottleneck location by establishing a mapping relationship between the reasoning task structure and performance indicators. Finally, based on the reasoning performance feature vector, the abnormal performance stage and its corresponding performance bottleneck type are determined, and the optimization strategy corresponding to the performance bottleneck type is called and executed, effectively avoiding blind resource adjustments and realizing dynamic, effective, and efficient intelligent control of the biological sequence reasoning process. It is particularly suitable for application scenarios in biological sequence reasoning tasks where the sequence length varies greatly and the reasoning stages are complex.

[0086] In the specific execution of a biological sequence inference task, a biological sequence inference task request is received from a bioinformatics analysis platform or user, such as protein structure prediction, RNA secondary structure prediction, DNA sequence functional annotation, etc. Task description information is extracted and organized from the request, including: inference model type: such as ESM, AlphaFold2, BERT-based biological sequence model, etc.; sequence length features: single sequence length, total length of batch sequences, whether it is a long sequence; inference stage division information: the model's preset preprocessing, encoding, feature extraction, decoding, postprocessing, etc.; execution resource configuration information: CPU / GPU model, video memory, number of threads, batch size, inference framework version.

[0087] Then, based on the task description information, the entire inference task is automatically divided into continuous and ordered execution stages, generating a sequence of inference stages. Typical biological sequence inference is divided into: 1) Sequence input and cleaning stage; 2) Sequence encoding and embedding generation stage; 3) Backbone network feature inference stage; 4) Structure / function prediction and decoding stage; 5) Result post-processing and output stage. Each stage is assigned a unique identifier, forming an ordered stage chain for subsequent indicator alignment.

[0088] During the actual execution of the inference task, the performance monitoring module synchronously collects performance indicators for each inference stage, including: stage execution time, peak and average memory / GPU usage, CPU / GPU utilization, sequence processing throughput, I / O read / write time, and operator computation density. These indicators are bound to the corresponding inference stages and concatenated in the order of stages to form a high-dimensional inference performance feature vector for subsequent anomaly detection.

[0089] By analyzing performance feature vectors and using threshold comparison, trend judgment, or lightweight model judgment, we can identify which inference stages exhibit significant performance anomalies such as excessively high time consumption, abnormal resource usage, and sudden drops in throughput. We can also pinpoint the bottleneck types for each stage, such as: computational bottlenecks (insufficient GPU computing power, low operator efficiency), memory bottlenecks (long sequences causing memory explosion), I / O bottlenecks (slow sequence reading and result writing), scheduling bottlenecks (unreasonable multi-stage parallelism, improper batch processing settings), and model structure bottlenecks (attention computational complexity increases exponentially with sequence length). For example, in long-sequence protein inference, excessive memory usage often occurs in the backbone network feature inference stage, which is identified as a memory bottleneck.

[0090] Based on the identified bottleneck type, matching optimization strategies are automatically triggered and dynamically executed during inference: For computational bottlenecks: model quantization, operator fusion, and half-precision inference are enabled; for memory bottlenecks: sequence partitioning, recomputation, and dynamic GPU memory allocation are enabled; for I / O bottlenecks: preloading, batch read / write, and cache reuse are enabled; for scheduling bottlenecks: batch size is dynamically adjusted, and inter-stage pipeline parallelism is implemented; for model structure bottlenecks: sparse attention and sliding window attention are used for long sequences. After the optimization strategy is executed, performance metrics are re-collected, performance feature vectors are updated, and it is determined whether secondary optimization is needed, until performance returns to normal. The optimized inference process continues until completion, outputting the biological sequence prediction result. Simultaneously, the stage divisions, performance feature vectors, anomaly localization records, and optimization strategy execution records for this task are uniformly saved for automatic optimization and model iteration reference in subsequent similar biological sequence tasks.

[0091] Secondly, this application discloses a performance monitoring and optimization system for a biological sequence reasoning framework, used to execute the performance monitoring and optimization method for a biological sequence reasoning framework disclosed in the first aspect of this application. The system includes: The task description information acquisition unit is used to acquire task description information of the reasoning task in response to the execution request of the biological sequence reasoning task; the task description information includes at least the reasoning model type, sequence length characteristics, reasoning stage division information, and execution resource configuration information. The division unit is used to divide the execution process of the reasoning task into stages based on the task description information, and generate a sequence of reasoning stages; The association unit is used to associate the stage performance indicators corresponding to each collected inference stage with the inference stage sequence to construct an inference performance feature vector; The bottleneck acquisition unit is used to determine the performance anomaly stage and its corresponding performance bottleneck type based on the inference performance feature vector. The execution unit is used to call and execute the optimization strategy corresponding to the performance bottleneck type.

[0092] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0093] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.

[0094] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.

[0095] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0096] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0097] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0098] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A performance monitoring and optimization method for a biological sequence reasoning framework, characterized in that, include: In response to the execution request of the biological sequence reasoning task, obtain the task description information of the reasoning task; The task description information includes at least the inference model type, sequence length characteristics, inference stage division information, and execution resource configuration information; Based on the task description information, the execution process of the reasoning task is divided into stages, and a reasoning stage sequence is generated; The stage performance indicators corresponding to each collected inference stage are associated with the inference stage sequence to construct an inference performance feature vector; Based on the inference performance feature vector, determine the performance anomaly stage and its corresponding performance bottleneck type; Invoke and execute the optimization strategy corresponding to the performance bottleneck type.

2. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 1, characterized in that, The step of responding to the execution request of the biological sequence reasoning task by obtaining the task description information of the reasoning task includes: The system parses and validates the execution requests for biological sequence reasoning tasks, filtering out invalid requests and sequences in illegal formats. The inference model type, sequence length features, inference stage division information, and execution resource configuration information are collected in layers and uniformly formatted into structured data. A task fingerprint uniquely corresponding to the inference task is generated, and the task fingerprint is associated with and stored with the structured data, and recorded as the task description information of the inference task.

3. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 1, characterized in that, The step of dividing the execution process of the reasoning task into stages based on the task description information and generating a reasoning stage sequence includes: Based on the inference model type in the task description information, the semantic template corresponding to the model is invoked, and the initial stage boundary set corresponding to the semantic template is obtained; Based on the execution resource configuration information in the task description information, the inference stage division information, and the initial stage boundary set, the resources of each semantic stage are dynamically adapted and adjusted to generate a stage set with resource constraint tags. Based on the phase set and the sequence length features in the task description information, the execution phases are merged and pipelined to generate the inference phase sequence.

4. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 1, characterized in that, The step of associating the stage performance indicators corresponding to each collected inference stage with the inference stage sequence to construct an inference performance feature vector includes: Collect stage performance indicators for each inference stage, including at least stage execution time, resource consumption characteristics, and intermediate result size information; The execution time of each stage is normalized to the percentile ranking of the same type of historical tasks, the resource consumption feature is encoded into a multi-dimensional resource pressure label, and the intermediate result scale information is encoded into a data flow intensity index to obtain the local feature sub-vector of each inference stage. The inference model type in the task description information is encoded as an architecture identifier, the sequence length feature is encoded as a scale level, and the execution resource configuration information is encoded as a resource sufficiency index to form a global context feature; The global context features are concatenated into the local feature sub-vectors of each stage to generate the enhanced feature sub-vectors for each inference stage. The enhanced feature sub-vectors are associated with the corresponding position information and directed edges between nodes in the inference stage sequence to generate an inference performance feature vector that integrates global structural information and stage association characteristics.

5. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 4, characterized in that, The step of determining the performance anomaly stage and its corresponding performance bottleneck type based on the inference performance feature vector includes: The anomaly detection algorithm is used to identify the performance anomaly phases in the inference performance feature vector. Analyze the anomalies in the stage execution time distribution, resource consumption characteristic distribution, and intermediate result size distribution of each performance anomaly stage to obtain the corresponding anomaly analysis results; Determine the type of performance bottleneck in the anomaly analysis results.

6. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 5, characterized in that, The process of identifying performance anomaly stages in the inference performance feature vector based on anomaly detection algorithms includes: For each of the aforementioned performance anomaly stages, a time series distribution is established for the stage execution duration distribution, resource consumption characteristic distribution, and intermediate result size. The feature points that deviate from the mean by 3 times the standard deviation are determined as anomalies by the 3σ principle, and the execution stages containing anomalies are identified as abnormal execution stages.

7. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 5, characterized in that, The step of invoking and executing the optimization strategy corresponding to the performance bottleneck type includes: Determine the attribution confidence of the performance bottleneck type; Call the optimization strategy corresponding to the performance bottleneck type from the preset optimization strategy template library; The execution order of the optimization strategy is determined based on the attribution confidence, and the corresponding optimization strategy is executed based on the execution order.

8. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 7, characterized in that, The attribution confidence score for determining the performance bottleneck type includes: The execution time anomaly score, resource consumption anomaly score, and intermediate result size anomaly score corresponding to the performance anomaly stage are obtained respectively, and after normalization processing, the time score, resource score, and intermediate result score are obtained. Based on the characteristic sensitivity dimensions of the performance bottleneck type, determine the duration weight coefficient, resource weight coefficient, and intermediate result weight coefficient. The attribution confidence level corresponding to the performance bottleneck type is determined by weighting and summing the duration score, resource score, and intermediate result score using the duration weight coefficient, resource weight coefficient, and intermediate result weight coefficient.

9. The performance monitoring and optimization method for a biological sequence reasoning framework according to claim 7, characterized in that, It also includes: after executing the optimization strategy, re-collecting the performance feature vector corresponding to the abnormal execution stage, and re-determining the abnormality and bottleneck; If the system is determined to be abnormal and the performance bottleneck type remains unchanged, the execution intensity of the optimization strategy is increased or the system is switched to a stronger optimization strategy of the same type.

10. A performance monitoring and optimization system for a biological sequence reasoning framework, characterized in that, include: The task description information acquisition unit is used to acquire the task description information of the reasoning task in response to the execution request of the biological sequence reasoning task; The task description information includes at least the inference model type, sequence length characteristics, inference stage division information, and execution resource configuration information; The segmentation unit is used to divide the execution process of the reasoning task into stages based on the task description information and generate a reasoning stage sequence. The association unit is used to associate the stage performance indicators corresponding to each collected inference stage with the inference stage sequence to construct an inference performance feature vector; The bottleneck acquisition unit is used to determine the performance anomaly stage and its corresponding performance bottleneck type based on the inference performance feature vector. The execution unit is used to call and execute the optimization strategy corresponding to the performance bottleneck type.