Neurosurgical operation planning and teaching system based on virtual reality
By adopting technical means of surgical action construction, intraoperative variation simulation, structural pathway mapping, load area identification and operating rhythm rearrangement modules in the neurosurgery planning and teaching system, the limitations of the existing system in dynamic response and high-frequency behavioral variation processing are solved, and more accurate action intention extraction and structured action continuous fragment reconstruction are achieved, which improves the response elasticity and strategic richness of the simulated surgical process.
Patent Information
- Application Number
- CN202510697049.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-06-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing neurosurgery planning and teaching system based on virtual reality has limitations in dynamic response and high-frequency behavioral variation processing, resulting in mechanization of user path memory and fixed operation rhythm, making it difficult to train emergency judgment and reaction strategies, and the perspective transformation is not natural transitional, and problems of jump or blind spot positioning often occur.
The surgical action construction module, intraoperative variation simulation module, structural path mapping module, load area identification module and operation rhythm reordering module are adopted to extract action continuity through technical means such as artificial neural network and generation adversarial network, identify intraoperative high mutation risk points, establish a dynamic relationship between the perspective orientation and the structural center line, identify high operating load areas, and rearrange the operation rhythm to generate more diverse simulated surgical paths.
More precise action intention extraction and structured action continuous segment reconstruction are achieved, the distribution range of controllable interference variables in the scene is expanded, the initiative of spatial navigation and the targetedness of structural interactions are enhanced, and the response elasticity and strategic richness of simulated surgical procedures are improved.
Smart Images

