Multi-thread parallel computing method and system for brucella spondylitis diagnosis parameters
By constructing a diagnostic task dependency graph, adaptive work-stealing scheduling, and vectorized parallel computing, combined with feedback-driven optimization, the problems of inconsistent handling of computational dependencies and unbalanced load in the diagnosis of brucellosis spondylitis were solved, achieving efficient parallel computing, improving computing speed and throughput, and meeting the needs of rapid diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE THIRD HOSPITAL OF HEBEI MEDICAL UNIV
- Filing Date
- 2025-11-21
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies for the diagnosis of brucellosis spondylitis suffer from inconsistent handling of computational task dependencies, unbalanced load, limited computational throughput, and insufficient performance optimization, failing to meet the needs of rapid diagnosis.
By constructing a diagnostic task dependency graph, and employing an adaptive work-stealing scheduling strategy, vectorized parallel computing, and feedback-driven optimization mechanism, a closed-loop collaborative system is formed to achieve efficient parallel computing.
It improves data consistency and load balancing in the calculation process, significantly enhances calculation speed and throughput, and enables continuous improvement in system performance, meeting the rapid diagnostic needs of brucellosis spondylitis.
Smart Images

Figure CN121523738B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parallel computing technology for medical information, specifically to a multi-threaded parallel computing method and system for brucellosis spondylitis diagnostic parameters. Background Technology
[0002] Brucellotic spondylitis is an osteomyelitis of the spine caused by Brucella infection. Clinical diagnosis requires comprehensive analysis of a large number of complex diagnostic parameters, including multi-dimensional information such as magnetic resonance imaging data, serological antibody titers, inflammatory marker concentrations, and quantitative data on vertebral pathological characteristics. With the continuous development of medical imaging technology and laboratory testing technology, the amount of data involved in the diagnosis of brucellotic spondylitis has increased explosively, and traditional single-threaded serial calculation methods can no longer meet the timeliness requirements of rapid clinical diagnosis.
[0003] In the prior art, patent document CN118673026A discloses a method and apparatus for constructing a patient master index based on dynamic multithreading. This method configures patient factors and weight information, creates a cache pool for storing ID card number factor information and composite factor information, and marks data as either capable of concurrent processing or not based on cache comparison results. For data marked as capable of concurrent processing, dynamic multithreading is used to construct the master index; for unmarked data, single-threaded processing is used. This technical solution improves the efficiency of patient data processing to some extent, but still has the following technical shortcomings:
[0004] First, the existing technology uses simple hash code cache comparison for data deduplication and concurrent marking, without considering the dependencies between computational tasks. When there are complex dependencies in the calculation of diagnostic parameters, it may lead to data inconsistency or incorrect calculation order, and cannot be applied to parameter calculation scenarios with complex dependency structures in the diagnosis of brucellosis spondylitis.
[0005] Second, the existing thread scheduling strategy is relatively fixed, and the thread pool size is preset according to the number of CPU cores. It lacks the ability to dynamically adjust thread resources according to real-time load. When the computational complexity of different diagnostic parameters varies greatly, the load imbalance problem of some threads being idle while others are overloaded is likely to occur, which seriously affects the overall computational efficiency.
[0006] Third, the existing technology does not employ vectorized parallel optimization techniques during the computation process. For a large number of similar numerical computation tasks in the diagnosis of brucellosis spondylitis, it cannot fully utilize the single instruction multiple data flow capability of modern processors, thus limiting the computational throughput.
[0007] Fourth, the existing technology lacks performance feedback and adaptive optimization mechanisms, and cannot dynamically optimize the scheduling strategy based on historical execution data, making it difficult to continuously improve system performance.
[0008] Therefore, given the specific needs of calculating diagnostic parameters for brucellosis spondylitis, there is an urgent need for an efficient multi-threaded parallel computing technology that can handle complex task dependencies, achieve adaptive load balancing, support vectorized parallel acceleration, and possess feedback optimization capabilities. Summary of the Invention
[0009] To address the shortcomings of existing technologies, the present invention aims to provide a multi-threaded parallel computing method and system for brucellosis spondylitis diagnostic parameters. By constructing a diagnostic task dependency graph, adopting an adaptive work-stealing scheduling strategy, implementing vectorized parallel computing, and establishing a feedback-driven optimization mechanism, a closed-loop collaborative system with four core modules deeply coupled is formed, thereby achieving efficient parallel computing of brucellosis spondylitis diagnostic parameters.
[0010] To achieve the above objectives, the technical solution provided by the present invention is as follows:
[0011] A multi-threaded parallel computation method for brucellosis spondylitis diagnostic parameters includes the following steps: diagnostic task dependency graph construction step, adaptive thread scheduling step, vectorized parallel computation step, and feedback-driven optimization step.
[0012] The steps for constructing the diagnostic task dependency graph are as follows: Obtain the Brucella spondylitis diagnostic dataset, construct a directed acyclic task dependency graph based on the computational dependencies between diagnostic parameters, where nodes represent diagnostic parameter tasks to be computed and edges represent data dependencies between parameters, and determine task priorities based on the computational complexity and dependency depth of each diagnostic parameter task.
[0013] The adaptive thread scheduling process is based on the task dependency graph and uses an adaptive work-stealing scheduling strategy for thread allocation. The thread pool size is dynamically adjusted according to the current system load and task queue depth. For ready tasks with an in-degree of zero, a lock-free concurrent queue is used for task distribution. When the local task queue of a worker thread is empty, tasks are stolen from the tail of the task queue of other busy threads to achieve load balancing.
[0014] The vectorized parallel computing step performs vectorized parallel processing on the ready tasks, organizing the imaging measurement data, serological indicators and inflammatory marker data of brucellosis spondylitis into a continuous memory vector, and using single instruction multiple data stream parallel instructions to perform calculation operations on multiple diagnostic parameters simultaneously, and updating the ready state of subsequent tasks in the task dependency graph according to the calculation results.
[0015] The feedback-driven optimization step monitors the computational performance metrics of each thread, generates performance feedback signals based on task completion time and resource utilization, dynamically adjusts task priorities and thread scheduling strategies based on performance feedback signals, and passes the adjusted scheduling parameters back to the adaptive thread scheduling step to optimize the execution efficiency of subsequent computational tasks, outputting the parallel computation results of brucellosis spondylitis diagnostic parameters.
[0016] This invention also provides a multi-threaded parallel computing system for diagnostic parameters of brucellosis spondylitis, including a diagnostic task dependency graph construction module, an adaptive thread scheduling module, a vectorized parallel computing module, and a feedback-driven optimization module. The modules are deeply coupled and form a closed-loop collaborative architecture of forward computing and backward optimization.
[0017] The beneficial effects of this invention include:
[0018] First, by constructing a diagnostic task dependency graph, this invention accurately depicts the computational dependencies between various diagnostic parameters of brucellosis spondylitis, ensuring data consistency and the correctness of the computation order during parallel computing, and avoiding computational errors caused by ignoring dependencies. Compared with the simple hash deduplication method of existing technologies, it can handle more complex parameter calculation scenarios.
[0019] Secondly, the present invention adopts an adaptive work-stealing scheduling strategy, which dynamically adjusts the size of the thread pool according to the real-time system load. It achieves automatic load balancing through lock-free concurrent queues and work-stealing mechanisms, so that the computing load of each working thread tends to be balanced, effectively avoiding the problems of thread idleness and overload, and improving the utilization efficiency of multi-core processors.
[0020] Third, this invention utilizes vectorized parallel computing technology to organize diagnostic parameter data of the same type into continuous vectors and uses single-instruction multiple-data-stream instructions for batch processing, which significantly improves the throughput of data computation. For a large number of repetitive numerical computation tasks in the diagnosis of brucellosis spondylitis, the computation speed is significantly improved.
[0021] Fourth, this invention establishes a feedback-driven optimization mechanism. By monitoring performance indicators and generating feedback signals, it dynamically adjusts task priorities and scheduling strategies to form a closed-loop optimization system. This enables the system performance to continuously improve based on actual operating conditions, achieving synergistic efficiency among the four core modules.
[0022] Experimental results show that when processing a complete diagnostic dataset of 1000 patients with brucellosis spondylitis, the overall computational efficiency of this invention is 420% higher than that of traditional single-threaded methods and 85% higher than that of existing simple multi-threaded methods. The average computation time for diagnostic parameters is reduced from 12.6 minutes to 2.4 minutes, providing high-performance computing support for rapid clinical diagnosis. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating the multi-threaded parallel calculation method for brucellosis spondylitis diagnostic parameters provided in an embodiment of the present invention.
[0024] Figure 2 This is a schematic diagram of the structure of the multi-threaded parallel computing system for brucellosis spondylitis diagnostic parameters provided in an embodiment of the present invention.
[0025] Figure 3 This is a schematic diagram of the structure of the diagnostic task dependency graph provided in an embodiment of the present invention.
[0026] Figure 4 This is a schematic diagram of feedback-driven optimized closed-loop control provided in an embodiment of the present invention. Detailed Implementation
[0027] Please refer to the attached document. Figures 1-4 To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of the invention.
[0028] Reference Figure 1 and Figure 2 This invention provides a multi-threaded parallel computing method and system for brucellosis spondylitis diagnostic parameters. The system includes a diagnostic task dependency graph construction module 1, an adaptive thread scheduling module 2, a vectorized parallel computing module 3, and a feedback-driven optimization module 4. These four core modules form a deeply coupled closed-loop collaborative architecture. The output of the diagnostic task dependency graph construction module 1 serves as the input to the adaptive thread scheduling module 2. The output of the adaptive thread scheduling module 2 drives the vectorized parallel computing module 3 to execute computational tasks. The performance data of the vectorized parallel computing module 3 is passed to the feedback-driven optimization module 4 for analysis. The optimization parameters generated by the feedback-driven optimization module 4 act inversely on the adaptive thread scheduling module 2 and the diagnostic task dependency graph construction module 1, forming a complete closed loop of "forward transmission → performance evaluation → reverse feedback → parameter adjustment".
[0029] The diagnostic task dependency graph construction module 1 is used to obtain the Brucella spondylitis diagnostic dataset and construct a directed acyclic task dependency graph based on the computational dependencies between diagnostic parameters. (Refer to...) Figure 3 The diagnostic task dependency graph is a directed acyclic graph structure. Each node in the graph represents a diagnostic parameter task to be computed, and the directed edges represent the data dependencies between parameters. That is, the computation result of the starting task of the edge is the input data of the ending task.
[0030] In one embodiment of the present invention, the brucellosis spondylitis diagnostic dataset includes the following types of diagnostic parameters: vertebral body signal intensity measurements in magnetic resonance imaging (MRI) images, used to assess the degree of vertebral body inflammation and bone marrow edema; quantitative values of intervertebral disc degeneration, reflecting the severity of brucellosis invasion of the intervertebral disc; serum brucellosis antibody titer detection values, including results from the Rose Bengal plate agglutination test and tube agglutination test; C-reactive protein concentration values, serving as a marker of acute inflammatory response; erythrocyte sedimentation rate (ESR) values, reflecting the state of inflammatory activity in the body; and three-dimensional volume data of the extent of vertebral body destruction, quantified information of the lesion area obtained through image segmentation.
[0031] In the specific implementation process, the construction of the diagnostic task dependency graph adopts the following process: First, the patient's original diagnostic data, including DICOM format magnetic resonance imaging and laboratory test results, is read from the hospital information system; second, the original data is preprocessed to extract the values of various diagnostic parameters; then, the dependencies between the calculations of each diagnostic parameter are analyzed, for example, the calculation of the comprehensive diagnostic score depends on the calculation results of vertebral body signal intensity, antibody titer, and inflammatory markers; finally, these dependencies are represented as edges of a directed acyclic graph to complete the construction of the task dependency graph.
[0032] In a preferred embodiment of the present invention, task priorities are determined based on the computational complexity and dependency depth of each diagnostic parameter task. Determining task priorities is crucial for the efficiency of parallel computing; high-priority tasks should be scheduled for execution first. The present invention employs a priority calculation method based on the critical path, comprehensively considering both the computational complexity of the task itself and its position in the dependency graph.
[0033] For each diagnostic parameter task, its critical path length is first calculated. The critical path length is defined as the longest dependency path from the current task to all terminating tasks (i.e., tasks with an out-degree of zero). Let the task... The critical path length is The computational complexity is The overall priority score for this task is determined by the following formula:
[0034] ,
[0035] in, For the task The overall priority score, For the task The computational complexity, expressed in terms of the number of floating-point operations, This represents the highest computational complexity among all tasks. For the task Critical path length, This is the longest critical path among all tasks. To calculate the complexity weighting coefficients, This represents the critical path weight coefficient. In a preferred embodiment, The value is 0.3. A value of 0.7 prioritizes tasks on the critical path, minimizing overall completion time. (Comprehensive priority score) The value ranges from 0 to 1, with a larger value indicating a higher priority.
[0036] computational complexity The method for determining the complexity is as follows: for the task of calculating vertebral body signal intensity, the complexity is the product of the number of image pixels and the size of the convolution kernel; for the task of calculating antibody titer, the complexity is the product of the dilution factor and the number of comparisons; for the task of comprehensive scoring of inflammatory markers, the complexity is the product of the number of indicators involved in the calculation and the complexity of the aggregation operation.
[0037] The adaptive thread scheduling module 2 is connected to the diagnostic task dependency graph construction module 1, and is used to allocate threads based on the task dependency graph using an adaptive work-stealing scheduling strategy. Adaptive work-stealing scheduling is an efficient dynamic load balancing technique. Each worker thread maintains a local task queue, and when the local queue is empty, the thread steals tasks from the queues of other busy threads.
[0038] In one embodiment of the present invention, the adaptive thread scheduling module 2 dynamically adjusts the thread pool size based on the current system load and task queue depth. Specifically, the system periodically samples the task queue length and processor utilization of each worker thread, with a sampling period of 100ms; the average queue length is calculated. and average processor utilization Determine whether the thread pool size needs to be adjusted based on a preset threshold.
[0039] The thread pool size adjustment strategy is as follows: When and When the number of worker threads is increased, the increase is 10% of the current number of threads, but does not exceed twice the number of CPU cores; when When this happens, reduce the number of worker threads by 10% of the current number of threads, but not less than half the number of CPU cores. The upper threshold is preset to 8 tasks per thread; The preset threshold is set to 2 tasks per thread; The saturation threshold is set at 85%. This adaptive adjustment mechanism enables the system to dynamically configure computing resources according to the actual load, avoiding resource waste or computing bottlenecks.
[0040] In another preferred embodiment of the present invention, a lock-free concurrent queue is used for task distribution of ready tasks with an in-degree of zero. The lock-free concurrent queue avoids the thread blocking and context switching overhead of traditional locking mechanisms, significantly improving the efficiency of task distribution. Specifically, it employs a lock-free double-ended queue structure based on atomic comparison-swap operations. Worker threads retrieve local tasks from the head of the queue, while stealing threads retrieve tasks from the tail of the queue. Atomic operations ensure data consistency in a multi-threaded environment without the need for mutex locks.
[0041] The core operations of a lock-free double-ended queue include: local push operation, where worker threads push newly generated subtasks to the head of their local queue; local pop operation, where worker threads retrieve tasks to be executed from the head of their local queue; and steal operation, where idle threads steal tasks from the tail of other threads' queues. All of these operations are implemented using atomic instructions, ensuring correctness and efficiency in high-concurrency environments.
[0042] When a worker thread's local task queue is empty, the work-stealing process begins. The selection of the stealing target employs a random strategy, meaning another worker thread is randomly chosen as the target. If the target thread's queue is not empty, a task is stolen from the tail of its queue; if the target thread's queue is empty, a new target is randomly selected. This random stealing strategy has good theoretical performance guarantees, with the expected total number of steals being linearly related to the number of processors.
[0043] Vectorized parallel computing module 3 is connected to adaptive thread scheduling module 2 and is used to perform vectorized parallel processing on ready tasks. Vectorized parallel computing makes full use of the single instruction multiple data stream capability of modern processors, packing multiple data elements into vectors for batch computation, which significantly improves computational throughput.
[0044] In one embodiment of the present invention, the vectorized parallel computing module 3 organizes the imaging measurement data, serological indicators, and inflammatory marker data of brucellosis spondylitis into a continuous memory vector. The specific implementation process is as follows: First, the data is classified according to the data type and computational characteristics of the diagnostic parameters, and data of the same type are stored centrally; second, the data is rearranged into continuous memory blocks the width of a vector register. For a 256-bit vector register, each memory block contains 8 single-precision floating-point numbers or 4 double-precision floating-point numbers; finally, the memory addresses are aligned to meet the alignment requirements of the vector instructions.
[0045] The single-instruction multiple-data parallel instruction is used to perform calculations on multiple diagnostic parameters simultaneously, including the following types of vectorized operations:
[0046] For intervertebral disc signal intensity calculation, the T1-weighted and T2-weighted signal values of multiple intervertebral discs are organized into two vectors, and the signal ratio of all intervertebral discs is calculated at once using a vectorized division command:
[0047] ,
[0048] in, The signal ratio vector The T2 weighted signal strength vector The weighted signal strength vector of T1 This represents an element-wise division operation on a vector. This operation is performed using a single vector division instruction, which is nearly 8 times more efficient than scalar loop calculations.
[0049] To quantify the degree of bone destruction, the destroyed volume and original volume of multiple affected vertebrae are represented as vectors, and vectorization operations are used to calculate the percentage of destruction:
[0050] ,
[0051] in, This is a vector representing the percentage of bone destruction. This is the lesion volume vector. This is the original cone volume vector.
[0052] For calculating inflammation distribution indicators, indicators such as C-reactive protein concentration, erythrocyte sedimentation rate, and white blood cell count are organized into vectors, and a vectorized weighted summation is used to calculate the comprehensive inflammation score:
[0053] ,
[0054] in, As a comprehensive inflammation score vector, This represents the C-reactive protein concentration vector. Let be the erythrocyte sedimentation rate vector. This is a white blood cell count vector. , , These are the weighting coefficients for each indicator. In a preferred embodiment, The value is 0.5. The value is 0.3. The value is 0.2. This weighting is based on clinical experience and reflects the relative importance of each inflammatory marker in the diagnosis of brucellosis spondylitis.
[0055] After vectorized parallel computation is completed, the readiness status of successor tasks in the task dependency graph is updated based on the computation results. Specifically, when a task completes computation, all its successor tasks in the dependency graph are traversed, and the in-degree of each successor task is decremented by 1. When the in-degree of a successor task becomes 0, it indicates that all its predecessor tasks have been completed, and the task becomes a ready task, added to the task queue of the corresponding worker thread to await execution. This update process is implemented using atomic operations to ensure correctness in a multi-threaded environment.
[0056] The feedback-driven optimization module 4 is connected to both the vectorized parallel computing module 3 and the adaptive thread scheduling module 2. It monitors the computational performance metrics of each thread, generates performance feedback signals based on task completion time and resource utilization, and dynamically adjusts task priorities and thread scheduling strategies based on these signals. (See reference...) Figure 4 The feedback-driven optimization mechanism forms a closed-loop control structure, enabling the system to continuously optimize scheduling decisions based on historical execution data.
[0057] In one embodiment of the present invention, the feedback-driven optimization module 4 calculates the average execution time and variance of each type of task within the most recent time window. The size of the time window is set to the 100 most recently completed tasks. For each type of task, its actual execution time is recorded, and the average execution time is calculated. and execution time variance ,in Indicates the task type number.
[0058] Calculate the effective computation time percentage for each worker thread. The effective computation time percentage is defined as the ratio of the time a worker thread spends executing actual computation tasks to the total time, excluding waiting time, stolen tasks, and idle time. Let the threads... The effective computation time percentage is ,but:
[0059] ,
[0060] in, For threads Cumulative calculation time, For threads Total runtime. Ideally, It should be close to 1, indicating that the thread spends most of its time performing effective computations.
[0061] Scheduling strategy adjustment suggestions are generated based on execution time skew and resource utilization skew. Execution time skew measures the difference between the actual execution time and the expected execution time.
[0062] ,
[0063] in, For the average execution time deviation, This represents the total number of task types. For task type The actual average execution time, For task type The expected execution time.
[0064] Resource utilization deviation measures the degree of load balance across threads:
[0065] ,
[0066] in, Due to resource utilization deviation, The total number of worker threads. For threads The percentage of effective computation time, This represents the average percentage of effective computation time for all threads.
[0067] based on and It generates scheduling strategy adjustment suggestions, including task priority weight correction values and thread affinity binding strategies.
[0068] The task priority weight adjustment value is calculated using the following formula:
[0069] ,
[0070] in, To calculate the correction value for the complexity weighting coefficient, The learning rate is 0.05. The execution time deviation threshold is set to 0.2. This is a symbolic function. When the execution time deviation exceeds a threshold, the priority weight is adjusted appropriately, so that computational complexity accounts for a larger or smaller proportion in the priority calculation. The corrected computational complexity weight coefficient is... ,at the same time This is to ensure that the sum of the weights is 1.
[0071] The determination of the thread affinity binding strategy is based on the resource utilization deviation. .when A value exceeding 0.15 indicates an unbalanced thread load, prompting the system to enable thread affinity optimization: tasks with data locality relationships are distributed to the same processor core for execution as much as possible, reducing cache misses and memory access latency. Specifically, this involves analyzing task pairs with direct dependencies in the task dependency graph, marking parent and child tasks as having affinity; and prioritizing task stealing from threads with affinity relationships during work stealing.
[0072] The adjusted scheduling parameters are then passed back to the adaptive thread scheduling module 2 to optimize the execution efficiency of subsequent computational tasks. Specifically, the task priority weight correction values are applied to the priority calculation process of the task dependency graph, updating the overall priority score of each task; the thread affinity binding strategy is applied to the work-stealing target selection process, modifying the target selection algorithm to consider affinity factors. This backpropagation mechanism allows subsequent task scheduling to utilize historical performance data for optimization decisions, achieving continuous improvement in system performance.
[0073] The synergistic effect among the four core modules is reflected in the following aspects: First, the diagnostic task dependency graph construction module 1 provides accurate task dependency information and priority data for the adaptive thread scheduling module 2, making scheduling decisions more reasonable; the adaptive thread scheduling module 2 provides balanced load distribution for the vectorized parallel computing module 3, ensuring that the computing resources of each thread are fully utilized; the efficient execution of the vectorized parallel computing module 3 provides rich performance data for the feedback-driven optimization module 4; the optimization suggestions of the feedback-driven optimization module 4 influence the working methods of the first two modules in turn, forming a closed-loop optimization. This deeply coupled collaborative architecture achieves a non-linear synergy of 1+1>2, with the overall performance improvement exceeding the simple sum of the individual optimization effects of each module.
[0074] In a preferred embodiment of the present invention, the method further includes a calculation result verification step. The calculation result verification step performs a consistency check on the parallel calculation results, comparing the parallel calculation results with the serial calculation results. When the numerical deviation exceeds a preset precision threshold, an anomaly is marked and the corresponding calculation task is re-executed. The preset precision threshold is... The threshold is small enough to ensure the accuracy of the calculation results, while taking into account the inherent errors of floating-point operations.
[0075] The verification process employs a sampling inspection strategy: 5% of the computational tasks are randomly selected for serial recalculation, and the numerical differences between the parallel and serial results are compared. If the difference exceeds a precision threshold, the task is marked as abnormal and re-executed. If the proportion of abnormal tasks exceeds 1%, the system issues an alarm indicating a possible parallel computation error. This verification mechanism ensures the reliability of the parallel computation results, guaranteeing correctness without significantly impacting overall computational efficiency.
[0076] The practical application effects of the present invention are illustrated below through specific embodiments.
[0077] In Example 1, parallel computation was tested on a complete diagnostic dataset of 1000 patients with brucellosis spondylitis. The diagnostic data for each patient included: lumbar spine MRI sequences (containing 120 slices, each with a resolution of 512×512 pixels), serological test results (6 indicators including brucellosis antibody titer, C-reactive protein, and erythrocyte sedimentation rate), and clinical symptom scores. The calculation of diagnostic parameters for each patient involved approximately 15,000 computational tasks, forming a complex task-dependency graph.
[0078] The test platform was configured as follows: Intel Xeon Gold 6248R processor (24 cores and 48 threads), 3.0GHz clock speed, supporting AVX-512 vector instruction set; 64GB DDR4-2933 ECC memory; and Ubuntu 22.04 LTS operating system.
[0079] Test results show that using the traditional single-threaded serial computing method, the total time to process 1000 patient data was 12600 seconds (210 minutes), with an average of 12.6 seconds per patient; using the multi-threaded parallel computing method of this invention, the total time to process the same data was 2400 seconds (40 minutes), with an average of 2.4 seconds per patient; the computational efficiency improvement rate was [percentage missing]. This is basically in line with the expected 420%.
[0080] Regarding resource utilization, the average percentage of effective computation time for each worker thread in the method of this invention is: Resource utilization deviation is This indicates that the load distribution is balanced; the average processor utilization is 78%, which is 16 percentage points higher than the 62% of the simple multithreaded method.
[0081] Regarding task scheduling efficiency, the number of work steals accounted for 8.3% of the total number of tasks, indicating that the task allocation was relatively balanced and the overhead of stealing operations was small. The adaptive thread pool size was adjusted 47 times, and the number of threads dynamically changed between 18 and 42, effectively adapting to the computing load at different stages.
[0082] Regarding the acceleration effect of vectorized computation, the speedup ratio of vectorized computation compared to scalar computation is 6.8 times, which is close to the theoretical maximum of 8 times (256-bit vector registers process 8 single-precision floating-point numbers); the vectorization degree of intervertebral disc signal intensity calculation, bone destruction degree quantification and inflammation distribution index calculation reached 92%, 88% and 95%, respectively.
[0083] Regarding the feedback optimization effect, after 100 rounds of feedback optimization iterations, the task priority weight coefficient... The critical path weight coefficient was adaptively adjusted from the initial 0.3 to 0.35. The value was adjusted accordingly to 0.65; the adjusted parameter further reduced the overall execution time by 3.2%, verifying the effectiveness of the feedback-driven optimization mechanism.
[0084] In Example 2, the method of the present invention is compared and analyzed with the prior art. The comparison method selected is the dynamic multi-threaded patient master index construction method in patent document CN118673026A, which is modified and applied to the scenario of calculating diagnostic parameters for brucellosis spondylitis.
[0085] The comparison results show that in handling complex dependencies, the existing technology uses simple hash deduplication, which cannot handle task dependencies. When there are complex dependencies in the diagnostic parameters, the calculation order error occurs in 15.2% of cases. The present invention uses a directed acyclic task dependency graph, which accurately describes the dependency relationship and achieves a 100% accuracy rate in the calculation order.
[0086] In terms of load balancing, existing technologies use a fixed thread pool size of one CPU core, which cannot be dynamically adjusted according to the load, resulting in resource utilization discrepancies. This indicates a severe load imbalance; the adaptive work-stealing scheduling of this invention reduces resource utilization deviation to a minimum. Load balancing improved by 283%.
[0087] In terms of computational throughput, existing technologies do not employ vectorized computation and use scalar loops for data processing; the vectorized parallel computation of this invention increases computational throughput by 6.8 times, which is of great advantage for a large number of repetitive numerical computation tasks.
[0088] Regarding the system's self-optimization capability, existing technologies lack a feedback optimization mechanism, and the scheduling strategy remains fixed. The feedback-driven optimization mechanism of this invention enables the system to continuously improve based on historical performance data, resulting in an additional 3.2% performance improvement after long-term operation.
[0089] In summary, compared with the prior art, the present invention improves the overall performance by 85% when processing parallel calculation tasks for brucellosis spondylitis diagnostic parameters, while ensuring the accuracy and reliability of the calculation results.
[0090] In summary, the multi-threaded parallel computing method and system for brucellosis spondylitis diagnostic parameters provided by this invention accurately describes computational dependencies by constructing a diagnostic task dependency graph, achieves dynamic load balancing by employing adaptive work-stealing scheduling, improves data processing throughput by utilizing vectorized parallel computing, establishes a feedback-driven optimization mechanism to achieve continuous improvement in system performance, and forms a closed-loop collaborative architecture with four core modules deeply coupled. This enables efficient parallel computing of brucellosis spondylitis diagnostic parameters, providing a powerful computing support platform for rapid clinical diagnosis and treatment decisions.
Claims
1. A multi-threaded parallel calculation method for diagnostic parameters of brucellosis spondylitis, characterized in that, Includes the following steps: The steps for constructing a diagnostic task dependency graph are as follows: First, obtain the Brucella spondylitis diagnostic dataset. Then, construct a directed acyclic task dependency graph based on the computational dependencies between diagnostic parameters. Nodes in the graph represent diagnostic parameter tasks to be computed, and edges represent data dependencies between parameters. The Brucella spondylitis diagnostic dataset includes vertebral body signal intensity measurements from magnetic resonance imaging, quantified values of intervertebral disc degeneration, serum Brucella antibody titers, C-reactive protein concentrations, erythrocyte sedimentation rate, and three-dimensional volume data of the vertebral body damage area. Calculate the critical path length for each diagnostic parameter task. The critical path length is the longest dependency path from the current task to all terminating tasks. A comprehensive priority score is determined based on computational complexity and the critical path length using the following formula: , in, For the task The overall priority score, For the task The computational complexity, expressed in terms of the number of floating-point operations, This represents the highest computational complexity among all tasks. For the task Critical path length, This is the longest critical path among all tasks. The complexity weighting coefficient is set to 0.
3. This is the critical path weight coefficient, with a value of 0.7, prioritizing the scheduling of tasks with higher overall priority scores; Adaptive thread scheduling steps: Based on the task dependency graph, an adaptive work-stealing scheduling strategy is adopted for thread allocation. The thread pool size is dynamically adjusted according to the current system load and task queue depth. For ready tasks with an in-degree of zero, a lock-free concurrent queue is used for task distribution. A lock-free double-ended queue structure based on atomic comparison and swap operations is used. Worker threads obtain local tasks from the head of the queue, and stealing threads obtain tasks from the tail of the queue. When the local task queue of a worker thread is empty, another worker thread is randomly selected as the stealing target, and tasks are stolen from the tail of its task queue to achieve load balancing. Vectorized parallel computing steps: The ready task is processed in a vectorized parallel manner. The data is organized into a continuous memory vector. Single-instruction multiple-data-stream parallel instructions are used to simultaneously perform calculations on multiple diagnostic parameters. For intervertebral disc signal intensity, the T1-weighted and T2-weighted signal values of multiple intervertebral discs are organized into a vector, and a vectorized division instruction is used to calculate the signal ratio. For the degree of bone destruction, the destroyed volume and original volume of multiple affected vertebrae are organized into a vector, and a vectorized operation is used to calculate the percentage of destruction. For inflammation distribution indicators, C-reactive protein concentration, erythrocyte sedimentation rate, and white blood cell count are organized into vectors, and a vectorized weighted sum is used to calculate the comprehensive inflammation score using the following formula: , in, As a comprehensive inflammation score vector, This represents the C-reactive protein concentration vector. Let be the erythrocyte sedimentation rate vector. This is a white blood cell count vector. , , These are the weighting coefficients for each indicator. The value is 0.
5. The value is 0.
3. The value is set to 0.2, and the readiness status of subsequent tasks in the task dependency graph is updated based on the calculation results. Feedback-driven optimization steps: Monitor the computational performance metrics of each thread, calculate the average execution time and variance of each type of task within the most recent time window, and calculate the effective computational time percentage of each worker thread using the following formula: , in, For threads The percentage of effective computation time, For threads Cumulative calculation time, For threads Total runtime; average execution time deviation is calculated using the following formula: , in, For the average execution time deviation, This represents the total number of task types. For task type The actual average execution time, For task type Expected execution time; calculate resource utilization deviation using the following formula: , in, Due to resource utilization deviation, The total number of worker threads. The average effective computation time percentage for all threads; based on the execution time deviation and resource utilization deviation, the task priority weight correction value is generated using the following formula: , in, To calculate the correction value for the complexity weighting coefficient, The learning rate is 0.
05. The execution time deviation threshold is set to 0.
2. For the sign function, the corrected computational complexity weighting coefficient is: The critical path weight coefficient is adjusted accordingly. When the resource utilization deviation exceeds 0.15, the thread affinity binding strategy is enabled, marking parent and child tasks with direct dependencies as having affinity, and prioritizing stealing tasks from threads with affinity; the task priority weight correction value is applied to the priority calculation process of the task dependency graph, and the thread affinity binding strategy is applied to the work stealing target selection process, so that subsequent task scheduling can use historical performance data for optimization decisions; The calculation result verification steps are as follows: Consistency verification is performed on the parallel computing results by comparing the parallel computing results with the serial computing results. If the numerical deviation exceeds a preset precision threshold, an anomaly is marked, and the corresponding calculation task is re-executed. The preset precision threshold is... The parallel calculation results of brucellosis spondylitis diagnostic parameters are output.
2. The multi-threaded parallel calculation method for diagnostic parameters of brucellosis spondylitis according to claim 1, characterized in that, The adaptive thread scheduling step dynamically adjusts the thread pool size based on the current system load and task queue depth, including: The task queue length and processor utilization of each worker thread are periodically sampled at a period of 100ms. When the average queue length exceeds a preset upper threshold and the processor utilization is lower than the saturation threshold, the number of worker threads is increased by 10% of the current number of threads, but not exceeding twice the number of CPU cores. When the average queue length is lower than a preset lower threshold, the number of worker threads is decreased by 10% of the current number of threads, but not less than half the number of CPU cores. The preset upper threshold is 8 tasks per thread, the preset lower threshold is 2 tasks per thread, and the saturation threshold is 85%.
3. A multi-threaded parallel computing system for brucellosis spondylitis diagnostic parameters, used to implement the multi-threaded parallel computing method for brucellosis spondylitis diagnostic parameters as described in claim 1 or 2, characterized in that, include: A diagnostic task dependency graph construction module is used to acquire the Brucella spondylitis diagnostic dataset. A directed acyclic task dependency graph is constructed based on the computational dependencies between diagnostic parameters. Nodes in the task dependency graph represent diagnostic parameter tasks to be computed, and edges represent data dependencies between parameters. The Brucella spondylitis diagnostic dataset includes vertebral body signal intensity measurements from magnetic resonance imaging, quantified values of intervertebral disc degeneration, serum Brucella antibody titers, C-reactive protein concentrations, erythrocyte sedimentation rate, and three-dimensional volume data of vertebral body damage extent. The critical path length is calculated for each diagnostic parameter task. The critical path length is the longest dependency path from the current task to all terminating tasks. A comprehensive priority score is determined based on the computational complexity and the critical path length using the following formula: ,in, For the task The overall priority score, For the task The computational complexity, expressed in terms of the number of floating-point operations, This represents the highest computational complexity among all tasks. For the task Critical path length, This is the longest critical path among all tasks. The complexity weighting coefficient is set to 0.
3. This is the critical path weight coefficient, with a value of 0.7, prioritizing the scheduling of tasks with higher overall priority scores; An adaptive thread scheduling module, connected to the diagnostic task dependency graph construction module, is used to allocate threads based on the task dependency graph using an adaptive work-stealing scheduling strategy. It dynamically adjusts the thread pool size according to the current system load and task queue depth. For ready tasks with an in-degree of zero, a lock-free concurrent queue is used for task distribution. A lock-free double-ended queue structure based on atomic comparison and swap operations is used. Worker threads obtain local tasks from the head of the queue, and stealing threads obtain tasks from the tail of the queue. When a worker thread's local task queue is empty, another worker thread is randomly selected as the stealing target, and tasks are stolen from the tail of its task queue to achieve load balancing. The vectorized parallel computing module, connected to the adaptive thread scheduling module, is used to perform vectorized parallel processing on the ready tasks. It organizes data into continuous memory vectors and uses single-instruction multiple-data-stream parallel instructions to simultaneously perform calculations on multiple diagnostic parameters. For intervertebral disc signal intensity, it organizes the T1-weighted and T2-weighted signal values of multiple intervertebral discs into vectors and uses vectorized division instructions to calculate the signal ratio. For bone destruction degree, it organizes the destroyed volume and original volume of multiple affected vertebrae into vectors and uses vectorized operations to calculate the destruction percentage. For inflammation distribution indicators, it organizes C-reactive protein concentration, erythrocyte sedimentation rate, and white blood cell count into vectors and uses vectorized weighted summation to calculate the comprehensive inflammation score using the following formula: ,in, As a comprehensive inflammation score vector, This represents the C-reactive protein concentration vector. Let be the erythrocyte sedimentation rate vector. This is a white blood cell count vector. , , These are the weighting coefficients for each indicator. The value is 0.
5. The value is 0.
3. The value is set to 0.2, and the readiness status of subsequent tasks in the task dependency graph is updated based on the calculation results. The feedback-driven optimization module, connected to both the vectorized parallel computing module and the adaptive thread scheduling module, is used to monitor the computational performance metrics of each thread, calculate the average execution time and variance of each type of task within the most recent time window, and calculate the effective computation time percentage of each worker thread using the following formula: ,in, For threads The percentage of effective computation time, For threads Cumulative calculation time, For threads The total runtime is used to calculate the average execution time deviation using the following formula: ,in, For the average execution time deviation, This represents the total number of task types. For task type The actual average execution time, For task type The expected execution time is used to calculate the resource utilization deviation using the following formula: ,in, Due to resource utilization deviation, The total number of worker threads. Based on the average effective computation time percentage of all threads, and the execution time deviation and resource utilization deviation, the task priority weight adjustment value is generated using the following formula: ,in, To calculate the correction value for the complexity weighting coefficient, The learning rate is 0.
05. The execution time deviation threshold is set to 0.
2. For the sign function, the corrected computational complexity weighting coefficient is: The critical path weight coefficient is adjusted accordingly. When the resource utilization deviation exceeds 0.15, the thread affinity binding strategy is enabled, the parent and child tasks with direct dependencies are marked as having affinity, and tasks are preferentially stolen from threads with affinity. The task priority weight correction value is applied to the priority calculation process of the task dependency graph, and the thread affinity binding strategy is applied to the work stealing target selection process. The calculation result verification module, connected to the vectorized parallel computing module, is used to perform consistency verification on the parallel computing results. It compares the parallel computing results with the serial computing results numerically. When the numerical deviation exceeds a preset precision threshold, an anomaly is marked and the corresponding calculation task is re-executed. The preset precision threshold is [value missing]. The parallel calculation results of brucellosis spondylitis diagnostic parameters are output.