Figure CN120215718A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of surgical simulation, and in particular to a neurosurgery operation planning and teaching system based on virtual reality. Background Art
[0002] The field of surgical simulation technology aims to build a highly immersive and interactive three-dimensional surgical scene through virtual reality technology for use in surgical preoperative planning, operation training and teaching demonstrations. In neurosurgery applications, it restores the complex anatomical structure of the brain, simulates high-precision minimally invasive pathways, and reproduces the intraoperative dynamic environment to help operators master the spatial distribution and operation pathways of key structures, thereby improving their preoperative cognition and intraoperative reaction capabilities.
[0003] The neurosurgery planning and teaching system based on virtual reality refers to a digital system that integrates functions such as three-dimensional reconstruction, surgical path setting, immersive interaction and dynamic feedback. It includes a medical image data import module, a virtual reality rendering module, an interactive operation control module, a path planning module and a teaching evaluation module. It aims to provide a non-contact, individualized, and highly realistic training and rehearsal platform for neurosurgeons to perform preoperative path rehearsals and intraoperative structure familiarity, and for interns to perform repeated training and master skills, thereby improving the safety and efficiency of clinical surgery.
[0004] Existing technologies mainly rely on fixed preoperative image reconstruction and preset path navigation to build an interactive environment. They have obvious limitations in dynamic response and high-frequency behavior variation processing, which can easily lead to problems such as mechanized user path memory and fixed operation rhythm in actual drills. In intraoperative scene simulation, the form of structural disturbance is relatively single, which makes it difficult to cover the state of emergencies, limiting the training depth of the operator's emergency judgment and response strategy. The associations between spatial structures mostly rely on static label mapping and point connections, and lack the screening ability based on the dynamic geometric relationship between the direction and the central axis of the structure, resulting in a lack of natural transition in perspective conversion, and often causing problems with jumps or blind spot positioning. In terms of high-intensity operation area identification, it is difficult to accurately control the training intensity and rhythm distribution, which affects the continuity and adaptability of the training curve. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a neurosurgery planning and teaching system based on virtual reality.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme: A neurosurgery operation planning and teaching system based on virtual reality comprises: Surgical Procedure Motion Construction Module: Based on the virtual surgical field scene, surgical procedure motion set, operator's perspective axis, and path segmentation points, use an artificial neural network to perform combined analysis of the attitude axis and action rotation values and distinguish directions. Through the virtual surgical field scene, extract the action continuity and classify the spatial action segments to generate a simulated surgical operation configuration cluster; Intraoperative Variation Simulation Module: Based on the simulated surgical operation configuration cluster, retrieve the number of times the action segment contacts the boundary to extract the deformation parameter sequence, perform node - to - node distance correction and corresponding point mapping, and use a generative adversarial network to perform dynamic displacement judgment and tissue area perturbation synthesis on the intracranial target area to obtain the intraoperative controllable perturbation area layer; Structural Path Mapping Module: Based on the intraoperative controllable perturbation area layer, establish the angle between the perspective orientation and the structural center line and screen and compare. Use the three - dimensional space structure to divide the structural node mapping and path sequence to obtain a multi - level virtual structure connection sequence; Load Area Identification Module: Based on the multi - level virtual structure connection sequence, extract the number mapping relationship to generate a structure sequence and set the window width. Analyze the density of the texture rewrite value to determine the intervention density critical point to obtain the high - intervention block set in the surgical simulation; Operation Rhythm Rearrangement Module: Based on the high - intervention block set in the surgical simulation, extract the intervention layer sequence number to reconstruct the structural path sorting information and select the step - distance difference, construct a rhythm jump track to generate a combined structure mapping table, and obtain the rearranged simulated surgical rhythm path table.
[0007] As a further solution of the present invention, the surgical procedure motion construction module includes: Action Sequence Decomposition Sub - module: Based on the virtual surgical field scene, surgical procedure motion set, operator's perspective axis, and path segmentation points, arrange the time of the controller input values and screen and select the continuous operation time period. Use the number of times of action amplitude change and the action duration in seconds to establish a separation point sequence, mark the start and end point position numbers in the sequence, output the time range and amplitude value list of each segment, and generate an operation section positioning group; Rotation Feature Extraction Sub - module: Based on the operation section positioning group, use an artificial neural network to superimpose and accumulate the rotation angle and attitude value in each segment of data to form a direction vector coordinate group. Calculate the magnitude of the direction change through the numerical difference between adjacent coordinates and screen and select the paragraphs with a direction change rate greater than the threshold. Group the paragraphs that meet the conditions by number to generate an attitude rotation direction sequence; Spatial Paragraph Classification Sub - module: Based on the attitude rotation direction sequence, calculate the angle between each segment's direction coordinate and the operator's current perspective axis and set the angle range screening interval. Screen and match the paragraphs within the interval and extract the corresponding path index numbers. Merge all the paragraphs with consecutive numbers to form an action path cluster and generate a simulated surgical operation configuration cluster.
[0008] As a further solution of the present invention, the path segmentation point refers to a position with significant changes in the action trajectory determined by analyzing the number of action amplitude changes and the action duration during the continuous execution of the operation action. These changes are manifested as sudden changes in the action direction, sharp changes in speed, and significant turns in the operation posture. The path segmentation point serves as a marker for dividing different operation sections, breaking down a continuous operation process into several relatively independent time segments.
[0009] As a further solution of the present invention, the intraoperative variation simulation module includes: Contact feature extraction sub-module: Based on the simulated surgical operation configuration cluster, calculate the Euclidean distance between the end point coordinates of each action segment and the structural boundary points, extract the points with a distance less than the specified threshold, mark the number of contact occurrences in each action segment during the corresponding time period and arrange the number sequence, accumulate the contact event quantities for the action sequence according to the numbers, and output the association information between the points and the segment numbers to generate a boundary contact parameter set; Response structure matching sub-module: Based on the boundary contact parameter set, calculate the coordinate differences of the structural boundary points corresponding to each segment number, extract the index points with a coordinate change greater than the threshold, reorder them according to the coordinate point numbers to form a structural number segment, group the segments with a transformation distance greater than the specified value in the number segment and extract their original position indexes, construct a regional correspondence table, and generate a structural response matching list; Perturbation layer generation sub-module: Based on the structural response matching list, use a generative adversarial network to project the spatial index of the response coordinate group within the intracranial region structure label set and obtain position labels, generate a set of projection tiles for all coordinate points according to the label numbers, extract the segment numbers within the tiles corresponding to each label, establish a pairing list between the node numbers and the tile numbers, integrate the continuously numbered tile regions to generate a texture coordinate set, and generate an intraoperative controllable perturbation region layer.
[0010] As a further solution of the present invention, the regional correspondence table refers to an index data table that maps the spatial coordinates of the surgical operation path to the intracranial anatomical structure one by one in a virtual reality simulation environment. When the system recognizes that the surgical instrument has completed a path action in the virtual environment, each node of this path will be mapped to the corresponding anatomical region in the intracranial region. The regional correspondence table stores the association between the numbers of these path nodes and their corresponding anatomical region identifiers.
[0011] As a further solution of the present invention, the structure path mapping module includes: Orientation angle calculation sub-module: Based on the intraoperative controllable perturbation region layer, calculate the angle between the coordinates of the center point of the perturbation layer structure and the unit vector of the current view angle, extract the node numbers with an angle less than twenty degrees by comparing the three-dimensional direction component values, index the corresponding coordinate groups through the numbers to establish a screened number sequence, and generate a candidate structure number list; Path node screening sub-module: Based on the candidate structure number list, calculate the Euclidean distance between the node indexes of each number segment, extract the point pairs with the node number spacing not greater than two unit lengths, construct a number set through the point sequence with the spatial jump amount within the group number not exceeding the threshold, perform the start and end number sorting operation on the number set to generate a path arrangement, and generate a set of structure path number relationships; Structure connectivity generation sub-module: Based on the set of structure path number relationships, group and extract the arrangement values of the node coordinates in the Z-axis direction for each group of path numbers, classify the numbers with the difference in the arrangement values in the Z-axis direction not exceeding five units into the same layer group, merge the node coordinates within all path segments according to the hierarchical numbering and establish a number connection table, and generate a multi-level virtual structure connectivity sequence.
[0012] As a further solution of the present invention, the load area discrimination module includes: Number mapping processing sub-module: Based on the multi-level virtual structure connectivity sequence, extract the start and end numbers in the path number list and construct a path segment group in sequence, use the path segment index to screen the associated numbers in the texture map number sequence, and establish a number correspondence table between the path segment and the texture map event according to the number group, and generate a path number section mapping table; Texture map density extraction sub-module: Based on the path number section mapping table, divide the total value of the texture map operation quantity in each path segment number by the total number of path numbers to obtain the average texture map operation frequency, compare the average texture map operation frequency of the path segment with the set constant and screen the sequence segments with numbers greater than this value, summarize the number sequences to form a set index, and generate a high-operation number set of texture maps; Intervention segment recognition sub-module: Based on the high-operation number set of texture maps, perform coordinate value consistency judgment on each group of numbers in the set in the three-dimensional coordinate list and extract the points with the same numerical values, perform number combination and recording on the paragraphs with the index difference between each group of numbers not greater than three, establish an intervention structure paragraph set according to the combined numbers, and generate a high-intervention block set in surgical simulation.
[0013] As a further solution of the present invention, the operation rhythm rearrangement module includes: Rhythm number recombination sub-module: Based on the high-intervention block set in surgical simulation, combine the paragraphs with the interval not exceeding two number units in the path number group to generate a rhythm section, form a number index area table through the minimum and maximum numbers in each section, extract the corresponding time point sequence of the section and perform ascending sorting, and generate a set of rhythm section combined numbers; Path distance extraction sub-module: Based on the set of rhythm section combined numbers, calculate the difference between the three-dimensional coordinate points corresponding to the start number and the end number of each section and output the path distance, screen the ratio of each section path distance value to the number of nodes in the section, retain the section group numbers with the ratio less than five coordinate units and form an available paragraph index, and generate a rhythm section path distance table; Structural sequence output submodule: Based on the rhythm segment path spacing table, use each segment number to extract the index position of the corresponding node in the structural path, form a node index sequence, generate a structural serial number list and perform ascending order of the numbers, integrate and remove duplicates from all number lists and generate a complete rhythm structure arrangement, and generate a rearranged simulated surgery rhythm path table.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are: 1. In the present invention, the direction of the action trajectory is identified and spatially classified through an artificial neural network, the real operation intention is extracted more accurately and the structured action continuous segments are reconstructed, the configuration diversification of the simulation path is promoted, the high-variability risk points during the operation are effectively identified, and the dynamic displacement judgment and tissue disturbance synthesis method are combined to expand the spatial distribution range of the controllable interference variables in the scene.
[0015] 2. In the present invention, by establishing an angle screening mechanism between the viewing angle and the center line of the structure, the virtual structure is matched with the user's attention direction during the operation process, the initiative of spatial navigation and the pertinence of structural interaction are enhanced, the high operation load areas are effectively identified, and potential operation bottlenecks are identified in advance.
[0016] 3. In the present invention, by introducing the rhythm jump difference selection logic, the coordinated regulation of path continuity and rhythm diversity is achieved, and the connection bottleneck between spatial perception, rhythm control and interactive feedback is opened up, making the simulated surgical process more responsive, strategically rich and capable of mapping real behaviors. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a system flow chart of the present invention; Figure 2 Schematic diagram of the system framework of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0019] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by terms such as "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention. In addition, in the description of the present invention, the meaning of "a plurality of" is two or more, unless otherwise specifically defined.
[0020] Embodiment 1 Please refer to Figure 1 , the present invention provides a technical solution: A neurosurgical operation planning and teaching system based on virtual reality includes: Surgical procedure action construction module: Based on the virtual surgical field scene, surgical procedure action set, operator's perspective axis, and path segmentation points, using an artificial neural network to perform combined analysis of the attitude axis and action rotation values and distinguish directions. Through the virtual surgical field scene, extract the action continuity and classify the spatial action segments to generate a simulated surgical operation configuration cluster; Intraoperative variation simulation module: Based on the simulated surgical operation configuration cluster, retrieve the number of times the action segment contacts the boundary to extract the deformation parameter sequence, perform node - to - node distance correction and corresponding point mapping, and use a generative adversarial network to perform dynamic displacement judgment on the intracranial target area and synthesize tissue area perturbation to obtain the intraoperative controllable perturbation area layer; Structural pathway mapping module: Based on the intraoperative controllable perturbation area layer, establish the angle between the viewing direction and the structural center line and screen and compare, use three - dimensional space structure to divide the structural node mapping and pathway sequence to obtain a multi - level virtual structure connection sequence; Load area discrimination module: Based on the multi - level virtual structure connection sequence, extract the number mapping relationship to generate a structure sequence and set the window width, analyze the density of the texture rewrite value to determine the intervention density critical point, and obtain the high - intervention block set in the surgical simulation; Operation rhythm rearrangement module: Based on the high - intervention block set in the surgical simulation, extract the intervention layer sequence number to reconstruct the structural path sorting information and select the step - distance difference, construct a rhythm jump track to generate a combined structure mapping table, and obtain the rearranged simulated surgical rhythm path table.
[0021] Please refer to Figure 2 , the surgical procedure action construction module includes: Action sequence disassembling sub-module: Based on the virtual surgical field scene, surgical procedure action set, operator's perspective axis, and path segmentation points, arrange the time of the controller input values and screen out continuous operation periods. Establish a separation point sequence using the number of action amplitude changes and the action duration in seconds, mark the start and end position numbers within the sequence, output a list of time ranges and amplitude values for each segment, and generate an operation section positioning group; Rotation feature extraction sub-module: Based on the operation section positioning group, use an artificial neural network to stack and accumulate the rotation angles and attitude values within each segment of data to form a direction vector coordinate group. Calculate the magnitude of the direction change through numerical difference between adjacent coordinates and screen out the segments with a direction change rate greater than the threshold. Number and group the eligible segments to generate an attitude rotation direction sequence; Spatial section classification sub-module: Based on the attitude rotation direction sequence, calculate the angle between each segment's direction coordinate and the operator's current perspective axis and set an angle range screening interval. Screen and match the segments within the interval by number and extract the corresponding path index numbers. Merge all the segments with consecutive numbers to form an action path cluster and generate a simulated surgical operation configuration cluster; Action sequence disassembling sub-module: Based on the virtual surgical field scene, surgical procedure action set, operator's perspective axis, and path segmentation points, adopt a time series analysis algorithm. Use the Pandas and NumPy libraries to serialize the time stamps of the controller input values. Convert the time stamp data to a unified format and arrange it through pd.to_datetime for the collected time series data. Calculate the adjacent time differences using np.diff to mark continuous operation periods. Perform statistics on the number of action amplitude changes in the operation sequence using a sliding window method, with a window size of 10 time steps. Execute window aggregation processing through pd.Series.rolling, calculate the cumulative difference in action change amplitudes within each window, filter out amplitude fluctuation points through a threshold, traverse and mark the indexes with a change amplitude greater than the preset value using the enumerate function and record them. Mark the start and end position numbers within the sequence and store them in a list. Mark the start and end positions for each time segment, output a list of time ranges and amplitude values for each segment, pair and organize the time ranges and amplitude values using zip, and generate an operation section positioning group; Rotation Feature Extraction Sub-module: Based on the operation section positioning group, an artificial neural network is used to construct a multi-layer perceptron (MLP) using the PyTorch library. The size of the input layer is defined as the sum of the rotation angle and pose values within the operation section. The hidden layer includes two fully connected layers, and the ReLU activation function is selected. The output layer is a group of direction vector coordinates. The input data format is of the torch.Tensor type, and normalization processing is performed. Linear layers are created using torch.nn.Linear, and the network structure is arranged sequentially using torch.nn.Sequential. The rotation angles and pose values within each segment of data are superimposed and accumulated, and cumulative summation is performed through torch.cumsum to form a group of direction vector coordinates. The magnitude of the direction change is calculated by taking the numerical difference between adjacent coordinates, and the difference processing is performed using torch.diff. The absolute value of the difference is obtained through torch.abs. Paragraphs with a direction change rate greater than the specified threshold are screened. The threshold is set to 0.05, and the indices that meet the conditions are extracted using torch.nonzero. The paragraphs that meet the conditions are traversed and numbered and grouped, and the numbering process is performed using enumerate to generate a pose rotation direction sequence; Spatial Paragraph Classification Sub-module: Based on the pose rotation direction sequence, a spatial vector angle calculation method is used, and the spatial.distance.cosine function in the SciPy library is used to calculate the angle between each segment of direction coordinates and the operator's current viewing axis. The input parameters are the three-dimensional vectors of the direction coordinates and the operator's viewing axis, and the calculated values are stored in a list. An angle range screening interval is set, and the filter function is used to screen the calculation results. The cosine similarity in the interval range of [0, 0.5] is used to screen and extract the corresponding path index numbers by matching paragraphs through the numbers within the interval. The itertools.groupby function is used to judge the continuity of the screened numbers, and all paragraphs with continuous numbers are merged to form an action path cluster, and the aggregation process is performed using list.append to finally generate a simulated surgical operation configuration cluster.
[0022] Artificial neural network, according to the formula:
[0023] Where: is the pose rotation change angle between adjacent direction vectors, is the three-dimensional direction vector formed by the i-th segment of action data, is the three-dimensional direction vector formed by the (i + 1)-th segment of action data, is the vector dot product operator, is the vector is the modulus of the vector, is the vector is the modulus of the vector, is the inverse cosine function, is the weighted change value of the attitude rotation direction, is the weight coefficient of the dot product of the direction vectors, is the weight coefficient of the rotation angle difference, is the weight coefficient of the attitude rate change, is the weight coefficient of the time interval, is the cumulative rotation angle value of the i-th action segment, is the cumulative rotation angle value of the (i + 1)-th action segment, is the absolute difference of the rotation angles of adjacent two action segments, is the attitude change rate per unit time of the i-th segment, is the attitude change rate per unit time of the (i + 1)-th segment, is the absolute difference of the attitude rates of adjacent segments, is the time interval between the i-th segment and the (i + 1)-th segment, is a very small constant to prevent the denominator from being zero, is the index variable in the action segment sequence; Execution process: First, obtain the attitude angles and rotation angles of each action segment, and use this data to generate the corresponding three-dimensional direction vectors and , by calculating the dot product and the respective magnitudes of these two vectors, substituting them into the formula , to obtain the angle between adjacent paragraphs, which is used to reflect the instantaneous change amplitude of the action direction. In order to improve the detection sensitivity and the system's adaptability to complex action patterns, this angle change is combined with the difference in the cumulative rotation angles of adjacent segments, the change in the attitude rate per unit time, and the time interval between segments into the improved weight model, and integrated to generate . This value reflects the overall dynamic weight characteristics of the attitude change of the action segment. During execution, the weight parameters , , , need to be obtained through K-fold cross-validation of historical data and the method of minimizing the detection error. Finally, the weighted angle is used as the criterion to screen out the key paragraphs where the action rotation change exceeds the threshold, for identifying the key action patterns and attitude transition nodes during the operation.
[0024] Please refer to Figure 2, a path segmentation point refers to a position with significant changes in the action trajectory determined through the analysis of the number of action amplitude changes and the action duration during the continuous execution of an operation action. These changes are manifested as sudden mutations in the action direction, sharp changes in speed, and significant turns in the operation posture. As a marker for dividing different operation sections, the path segmentation point disassembles a continuous operation process into several relatively independent time segments.
[0025] Please refer to Figure 2 , the intraoperative variation simulation module includes: Contact feature extraction sub-module: Based on the simulated surgical operation configuration cluster, calculate the Euclidean distance between the end point coordinates of each action segment and the structural boundary points, extract the points with a distance less than the specified threshold, mark the number of contact occurrences in each action segment during the corresponding time period and arrange the numbered sequence, accumulate the contact event quantities for the action sequence according to the number, and output the association information between the points and the segment numbers to generate a boundary contact parameter set; Response structure matching sub-module: Based on the boundary contact parameter set, calculate the coordinate differences of the structural boundary points corresponding to each segment number and extract the index points with a coordinate change greater than the threshold. Reorder the points through the coordinate point numbers to form a structural number segment, group the paragraphs with a transformation distance greater than the specified value in the numbered segment and extract their original position indices, construct a regional correspondence table, and generate a structural response matching list; Perturbation layer generation sub-module: Based on the structural response matching list, use a generative adversarial network to project the spatial index of the response coordinate group within the intracranial region structure label set and obtain the position labels. Generate a set of projection tiles for all coordinate points according to the label numbers, extract the segment numbers within the tiles for each label and establish a pairing list between the node numbers and the tile numbers, integrate the continuously numbered tile regions to generate a texture coordinate set, and generate an intraoperative controllable perturbation region layer; Contact feature extraction sub-module: Based on the simulated surgical operation configuration clusters, using spatial geometric calculation methods, the Euclidean distances between the end-point coordinates of each action segment and the structural boundary points are calculated using the spatial.distance.cdist function of the SciPy library. The input parameters include the end-point coordinate array and the structural boundary point coordinate array. The calculation mode selects 'euclidean' to perform Euclidean distance measurement, generating a two-dimensional matrix representing the distances between each pair of coordinate points. The np.where function is used to filter the distance values in the matrix, with a specified threshold of 0.5 mm. The points with distances less than the threshold are selected, and the occurrence times of contact events are marked for the corresponding time periods. The pd.Series.value_counts is used to count the number of contacts within each action segment and arrange the numbered sequence. The pd.Series.sort_index is used to arrange the numbers in chronological order. The cumulative number of contact events for the action sequence is performed according to the numbers. The pd.DataFrame.groupby is used to perform grouped summation, outputting the association information between the points and the segment numbers. The zip function is used to pair and organize the points and the numbers, generating a boundary contact parameter set; Response structure matching sub-module: Based on the boundary contact parameter set, using spatial coordinate difference calculation methods, the np.subtract function of the NumPy library is used to perform difference operations on the structural boundary point coordinates corresponding to each segment number. The input parameters include the end-point coordinate array and the boundary point coordinate array in the boundary contact parameter set, performing element-wise coordinate difference calculations to generate a difference matrix. The np.abs is used to process the absolute values of the difference matrix. The np.where is used to filter out the index points with coordinate changes greater than the specified threshold, with the threshold set to 1.0 mm. The numbers of the extracted index points are re-sorted, and the np.argsort is used to perform ascending sorting on the numbered array to form a structural number segment. The np.diff is used to calculate the transformation distances between adjacent numbers, and the segments in the numbered segment with transformation distances greater than the specified value are grouped, with the specified value set to 2. The np.split is used to split the grouped segments and extract their original position indexes to construct a regional correspondence table. The pd.DataFrame is used to construct a mapping table to store the correspondence information between the path numbers and the spatial regions, generating a structural response matching list; Perturbation layer generation sub-module: Based on the structural response matching list, using the spatial index projection method, the np.dot function of the NumPy library is used to perform matrix mapping on the response coordinate group within the intracranial region structure label set. The input parameters include the response coordinate array and the index matrix of the regional structure label set. The matrix mapping calculation is performed to obtain the spatial index result. The np.where is used to screen the mapped result, and a projection tile set is generated for all coordinate points according to the label number. The unique numbers of all labels are extracted using np.unique, and the tiles within each label are processed in blocks. The np.split is used to group the segment numbers within the tiles, and a pairing list of node numbers and tile numbers is established. The mapping relationship is stored using pd.DataFrame, the tile regions with consecutive numbers are integrated, and the coordinate splicing is performed using np.concatenate to generate the texture coordinate set, and finally the intraoperative controllable perturbation region layer is generated.
[0026] The generative adversarial network, according to the formula:
[0027] Where: is the cumulative value of the weighted spatial projection error of the perturbation layer, is the X-axis position coordinate of the th coordinate point in three-dimensional space, is the th coordinate point in three-dimensional space, Y-axis position coordinate of the is the position vector function of the coordinate point output by the generative adversarial network module in the projection space, is the standard reference coordinate position function of the label number area in the label list, is the tile number within the perturbation layer, is the total number of tiles participating in the perturbation layer generation calculation, is the structural stability score of the tissue area contained in the th tile, is the th tile, structural complexity score of the is the discrete identification number of the tissue area corresponding to the geometric center point position of the region in the reference template coordinate system, is the norm of the tensor deformation field of the represents the cumulative summation operator, represents the numerical multiplication operator, Represents the Euclidean distance operator between vectors, Represents an ordered set of parameters formed by a combination of functions or variables, Represents the vector subtraction operation, Is the starting point of the constant index, Represents the square operation; Execution process: First, extract the spatial coordinate points of the area to be intervened from the preoperative image data and mark them as , and then calculate the structural stability of the tissue neighborhood where each point is located , this value is obtained based on the local gray mean and the change amplitude of the boundary gradient, and then use the local surface model to extract the morphological complexity index of the area , this index is constructed by fusing the curvature factor and the fractal dimension, and the five parameters are input into the trained generative adversarial network model together and passed through the function Output its projected coordinates in the label space, and at the same time the system searches for the standard label area corresponding to this tile, extracts the central position of this label in the reference space And calculate the norm of its deformation tensor , forming the target mapping point , the system further determines the confidence weight of each tile based on the structural matching stability and complexity level , this value is calculated by the scoring function through normalization transformation according to the stability threshold, and finally the system calculates the square of the Euclidean distance between the predicted projection of each tile and the target position and multiplies it by its weight, and then for all tiles are weighted and accumulated to obtain the total error value of the perturbation layer , when the error is the smallest, it is determined that the tile combination is the intraoperative virtual controllable intervention area, and this process can be visually presented in real time in the virtual reality environment and used for preoperative path planning and teaching demonstration.
[0028] Please refer to Figure 2 , the area correspondence table refers to the index data table that maps the spatial coordinates of the surgical operation path to the intracranial anatomical structure one by one in the virtual reality simulation environment. When the system recognizes that the surgical instrument has completed a path action in the virtual environment, each node of this path will be mapped to the corresponding intracranial anatomical area, and the area correspondence table associates and stores the numbers of these path nodes with their corresponding anatomical area identifiers.
[0029] Please refer to Figure 2 , the structure path mapping module includes: Orientation Angle Calculation Sub-module: Based on the intraoperative controllable perturbation area layer, calculate the angle between the coordinates of the center point of the perturbation layer structure and the unit vector of the current perspective. Use the three-dimensional direction component values to compare and extract the node numbers with an angle less than 20 degrees. Index the corresponding coordinate groups through the numbers and establish a screening number sequence to generate a candidate structure number list; Path Node Screening Sub-module: Based on the candidate structure number list, calculate the Euclidean distance between the node indices of each numbered segment and extract the point pairs with a node number spacing not greater than two unit lengths. Construct a number set through the point sequence with a spatial jump amount not exceeding the threshold within the same group of numbers. Perform the start and end number sorting operation on the number set to generate a path permutation and generate a structural path number relationship set; Structural Connectivity Generation Sub-module: Based on the structural path number relationship set, group and extract the arrangement values of the node coordinates in the Z-axis direction for each group of path numbers. Classify the numbers with a difference in the arrangement values in the Z-axis direction not exceeding five units into the same layer group. Merge the node coordinates within all path segments according to the hierarchical numbers and establish a number connection table to generate a multi-level virtual structure connectivity sequence; Orientation Angle Calculation Sub-module: Based on the intraoperative controllable perturbation area layer, adopt the three-dimensional vector angle calculation method. Use the np.dot function of the NumPy library to perform the dot product calculation on the coordinates of the center point of the perturbation layer structure and the unit vector of the current perspective. The input parameters include the three-dimensional coordinate array of the perturbation center point and the unit vector array of the current perspective. After performing the dot product operation, use the np.linalg.norm function to calculate the modulus lengths of the two vectors respectively. Use the np.arccos function to calculate the arccosine value after dividing the dot product result by the product of the modulus lengths. Use np.degrees to convert the radian value to an angle value to generate an angle list. Use the np.where function to screen all the angle values in the list. The threshold is set to 20 degrees. Extract the node numbers less than 20 degrees. Use pd.Series to serialize and store the numbers and establish a screening number sequence to generate a candidate structure number list; Path Node Screening Sub-module: Based on the candidate structure number list, using the Euclidean distance calculation method, the spatial.distance.cdist function of the SciPy library is used to perform Euclidean distance calculations on the three-dimensional spatial coordinates of each numbered segment node. The input parameters include the three-dimensional coordinate array of the nodes. The calculation mode selects 'euclidean' to perform Euclidean distance measurement, generating a two-dimensional matrix representing the spatial distances between nodes. The np.where function is used to screen the distance values in the matrix, specifying a threshold of 2 millimeters, screening out point pairs with a spacing not greater than two unit lengths, storing them in an array format, using np.split to perform block processing on adjacent numbers, and performing constraint determination through the spatial jump amount within the same group of numbers. The jump amount does not exceed the set threshold, and the threshold size is 5 millimeters. A number set is constructed for the screened point sequence, the set is used for deduplication processing, sorted is used to sort the numbers in the set, the start and end numbers of the number set are sorted to generate a path arrangement, and zip is used to combine the start and end points to generate a set of structure path number relationships; Structure Connectivity Generation Sub-module: Based on the set of structure path number relationships, using the coordinate sorting and hierarchical classification method, the np.argsort function of the NumPy library is used to sort the Z-axis values of the node coordinates in the path number set. The input parameter is the Z-axis component of the three-dimensional coordinate array, and the output is the sorted index array. The np.diff function is used to calculate the difference in Z values between adjacent nodes, generating a difference array. The np.where function is used to screen the difference array, setting a threshold of 5 units, screening out consecutive numbered segments with a Z value difference less than 5 units, using np.split to perform block processing on the numbers with changing differences, merging the node numbers of the same layer into an array, using np.concatenate to splice the node coordinates of the same layer, traversing and merging the node coordinates within all path segments according to the hierarchical numbering, storing the merged results using pd.DataFrame and establishing a number connection table, recording the mapping relationship for each layer of numbers, and generating a multi-level virtual structure connectivity sequence.
[0030] Please refer to Figure 2 , the load area discrimination module includes: Number Mapping Processing Sub-module: Based on the multi-level virtual structure connectivity sequence, extract the start and end numbers in the path number list and construct a path segment group in sequence. Use the path segment index to screen the associated numbers in the texture map number sequence, and establish a number correspondence table between the path segments and the texture map events according to the number group, generating a path number section mapping table; Texture density extraction sub-module: Based on the path number section mapping table, divide the total value of the texture mapping operations in each path segment number by the total number of path numbers to obtain the average texture mapping operation frequency. Compare the average texture mapping operation frequency of the path segment with a set constant and filter out the sequence segments with numbers greater than this value. Summarize the number sequences to form a set index and generate a set of high-operation numbers for texture mapping; Intervention segment identification sub-module: Based on the set of high-operation numbers for texture mapping, perform a coordinate value consistency judgment on each group of numbers in the set in the three-dimensional coordinate list and extract the points with the same numerical values. Combine the numbers for the paragraphs where the index difference between each group of numbers is no more than three and record them. Establish a set of intervention structure paragraphs according to the combined numbers and generate a set of high-intervention blocks in surgical simulation; Number mapping processing sub-module: Based on the multi-level virtual structure connection sequence, adopt the path number parsing method, and use np.array_split of the NumPy library to perform path segment splitting on the path number list. The input parameters include the path number array and the specified number of splits. The split array blocks are stored in a list format. Use pd.Series to serialize the path segment groups, and use the pd.merge function of the Pandas library to perform a left join on the path segment groups and the texture mapping number sequences. The specified key is the start and end numbers of the path segments. The merged result generates the correspondence between the path segments and the texture mapping events. Use pd.DataFrame to construct a number correspondence table, with the column names set as the path segment numbers and the texture mapping event numbers. Perform index rearrangement processing, and use pd.DataFrame.sort_values to sort the path segment numbers in ascending order. Finally, generate the path number section mapping table; Texture density extraction sub-module: Based on the path number section mapping table, adopt the data aggregation calculation method, and use the pd.DataFrame.groupby function of the Pandas library to group the path number sections. The input parameter is the path segment number column. Perform statistical calculations on the texture mapping operation quantities for each group of path segments. Use the pd.Series.sum function to obtain the total value of the texture mapping operations for each path segment. Then use the len function to count the total number of path numbers. Divide the total value of the texture mapping operations by the total number of path numbers to calculate the average texture mapping operation frequency. Use pd.Series.div to perform the division operation to obtain the average texture mapping operation frequency for each path segment. Use np.where to perform a conditional judgment on the average texture mapping operation frequency and the set constant 10, filter out the path segment numbers with an operation frequency greater than 10, use pd.Series.index to extract the path numbers that meet the conditions, perform unique storage processing and generate a set index, and finally generate a set of high-operation numbers for texture mapping; Intervention segment recognition sub-module: Based on the set of high-operation numbers of the texture map, using the coordinate value consistency judgment method, the np.isin function of the NumPy library is used to perform screening processing on each group of numbers in the set in the three-dimensional coordinate list. The input parameters include the set of high-operation numbers and the three-dimensional coordinate array. A boolean matching operation is performed on all the numbers in the set in the coordinate array, and the coordinate index corresponding to the number is returned. The np.where function is used to extract all the index numbers that meet the conditions. The np.diff function is used to calculate the difference of the index number array, and the input is the numerical difference of adjacent index numbers. The number paragraphs with an index difference not greater than 3 are screened out. The np.split function is used to perform grouping processing on the continuous number segments, and the input parameters are the number array and the split point index. The processed groups are stored in a list, and a number mapping structure is established. The pd.DataFrame is used to construct a mapping table and store the start and end positions of the combined numbers. Finally, the high-intervention block set in the surgical simulation is generated.
[0031] Please refer to Figure 2 , and the operation rhythm rearrangement module includes: Rhythm number recombination sub-module: Based on the high-intervention block set in the surgical simulation, paragraphs with an interval of no more than two number units in the combined path number group are combined to generate rhythm sections. The number index area table is formed by the minimum and maximum numbers in each section, and the time point sequence corresponding to the section is extracted and sorted in ascending order to generate the rhythm section combined number set; Path distance extraction sub-module: Based on the rhythm section combined number set, calculate the difference between the three-dimensional coordinate points corresponding to the start number and the end number of each section and output the path distance. Screen the ratio of the path distance value of each section to the number of nodes in the section, retain the section group numbers with a ratio less than five coordinate units and form the available paragraph index, and generate the rhythm section path distance table; Structure sequence output sub-module: Based on the rhythm section path distance table, use the numbers of each section to extract the index positions of the corresponding nodes in the structure path, form the node index sequence, generate the structure serial number list and perform ascending order arrangement of the numbers, perform integration and deduplication on all the number lists and generate the complete rhythm structure arrangement, and generate the rearranged simulated surgical rhythm path table; Rhythm Number Recombination Sub-module: Based on the high-intervention block set in surgical simulation, using the number merging and section generation method, the np.diff function of the NumPy library is used to perform difference calculation on the structure number array in the high-intervention block set. The input parameter is the number array, and the output is a list of differences between adjacent numbers. The np.where function is used to filter the indexes where the difference does not exceed two number units. The np.split function is used to split the continuous number paragraphs. The input parameters are the number array and the split indexes, generating a list of independent array segments. Each array segment in the list is traversed, and the min and max functions are used to find the minimum and maximum values of the numbers in the segment respectively, constructing the number index section. The pd.DataFrame is used to create a data table and set the column names as Min_Index and Max_Index. The pd.Series is used to extract the time point sequence corresponding to the section, perform ascending sorting of the time series, and use pd.Series.sort_values to sort the time points. Finally, a rhythm section combination number set is generated; Path Spacing Extraction Sub-module: Based on the rhythm section combination number set, using the Euclidean distance calculation method, the spatial.distance.cdist function of the SciPy library is used to perform path distance calculation on the three-dimensional coordinate points corresponding to the start number and end number of each section. The input parameters include the three-dimensional coordinate array and its own array, and the calculation mode selects euclidean to perform Euclidean distance measurement, generating a two-dimensional matrix representing the spatial distance between each node. The start number and end number of each path section are traversed, and the corresponding value in the two-dimensional matrix is used as the output result of the path distance. The len function is used to count the total number of nodes in the paragraph. The np.divide is used to divide the path distance by the number of nodes, generating a ratio list. The np.where is used to filter the ratio list, setting the condition that the ratio is less than 5 coordinate units, extracting the paragraph numbers that meet the conditions and storing them in an array. The pd.Index is used to perform deduplication and sorting on the array. Finally, a rhythm section path spacing table is generated; Structure sequence output sub-module: Based on the rhythm segment path spacing table, using the node index extraction and path integration method, read the content of the path spacing table with pd.DataFrame of the Pandas library, perform node position index extraction for each paragraph number, use pd.Series.loc to search the path table one by one and obtain the corresponding three-dimensional coordinate positions, store all the extracted node coordinates in a list, traverse the node indexes corresponding to all paragraph numbers and generate a structure sequence list, use pd.concat to perform vertical merging processing on all node lists, use pd.Series.unique to perform duplicate removal on the merged sequence list, use pd.Series.sort_values to sort the uniquified sequence list, and finally generate a rearranged simulated surgical rhythm path table.
[0032] The above are only the preferred embodiments of the present invention, and do not limit the present invention in other forms. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still belong to the protection scope of the technical solution of the present invention.
Claims
1. A virtual reality-based neurosurgical operation planning and teaching system, characterized in that Including: Surgical Procedure Action Construction Module: Based on the virtual surgical field scene, surgical procedure action set, operator's perspective axis, and path segmentation points, using an artificial neural network to perform combined analysis of the attitude axis and action rotation values and distinguish directions, through the virtual surgical field scene, extract action continuity and classify spatial action segments, and generate a cluster of simulated surgical operation configurations; Intraoperative Variation Simulation Module: Based on the cluster of simulated surgical operation configurations, retrieve the number of times of contact between action segments and boundaries to extract a sequence of deformation parameters, perform node - to - node distance correction and corresponding point comparison mapping, and use a generative adversarial network to perform dynamic displacement judgment and tissue region perturbation synthesis on the intracranial target area to obtain a layer of intraoperative controllable perturbation regions; Structural Path Mapping Module: Based on the layer of intraoperative controllable perturbation regions, establish and screen the angle between the perspective orientation and the structural center line, use three - dimensional space structure to divide structural node mapping and path sequences, and obtain a multi - level virtual structure connection sequence; Load Region Discrimination Module: Based on the multi - level virtual structure connection sequence, extract the number mapping relationship to generate a structural sequence and set the window width, analyze the density of the texture rewrite value to determine the intervention density critical point, and obtain a set of high - intervention blocks in the surgical simulation; Operation Rhythm Rearrangement Module: Based on the set of high - intervention blocks in the surgical simulation, extract the sequence numbers of the intervention layers to reconstruct the structural path sorting information and select the step - distance difference, construct a rhythm jump track to generate a combined structure mapping table, and obtain a rearranged simulated surgical rhythm path table.
2. The virtual reality-based neurosurgical operation planning and teaching system according to claim 1, wherein, The Surgical Procedure Action Construction Module includes: Action Sequence Decomposition Sub - module: Based on the virtual surgical field scene, surgical procedure action set, operator's perspective axis, and path segmentation points, arrange the time of the controller input values and screen for continuous operation periods, use the number of action amplitude changes and the action duration in seconds to establish a sequence of separation points, mark the start and end point position numbers within the sequence, output a list of time ranges and amplitude values for each segment, and generate an operation section positioning group; Rotation Feature Extraction Sub - module: Based on the operation section positioning group, use an artificial neural network to superimpose and accumulate the rotation angles and attitude values within each segment of data to form a group of direction vector coordinates, calculate the magnitude of the direction change through numerical difference between adjacent coordinates and screen for paragraphs with a direction change rate greater than the threshold, group the eligible paragraphs by number, and generate an attitude rotation direction sequence; Spatial Paragraph Classification Sub - module: Based on the attitude rotation direction sequence, calculate the angle between each segment's direction coordinate and the operator's current perspective axis and set an angle range screening interval, screen and match paragraphs within the interval by number and extract the corresponding path index numbers, merge all paragraphs with consecutive numbers to form an action path cluster, and generate a cluster of simulated surgical operation configurations.
3. The virtual reality-based neurosurgical operation planning and teaching system according to claim 2, wherein The path segmentation point refers to the position in the action trajectory where significant changes exist during the continuous execution of the operation action. These changes are manifested as sudden changes in action direction, sharp changes in speed, and significant turns in the operation attitude. The path segmentation point, as a marker for dividing different operation sections, disassembles a continuous operation process into several relatively independent time segments.
4. The virtual reality-based neurosurgical operation planning and teaching system according to claim 1, wherein The Intraoperative Variation Simulation Module includes: Contact feature extraction sub-module: Based on the simulated surgical operation configuration clusters, calculate the Euclidean distances between the end coordinates of each action segment and the structural boundary points, extract the points with distances less than the specified threshold, mark the number of contact occurrences within each action segment in the corresponding time period and arrange the numbered sequences, accumulate the number of contact events for the action sequences according to the numbers, output the association information between the points and the segment numbers, and generate a boundary contact parameter set; Response structure matching sub-module: Based on the boundary contact parameter set, calculate the coordinate differences of the structural boundary points corresponding to each segment number, extract the index points with coordinate changes greater than the threshold, reorder them according to the coordinate point numbers to form a structural number segment, group the segments with transformation distances greater than the specified magnitude in the number segment and extract their original position indices, construct a regional correspondence table, and generate a structural response matching list; Perturbation layer generation sub-module: Based on the structural response matching list, use a generative adversarial network to project the spatial indices of the response coordinate groups within the intracranial region structure label set and obtain position labels, generate a set of projection tiles for all coordinate points according to the label numbers, extract the segment numbers within the tiles for each label and establish a pairing list of node numbers and tile numbers, integrate the continuously numbered tile regions to generate a texture coordinate set, and generate an intraoperative controllable perturbation region layer; 5. The virtual reality neurosurgical operation planning and teaching system according to claim 4, characterized in that, The regional correspondence table refers to an index data table that maps the spatial coordinates of the surgical operation path to the intracranial anatomical structures one by one in a virtual reality simulation environment. When the system recognizes that the surgical instrument has completed a path action in the virtual environment, each node of this path will be mapped to the corresponding intracranial anatomical region, and the regional correspondence table associates and stores the numbers of these path nodes with their corresponding anatomical region identifiers.
6. The virtual reality-based neurosurgical operation planning and teaching system according to claim 1, wherein, The structural path mapping module includes: Orientation angle calculation sub-module: Based on the intraoperative controllable perturbation region layer, calculate the angle between the coordinates of the center point of the perturbation layer structure and the unit vector of the current view angle, use the three-dimensional direction component values to compare and extract the node numbers with angles less than twenty degrees, index the corresponding coordinate groups through the numbers and establish a filtered number sequence, and generate a candidate structure number list; Path node screening sub-module: Based on the candidate structure number list, calculate the Euclidean distances between the node indices of each number segment, extract the point pairs with node number spacings not greater than two unit lengths, construct a number set through the point sequences with spatial jump amounts not exceeding the threshold within the same group of numbers, perform a start and end number sorting operation on the number set to generate a path arrangement, and generate a structural path number relationship set; Structural connectivity generation sub-module: Based on the structural path number relationship set, group and extract the arrangement values of the node coordinates in the Z-axis direction for each group of path numbers, classify the numbers with Z-axis direction arrangement value differences not exceeding five units into the same layer group, merge the node coordinates within all path segments according to the hierarchical numbers and establish a number connection table, and generate a multi-level virtual structural connectivity sequence; 7. The virtual reality-based neurosurgical operation planning and teaching system according to claim 1, characterized in that, The load area discrimination module includes: Number mapping processing sub-module: Based on the multi-level virtual structure connection sequence, extract the start and end numbers in the path number list and sequentially construct a path segment group. Use the path segment index to screen for associated numbers in the texture map number sequence, and establish a number correspondence table between the path segment and the texture map event according to the number group, generating a path number section mapping table; Texture map density extraction sub-module: Based on the path number section mapping table, divide the total value of the texture map operations in each path segment number by the total number of path numbers to obtain the average texture map operation frequency. Compare the average texture map operation frequency of the path segment with a set constant and screen for sequence segments with numbers greater than this value. Summarize the number sequences to form a set index, generating a high texture map operation number set; Intervention segment recognition sub-module: Based on the high texture map operation number set, perform coordinate value consistency judgment on each group of numbers in the set in the three-dimensional coordinate list and extract the points with the same numerical values. Combine and record the numbers for paragraphs where the index difference between each group of numbers is no more than three. Establish an intervention structure paragraph set according to the combined numbers, generating a high intervention block set in the surgical simulation.
8. The virtual reality-based neurosurgical operation planning and teaching system according to claim 1, wherein The operation rhythm rearrangement module includes: Rhythm number recombination sub-module: Based on the high intervention block set in the surgical simulation, combine paragraphs with an interval of no more than two number units in the path number group to generate a rhythm section. Use the minimum and maximum numbers in each section to form a number index area table, extract the corresponding time point sequence of the section and arrange it in ascending order, generating a rhythm section combined number set; Path distance extraction sub-module: Based on the rhythm section combined number set, calculate the difference between the three-dimensional coordinate points corresponding to the start and end numbers of each section and output the path distance. Screen the ratio of each section's path distance value to the number of nodes in the section, retain the section group numbers with a ratio less than five coordinate units and form an available paragraph index, generating a rhythm section path distance table; Structure sequence output sub-module: Based on the rhythm section path distance table, use the numbers of each section to extract the index positions of the corresponding nodes in the structure path, form a node index sequence, generate a structure serial number list and perform ascending order arrangement of the numbers. Integrate and de-duplicate all number lists to generate a complete rhythm structure arrangement, generating a rearranged simulated surgical rhythm path table.
Citation Information
Patent Citations
Neurosurgery control system and method based on virtual reality
CN109758229A
Virtual operation analogue simulation method and system based on mixed reality technology
CN119830610A
Live surgical aid for brain tumor resection using augmented reality and deep learning
US20240265645A1
Method, medical training device, and system for generating dynamic virtual representations for medical training
WO2024127342A1