Brain-computer interface electrode positioning method and device, storage medium and electronic device

CN122842852APending Publication Date: 2026-09-29SHANGHAI NUOYAO ZHIGUANG TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611292297.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]本申请的目的在于提供一种脑机接口电极的定位方法、装置、存储介质及电子设备,以解决现有技术中脑机接口电极植入方法存在的电极易定位不准、需多次实验验证,难以有效保证通道覆盖率的技术问题

Benefits of technology

[0046]本申请的定位方法通过近红外荧光成像技术结合数字频域解调,能够在术中实时生成功能响应热区,使术者能够在电极贴合前直观地判断目标功能脑区的空间位置与范围,从而显著降低定位的盲目性与试错成本,提高有效通道占比、信号质量与后续解码准确率;对于开硬膜穿刺场景,进一步通过血管分布图与综合风险图实现功能靶向与血管安全的联合决策,有效提升穿刺植入的安全性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122842852A_ABST
    Figure CN122842852A_ABST
Patent Text Reader

Abstract

The application discloses a positioning method and device of a brain-computer interface electrode, a storage medium and an electronic device. The positioning method comprises the following steps: acquiring a continuous near-infrared fluorescence image frame sequence of a target operation area, and preprocessing; determining a baseline fluorescence intensity based on an image frame in a steady state stage, calculating a relative fluorescence change rate, and obtaining a fluorescence change time sequence matrix; determining a target response frequency based on the period of a stimulation signal of a neural evoked event, generating an in-phase reference vector and a quadrature reference vector; extracting a response parameter from the fluorescence change time sequence matrix; determining a response score, generating a functional response hot zone; and determining a positioning point of the brain-computer interface electrode. The application generates a functional response hot zone in real time during an operation by combining a near-infrared fluorescence imaging technology with digital frequency domain demodulation, significantly reduces the blindness and trial-and-error cost of positioning, and improves the effective channel proportion, signal quality and subsequent decoding accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of brain-computer interface implantation technology, specifically relating to a method, device, storage medium, and electronic device for positioning brain-computer interface electrodes. Background Technology

[0002] The core objective of brain-computer interfaces (BCIs) is to establish a direct information exchange channel between the human brain and external devices. Based on the degree of contact between the electrodes and brain tissue and the depth of surgical intrusion, BCIs can be broadly classified into non-invasive, semi-invasive, and invasive types. Semi-invasive BCIs place electrodes directly onto the epidural surface, allowing for the acquisition of cortical electrical signals without damaging the integrity of the dura mater, offering advantages in both signal quality and surgical safety. Invasive BCIs, on the other hand, implant flexible microelectrodes, microelectrode threads, or deep electrodes into the brain tissue to obtain neural signals with higher spatial resolution and a higher signal-to-noise ratio.

[0003] In electrode placement scenarios without opening the dura mater, the electrodes are directly attached to the outer surface of the dura mater without penetrating it. The optical scattering and occlusion effects of the dura mater prevent surgeons from directly observing the course of cortical vessels and the distribution of functional areas beneath the dura mater. Simultaneously, because the dura mater is not opened, the functional status of the cortex cannot be confirmed intraoperatively through direct visualization or contact. Current techniques primarily rely on preoperative imaging (such as MRI and fMRI) for target area planning; however, changes in intracranial pressure and cerebrospinal fluid loss after craniotomy lead to significant intraoperative brain drift, causing a shift between the preoperative image and the actual intraoperative cortical location, resulting in misalignment of the electrode placement position with the target functional area.

[0004] In electrode placement and puncture scenarios with the dura mater open, although the cortical surface can be directly observed, it is difficult to distinguish between functionally active and quiescent areas with the naked eye. Preoperative imaging or intraoperative electrophysiological recording is still required for localization. Brain drift issues also exist, and intraoperative electrophysiological recording requires repeated trials and point-by-point verification, a process that is trial-and-error-based, prolonging the operation time and making it difficult to guarantee effective channel coverage. Especially in puncture scenarios, the electrodes need to penetrate into the brain parenchyma, further increasing the difficulty of localization. The arteries and veins distributed on the cortical surface become a direct puncture risk source; accidental damage to blood vessels may lead to serious complications such as intracranial hemorrhage and cortical ischemia. Summary of the Invention

[0005] The purpose of this application is to provide a method, device, storage medium and electronic device for positioning brain-computer interface electrodes, so as to solve the technical problems of inaccurate electrode positioning, the need for multiple experimental verifications and the difficulty in effectively ensuring channel coverage in the existing brain-computer interface electrode implantation methods.

[0006] To achieve the above objectives, the first aspect of this application provides a method for locating brain-computer interface electrodes, comprising:

[0007] A continuous near-infrared fluorescence image frame sequence of the target surgical area is acquired and preprocessed. The temporal sequence of the continuous near-infrared fluorescence image frame sequence covers at least the steady-state phase before the application of the neural evoked event and the execution phase during the application of the neural evoked event.

[0008] Based on the image frame sequence in the steady state phase, the baseline fluorescence intensity at each moment in the execution phase is determined, and based on the baseline fluorescence intensity, the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence is calculated to obtain the fluorescence change time series matrix.

[0009] Based on the period of the stimulation signal of the neural evoked event, the target response frequency is determined, and the response parameters are extracted from the fluorescence change time series matrix by combining the image acquisition time series of the continuous near-infrared fluorescence image frame sequence. The response parameters are used to describe the blood perfusion response characteristics of each pixel under the action of the neural evoked event.

[0010] Based on the response parameters, a response score for each pixel is determined, and a functional response hotspot is generated based on the response score.

[0011] Based on the functional response hot zone, the positioning points of the brain-computer interface electrodes are determined.

[0012] In one or more embodiments, the step of preprocessing the continuous near-infrared fluorescence image frame sequence includes: sequentially performing background subtraction, brightness normalization, motion correction, spatial denoising, and blood vessel enhancement processing on the continuous near-infrared fluorescence image frame sequence.

[0013] In one or more embodiments, the step of determining the baseline fluorescence intensity at each moment in the execution phase based on the image frame sequence under the steady-state phase includes: calculating the average fluorescence intensity of each image frame under the steady-state phase, fitting an average fluorescence intensity change curve; and predicting the baseline fluorescence intensity at each moment in the execution phase based on the average fluorescence intensity change curve.

[0014] In one or more embodiments, the step of calculating the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence is specifically expressed by the following formula:

[0015] ;

[0016] In the formula, The baseline fluorescence intensity at time t is represented by the value of t. For the pixels in the continuous near-infrared fluorescence image frame sequence The fluorescence intensity at time t, Represents pixels The rate of change of relative fluorescence at time t.

[0017] In one or more embodiments, the step of extracting the response parameters from the fluorescence change time series matrix includes:

[0018] Based on the target response frequency and the acquisition time points corresponding to each image frame, an in-phase reference sequence and an orthogonal reference sequence corresponding to the target response frequency are generated respectively; the in-phase reference sequence and the orthogonal reference sequence are normalized to obtain the in-phase reference vector and the orthogonal reference vector required for digital frequency domain demodulation, wherein the in-phase reference vector and the orthogonal reference vector have a 90° phase difference; based on the in-phase reference vector and the orthogonal reference vector, the response parameters are extracted from the fluorescence change time series matrix.

[0019] In one or more embodiments, the step of extracting response parameters from the fluorescence change time series matrix based on the in-phase reference vector and the orthogonal reference vector includes: performing a matrix inner product operation on the fluorescence change time series matrix and the in-phase reference vector to obtain an in-phase response vector, wherein the in-phase response vector is used to describe the in-phase response value of each pixel; performing a matrix inner product operation on the fluorescence change time series matrix and the orthogonal reference vector to obtain an orthogonal response vector, wherein the orthogonal response vector is used to describe the orthogonal response value of each pixel; and calculating the response amplitude and response phase based on the in-phase response value and orthogonal response value corresponding to each pixel to obtain the response parameters.

[0020] In one or more embodiments, the step of determining the response score of each pixel based on the response parameters includes: dividing the fluorescence change time series matrix into multiple periodic sub-matrices according to the periodic boundaries of the neural evoked event; calculating the response amplitude and response phase of each pixel in each periodic sub-matrix, and calculating the periodic response consistency based on the amplitude dispersion and phase dispersion of each pixel in multiple periods; extracting adjacent frequency components on both sides of the target response frequency and located outside the preset guard band, and calculating the adjacent frequency noise features of each pixel; and performing a weighted calculation based on the ratio of the response amplitude to the adjacent frequency noise features and in combination with the periodic response consistency to obtain the response score of each pixel.

[0021] In one or more embodiments, the step of generating a functional response hotspot based on the response score includes: selecting background pixels from a preset background region or a low response score region to construct a background score sequence; calculating the median and dispersion of the background score sequence to obtain background noise statistical parameters; determining a response judgment threshold based on the background noise statistical parameters and a preset threshold coefficient; identifying pixels with a response score greater than or equal to the response judgment threshold as response pixels, and marking continuous response pixel regions as the functional response hotspot.

[0022] In one or more embodiments, the step of determining the positioning point of the brain-computer interface electrode based on the functional response hot zone includes: using pixels within the functional response hot zone as candidate bonding positioning points for the brain-computer interface electrode.

[0023] In one or more embodiments, the continuous near-infrared fluorescence image frame sequence is acquired after the dura mater of the target surgical area is opened and the cortex is exposed, and the localization method further includes:

[0024] Based on the continuous near-infrared fluorescence image frame sequence, a vascular distribution map is generated, and the vascular proximity risk of each pixel is calculated. The vascular distribution map includes the vascular region probability of each pixel. The step of determining the positioning point of the brain-computer interface electrode based on the functional response hot zone further includes: calculating the functional loss risk of each pixel based on the functional response hot zone; generating a comprehensive risk map based on the vascular distribution map, the vascular proximity risk, and the functional loss risk; and determining candidate puncture positioning points for the brain-computer interface electrode based on the comprehensive risk map.

[0025] In one or more embodiments, the step of generating a blood vessel distribution map based on the continuous near-infrared fluorescence image frame sequence includes: performing blood vessel identification on the continuous near-infrared fluorescence image frame sequence based on a pre-trained deep learning segmentation model to generate the blood vessel distribution map;

[0026] The method for calculating the blood vessel proximity risk includes: determining the boundary of the blood vessel region based on the blood vessel distribution map; taking the maximum value of the blood vessel proximity risk of pixels located in the blood vessel region; and the blood vessel proximity risk of pixels located outside the blood vessel region is inversely proportional to the minimum distance to the boundary of the blood vessel region.

[0027] In one or more embodiments, the step of calculating the functional loss risk of each pixel includes:

[0028] The functional loss risk of pixels located within the functional response hot zone is minimized; the functional loss risk of pixels located outside the functional response hot zone is positively correlated with their minimum distance to the boundary of the functional response hot zone.

[0029] In one or more embodiments, the method for generating the comprehensive risk map includes:

[0030] For each pixel, the probability of the corresponding blood vessel region, the risk of blood vessel proximity, and the risk of functional loss are weighted and averaged to obtain the comprehensive risk value of the pixel; a comprehensive risk map is generated based on the comprehensive risk value of each pixel.

[0031] In one or more embodiments, the step of determining candidate puncture sites for brain-computer interface electrodes includes:

[0032] Traverse all pixels in the comprehensive risk map, filter pixels whose comprehensive risk value is less than a preset risk threshold, and collect them into a set to obtain a pixel set; remove pixels located outside the functional response hot zone from the pixel set, and remove pixels whose blood vessel approach risk is greater than a preset blood vessel approach risk threshold to obtain candidate puncture positioning points.

[0033] In one or more embodiments, it further includes:

[0034] Based on the candidate puncture location points, multiple candidate puncture paths are generated, with each candidate puncture path starting from a candidate puncture location point. The risk cost of each candidate puncture path is calculated, and the path with the lowest risk cost is selected as the target path for output.

[0035] In one or more embodiments, the step of calculating the risk cost of each of the candidate puncture paths includes:

[0036] Discrete sampling is performed on the candidate puncture path, and several sampling points are extracted along the path; the blood vessel proximity risk and the functional loss risk corresponding to each sampling point are read respectively, and the blood vessel proximity cost and functional loss cost are obtained by accumulating and integrating along the path; the path length cost is determined based on the total length of the candidate puncture path; the path accessibility cost is determined based on the needle insertion angle of the candidate puncture path; the weighted average of the blood vessel proximity cost, functional loss cost, path length cost, and path accessibility cost is calculated to obtain the risk cost of the candidate puncture path.

[0037] To achieve the above objectives, a second aspect of this application provides a positioning device for brain-computer interface electrodes, comprising:

[0038] The preprocessing module is used to acquire a continuous near-infrared fluorescence image frame sequence of the target surgical area and perform preprocessing. The temporal sequence of the continuous near-infrared fluorescence image frame sequence covers at least the steady-state phase before the application of the neural evoked event and the execution phase during the application of the neural evoked event.

[0039] The fluorescence time series analysis module is used to determine the baseline fluorescence intensity at each moment in the execution phase based on the image frame sequence under the steady state phase, and to calculate the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence based on the baseline fluorescence intensity, so as to obtain the fluorescence change time series matrix.

[0040] The frequency domain extraction module is used to determine the target response frequency based on the period of the stimulation signal of the neural evoked event, and to extract response parameters from the fluorescence change time series matrix by combining the image acquisition time series of the continuous near-infrared fluorescence image frame sequence. The response parameters are used to describe the blood perfusion response characteristics of each pixel under the action of the neural evoked event.

[0041] The response area division module is used to determine the response score of each pixel based on the response parameters, and to generate a functional response hot zone based on the response score.

[0042] The positioning module is used to determine the positioning points of the brain-computer interface electrodes based on the functional response hot zone.

[0043] To achieve the above objectives, a third aspect of this application provides an electronic device, comprising: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform a brain-computer interface electrode positioning method as described in any of the above embodiments.

[0044] To achieve the above objectives, a fourth aspect of this application provides a machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the brain-computer interface electrode positioning method as described in any of the above embodiments.

[0045] The advantages of this application, which differ from existing technologies, are:

[0046] The localization method of this application, through near-infrared fluorescence imaging technology combined with digital frequency domain demodulation, can generate functional response heat zones in real time during the operation. This allows the surgeon to intuitively judge the spatial location and range of the target functional brain region before electrode placement, thereby significantly reducing the blindness and trial-and-error costs of localization, and improving the effective channel ratio, signal quality and subsequent decoding accuracy. For open dural puncture scenarios, the method further enables joint decision-making on functional targeting and vascular safety through vascular distribution maps and comprehensive risk maps, effectively improving the safety of puncture implantation.

[0047] In the positioning method algorithm of this application, the closer the pixel is to the functional response hot zone, the lower the risk of functional loss. When performing comprehensive risk fusion and site selection, the functional hot zone is automatically reserved first, guiding the electrode implantation site to target the core area of ​​neural activity, which greatly improves the signal-to-noise ratio and effective channel ratio of the neural signals collected by the electrode, and optimizes the signal decoding accuracy and communication effect of the brain-computer interface.

[0048] The positioning method of this application can achieve functional response hot zone division through peripheral stimulation and other neural evoked events, reducing the dependence on the patient's active cooperation, providing more direct visual guidance and verification basis during electrode placement, enabling the surgeon to determine the target area and safe path more quickly, reducing repeated attempts and ineffective adjustments, and expanding the applicability of brain-computer interface electrode implantation technology. Attached Figure Description

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

[0050] Figure 1 This is a flowchart illustrating one embodiment of the method for positioning the adhesive brain-computer interface electrode of this application.

[0051] Figure 2 This is a schematic diagram of the functional response thermal zone of the adhesive brain-computer interface electrode of this application;

[0052] Figure 3 This is a flowchart illustrating one embodiment of the positioning method for the puncture-type brain-computer interface electrode of this application.

[0053] Figure 4 This is a schematic diagram of the functional response thermal zone of the puncture-type brain-computer interface electrode of this application;

[0054] Figure 5 yes Figure 3 A flowchart illustrating one embodiment of S600b;

[0055] Figure 6 yes Figure 3 A flowchart illustrating one embodiment of S800b;

[0056] Figure 7 This is a schematic diagram of one embodiment of the positioning device for the brain-computer interface electrode of this application;

[0057] Figure 8 This is a schematic diagram of one embodiment of the electronic device of this application. Detailed Implementation

[0058] To enable those skilled in the art to better understand the technical solutions in this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.

[0059] This application provides a brain-computer interface electrode localization method, which acquires near-infrared fluorescence time-series images covering the complete neural evoked cycle during surgery, extracts the neurovascular coupling response with the same frequency as the stimulation frequency through digital frequency domain demodulation, and generates a functional response hot zone in real time; on this basis, according to different surgical scenarios, safety constraints such as vascular distribution are further superimposed to achieve quantitative decision-making throughout the entire process from functional localization to safe implantation.

[0060] Specifically, the method of this application can be applied to the following three types of surgical scenarios: Scenario 1, without opening the dura mater, the dura mater remains intact, and the electrode is attached to the outer surface of the dura mater; Scenario 2, with opening the dura mater, after the dura mater is opened and the cortex is exposed, the electrode is directly attached to the surface of the cortex; Scenario 3, with opening the dura mater and puncturing the dura mater, after the dura mater is opened and the cortex is exposed, the electrode is punctured into the brain parenchyma.

[0061] Scenario 1 and Scenario 2 are both electrode bonding modes, the core requirement of which is to determine the optimal bonding position of the electrode to ensure signal quality; Scenario 3 is an electrode puncture mode, which, in addition to functional targeting, also requires avoiding vascular damage.

[0062] The following section first introduces the positioning method for the electrode bonding modes applicable to scenarios one and two above. Please refer to [link / reference]. Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the method for positioning the adhesive brain-computer interface electrode of this application.

[0063] like Figure 1 As shown, the method includes:

[0064] S100a: Acquire a continuous near-infrared fluorescence image frame sequence of the target surgical area and perform preprocessing.

[0065] Among them, the temporal sequence of continuous near-infrared fluorescence image frames in the target surgical area at least covers the steady-state phase before the application of the neural evoked event and the execution phase during the application of the neural evoked event.

[0066] In one embodiment, the timing of the continuous near-infrared fluorescence image frame sequence can also cover the recovery phase after the application of the neural evoked event, so as to ensure that the execution phase of the neural evoked event is completely covered by the timing of the continuous near-infrared fluorescence image frame sequence.

[0067] It is important to note that the timing of image acquisition mentioned above is not simply a matter of recording the surgical procedure, but rather a necessary technical condition determined by the physical mechanisms of near-infrared fluorescence imaging and the physiological constraints of intraoperative functional localization. In scenarios where the dura mater is intact and not opened, the excitation light must penetrate the fenestration area of ​​the skull and the dura mater to reach the cortex, resulting in significant tissue scattering and absorption in the light path. In scenarios where the dura mater is opened, the excitation light directly illuminates the cortex, resulting in a higher optical signal-to-noise ratio. However, regardless of the scenario, continuous neural evoked event stimulation and optical imaging can only be implemented under conditions of stable surgical field exposure. This ensures the temporal integrity of the steady-state, execution, and recovery phases, thereby guaranteeing the reliability of the phase reference for subsequent frequency domain demodulation.

[0068] Specifically, this application acquires intraoperative near-infrared fluorescence images covering the entire cycle of neurogenic events. The near-infrared fluorescence images can be acquired after contrast administration to improve fluorescence intensity. The contrast agent can be ICG, a commonly used near-infrared contrast agent in the field. The excitation wavelength can be set to 740nm to 810nm, preferably 780nm to 810nm; the emission acquisition band can be set to 800nm ​​to 1700nm, preferably 1000nm to 1700nm; the camera frame rate can be set to 1 frame / second to 200 frames / second, preferably 10 frames / second to 100 frames / second; the spatial resolution can be set to 1.5μm to 150μm, preferably 10μm to 100μm; and the imaging field of view can be set to 1mm×1mm to 100mm×100mm, preferably 10mm×10mm to 50mm×50mm.

[0069] The near-infrared excitation light output power can be set to 0.1 mW / cm². 2 Up to 500mW / cm 2 The preferred value is 1mW / cm 2 Up to 100mW / cm 2 The exposure time can be set from 0.1ms to 1000ms, preferably from 10ms to 100ms. The system should have an upper limit on optical power, an upper limit on exposure time, and over-temperature protection to avoid over-irradiation of tissue.

[0070] During image acquisition, neural evoked events can be applied to the patient to fully capture the dynamic process of neurovascular coupling. These neural evoked events can be external stimuli or active tasks performed by the patient. For example, target brain regions can be activated through peripheral nerve electrical stimulation, somatic sensory stimulation, or passive movement to trigger neurovascular coupling responses in the corresponding functional areas.

[0071] Furthermore, the acquired continuous near-infrared fluorescence image frame sequence can be preprocessed to eliminate image quality degradation caused by ambient light interference, light source intensity fluctuations, brain tissue micro-motion, and random noise during the imaging process, providing a stable and reliable data foundation for subsequent vascular structure segmentation and neurovascular coupling response analysis.

[0072] Specifically, in one implementation, the preprocessing step can be as follows:

[0073] First, background subtraction is performed. In one implementation, a dark-field background image can be acquired before imaging with the excitation light off, and the dark-field grayscale value can be subtracted pixel by pixel from the original fluorescence image to eliminate fixed offsets caused by camera dark current, readout noise and ambient stray light.

[0074] Next, brightness normalization is performed to eliminate brightness fluctuations across the entire field of view caused by overall concentration changes, light source power drift, and fine-tuning of exposure parameters during contrast agent cycling, ensuring a uniform quantitative benchmark for inter-frame fluorescence intensity. In one implementation, global mean normalization can be used, that is, using the global average fluorescence intensity of each frame as a benchmark, uniformly mapping the global mean of all frames to the same reference brightness to achieve inter-frame brightness correction.

[0075] Motion correction is then performed to compensate for overall surgical field shifts and local deformations caused by respiration, heartbeat, brain tissue drift, and surgical traction, thus preventing motion artifacts from interfering with subsequent temporal analysis and vessel segmentation. In one implementation, dense optical flow can be used to calculate the pixel-level displacement field between adjacent frames, and spatial resampling and registration can be performed on each frame image to achieve sub-pixel-level motion compensation.

[0076] Based on this, spatial denoising is performed to suppress random noise and shot noise in the imaging system while preserving key details such as blood vessel edges and functional responses, thereby improving the image signal-to-noise ratio. In one implementation, a nonlocal mean filtering algorithm can be used, which utilizes the grayscale information of similar structural blocks in the image for weighted averaging, which can suppress noise while better preserving blood vessel edges and texture details.

[0077] Finally, vascular enhancement is performed. A targeted filtering algorithm is used to enhance the contrast of tubular vascular structures, highlighting regions with high fluorescence intensity and suppressing background tissue signals to improve the accuracy of subsequent vascular segmentation and recognition. In one implementation, a multi-scale Frangi filtering algorithm can be used. Based on the eigenvalues ​​of the Hessian matrix, the morphological characteristics of the tubular structures are analyzed, and vascular structures are detected at multiple scales, outputting enhanced response maps.

[0078] S200a. Based on the image frame sequence in the steady-state phase, determine the baseline fluorescence intensity at each moment in the execution phase, and based on the baseline fluorescence intensity, calculate the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence to obtain the fluorescence change time sequence matrix.

[0079] Vascular structure identification provides static safety constraints, while the dynamic response of neurovascular coupling is the core basis for functional localization. To accurately quantify the changes in local blood perfusion caused by neuroevoked events, it is necessary to first establish a steady-state baseline fluorescence intensity, and then eliminate the influence of individual differences and baseline perfusion heterogeneity through relative change rates.

[0080] Specifically, methods for determining baseline fluorescence intensity may include:

[0081] The average fluorescence intensity of each image frame during the steady-state phase is calculated, and the average fluorescence intensity variation curve is fitted. Based on the average fluorescence intensity variation curve, the baseline fluorescence intensity at each time point during the execution phase is predicted. .

[0082] For example, polynomial fitting can be used to extrapolate and predict the baseline values ​​at each time point in the execution phase based on the slow change trend of fluorescence intensity caused by contrast agent metabolism during the steady-state phase, so as to eliminate the influence of baseline drift during image acquisition.

[0083] Based on this, using the baseline fluorescence intensity as a benchmark, the relative fluorescence change rate of each pixel in the continuous image sequence at each time step is calculated using the following formula:

[0084] ;

[0085] In the formula, Represents the baseline fluorescence intensity at time t. Pixels in a continuous near-infrared fluorescence image frame sequence The fluorescence intensity at time t, Represents pixels The rate of change of relative fluorescence at time t.

[0086] Based on the relative fluorescence change rate of each pixel in each time frame of a continuous image, the fluorescence change time series matrix of that pixel can be obtained.

[0087] The aforementioned relative rate of change eliminates the absolute intensity differences caused by factors such as contrast agent concentration and tissue optical properties, and can truly reflect the relative change amplitude of local blood perfusion. Positive values ​​represent enhanced perfusion, and negative values ​​represent weakened perfusion. It is the core indicator for neurovascular coupling function analysis.

[0088] S300a: Based on the period of the stimulus signal of the neural evoked event, the target response frequency is determined, and the response parameters are extracted from the fluorescence change time series matrix by combining the image acquisition time series of continuous near-infrared fluorescence image frame sequences.

[0089] After obtaining the fluorescence change time series matrix, this application introduces a digital frequency domain demodulation method to extract response parameters from the fluorescence change time series matrix to distinguish the true functional response from random noise and motion artifacts, thereby quantifying the functional response intensity of each pixel. The response parameters are used to describe the blood perfusion response characteristics of each pixel under the influence of neurally evoked events.

[0090] Specifically, the target response frequency is first determined based on the periodicity of the stimulus signal from the neurally evoked event. For example, if peripheral nerve electrical stimulation is used, with stimulation lasting 1 second and intervals of 9 seconds, the stimulation period is 10 seconds, and the target response frequency is... The frequency is 0.1 Hz; if passive motion induction is used, and the motion period is 5 seconds, then the target response frequency is... It is 0.2Hz.

[0091] Subsequently, in-phase and orthogonal reference vectors are generated by combining the image acquisition time series of continuous near-infrared fluorescence image frame sequences. Let the acquisition frame rate be... The acquisition time of the nth frame is Then the elements of the in-phase reference sequence are: The elements of the orthogonal reference sequence are ;

[0092] The two sequences are normalized to make the vector magnitude 1, resulting in in-phase reference vectors and orthogonal reference vectors.

[0093] Furthermore, the fluorescence change time series matrix is ​​multiplied by the in-phase reference vector and the orthogonal reference vector to obtain the in-phase response vector. and orthogonal response vector The in-phase response vector describes the in-phase response value of each pixel. Orthogonal response vectors are used to describe the orthogonal response values ​​of each pixel. In-phase response value and orthogonal response values Representing pixels The response components that are in phase with the stimulus and orthogonal to it at the target response frequency.

[0094] Finally, the response amplitude and response phase are calculated based on the in-phase and quadrature response values ​​corresponding to each pixel, thus obtaining the response parameters:

[0095] ;

[0096] .

[0097] The response amplitude reflects the intensity of the blood perfusion response at that pixel, while the response phase reflects the time delay characteristics of the response relative to the stimulus signal.

[0098] It is worth emphasizing that the aforementioned digital frequency domain demodulation method retains only the response component that is strictly synchronized with the stimulation frequency, effectively suppressing artifacts of large vessel pulsation, baseline drift caused by individual perfusion differences, and random noise at non-target frequencies. Compared to traditional time-domain feature extraction, frequency domain demodulation exhibits higher detection sensitivity and specificity under weak signal-to-noise ratio conditions.

[0099] S400a: Based on the response parameters, determine the response score for each pixel.

[0100] Based on the response parameters, this application further determines the response score of each pixel; unlike the traditional time-domain multi-feature weighting, this application adopts a joint evaluation strategy of periodic stability and frequency domain signal-to-noise ratio.

[0101] First, the fluorescence change time series matrix is ​​divided into multiple periodic sub-matrices according to the periodic boundaries of the neural evoked events. The aforementioned frequency domain demodulation is then performed on each periodic sub-matrix to calculate the response amplitude and response phase of each pixel within each period. Based on the amplitude dispersion of each pixel across multiple periods... and phase dispersion Calculate the consistency of the cycle response The smaller the dispersion, the higher the consistency of the periodic response, indicating that the response of that pixel is more stable.

[0102] Simultaneously, adjacent frequency components located on both sides of the target response frequency and outside the preset guard band are extracted, and adjacent frequency noise features of each pixel are calculated. The guard band is used to eliminate effective response leakage near the target frequency, and the adjacent frequency noise characteristics reflect the intensity of interference from non-target frequencies.

[0103] Specifically, in one implementation, the protection bandwidth is... It can be set to 5%~15% of the target response frequency to fully cover the main lobe spectral leakage range of the target frequency.

[0104] In one implementation, adjacent-channel noise characteristics The calculation method can be as follows:

[0105] For the fluorescence timing signal corresponding to each pixel, a full-band spectral amplitude curve is obtained through Fast Fourier Transform; using the target response frequency... Centered on the high and low frequencies, the guard band width is extended to both sides to form an interval. The protection interval is defined, and the spectral components within this interval are not included in the noise calculation.

[0106] Adjacent frequency intervals were selected on both the low-frequency and high-frequency outer sides of the protected area, with the width of each adjacent frequency interval set to 1-2 times the width of the protected frequency band. The spectral amplitudes corresponding to all frequency points within the two adjacent frequency intervals were extracted, and their root mean square values ​​or average values ​​were calculated as the adjacent frequency noise features of that pixel. .

[0107] Furthermore, based on the ratio of the response amplitude to the adjacent-channel noise characteristics, and combined with the periodic response consistency, a weighted calculation is performed to obtain the response score for each pixel. .

[0108] Specifically, the formula for calculating the response score can be as follows:

[0109] ;

[0110] In the formula, This represents the amplitude signal-to-noise ratio, which is the ratio of the response amplitude to the characteristic of adjacent-channel noise. For periodic response consistency, and These are the weighting coefficients for amplitude signal-to-noise ratio and periodic response consistency, respectively, satisfying... .

[0111] In one implementation method The value can range from 0.5 to 0.8. The value can range from 0.2 to 0.5. In a preferred embodiment, , The evaluation weights take into account both response strength and periodic stability; when higher requirements are placed on response stability, the weights can be increased. The value should be between 0.4 and 0.5; when a higher response strength is required, it can be increased. Values ​​ranging from 0.7 to 0.8 can achieve the effects of this implementation method to a certain extent.

[0112] S500a: Based on response scoring, generate functional response hot zones.

[0113] Based on point-by-point response scoring, functional response hot zones with clear spatial boundaries can be further delineated, which are high-response areas under neurally evoked events.

[0114] Specifically, this application adopts an adaptive threshold strategy. First, background pixels are selected from a preset background region (e.g., a non-vascular, low-response brain tissue edge region) or a low-response scoring region to construct a background scoring sequence.

[0115] Calculate the median response rating of the background rating sequence. and dispersion The background noise statistical parameters are obtained, where the dispersion can be the standard deviation, mean absolute deviation, etc.

[0116] Calculate the response judgment threshold based on background noise statistical parameters and preset threshold coefficients. This threshold is adaptively determined based on the actual background noise level during the procedure, avoiding the problem of poor adaptability of a fixed threshold under different individuals and different contrast agent concentrations.

[0117] Pixels with response scores greater than or equal to the response determination threshold are identified as response pixels, and spatially continuous response pixel regions are marked as functional response hot zones.

[0118] S600a uses pixels within the functional response hot zone as candidate bonding and positioning points for brain-computer interface electrodes.

[0119] For both non-dura mater electrode placement and dura mater electrode placement scenarios, pixels within the functional response hot zone can be directly used as candidate placement points for brain-computer interface electrodes; the surgeon can select the final placement position based on the size, number of channels, and arrangement of the electrode array.

[0120] For example, please refer to Figure 2 , Figure 2 This is a schematic diagram of the functional response thermal zone of the adhesive brain-computer interface electrode of this application. Figure 2 Color is used to distinguish functional response hot zones, therefore a color diagram is used. For example... Figure 2 As shown, the red area represents the functional response hot zone, which is a continuous region with a high response score. After frequency domain demodulation under peripheral stimulation, it has a significant response amplitude and a stable response phase, and can be used as the best contact area for electrodes, making it easy to obtain a stronger and more stable cortical functional response.

[0121] It should be noted that the above-described method for generating functional response hotspots based on frequency domain extraction is applicable to both semi-invasive bonding scenarios without dura mater removal and invasive surface bonding scenarios after dura mater removal. In the dura mater removal scenario, because the dura mater is open and the cortex is directly exposed, the optical signal-to-noise ratio is further improved, the response amplitude and phase stability extracted by frequency domain demodulation are better, and the positioning accuracy of the functional response hotspots is higher. The surgeon can directly attach the electrodes to the functional response hotspots on the cortical surface to obtain better quality neural signal acquisition.

[0122] The electrode positioning method in the dural electrode puncture scenario of this application is further described below. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a flowchart illustrating one embodiment of the positioning method for the puncture-type brain-computer interface electrode of this application.

[0123] like Figure 3 As shown, the positioning method includes:

[0124] S100b: Acquire a continuous near-infrared fluorescence image frame sequence of the target surgical area and perform preprocessing.

[0125] For a detailed description, please refer to the detailed explanation of the acquisition conditions and preprocessing calculation methods for the near-infrared fluorescence image frame sequence in step S100a above. It is particularly important to note that in this step, the continuous near-infrared fluorescence image frame sequence is acquired after the dura mater of the target surgical area is opened and the cortex is exposed, and the temporal sequence covers the steady-state phase before the application of the neural evoked event, the execution phase during the application of the neural evoked event, and the recovery phase after the application of the neural evoked event. The preprocessing steps also include background subtraction, brightness normalization, motion correction, spatial denoising, and vascular enhancement.

[0126] In addition, the timing of the acquisition of this continuous near-infrared fluorescence image frame sequence limits the field of view of the near-infrared image to cover the entire area of ​​the bone window, and directly determines the contrast baseline of subsequent blood vessel segmentation and the amplitude evaluation range of neurovascular coupling response.

[0127] In open-dural puncture scenarios, vascular injury is one of the most significant risks in invasive electrode implantation. Accurately identifying the location, morphology, and distribution of blood vessels on the dermal surface is a core prerequisite for ensuring implantation safety.

[0128] S200b generates a blood vessel distribution map based on a continuous near-infrared fluorescence image frame sequence and calculates the blood vessel proximity risk at each pixel.

[0129] Vascular injury is one of the most significant risks in invasive electrode implantation. Accurately identifying the location, morphology, and distribution of blood vessels on the dermal surface is a core prerequisite for ensuring implantation safety.

[0130] This application generates a blood vessel distribution map based on the above-mentioned preprocessed continuous near-infrared fluorescence image frame sequence. The blood vessel distribution map includes the blood vessel region probability of each pixel, and pixels with a blood vessel region probability greater than a threshold can be identified as blood vessel regions.

[0131] In one implementation, a pre-trained deep learning segmentation model can be used to perform frame-by-frame vessel identification on a continuous sequence of image frames. The model can be a commonly used image segmentation network such as U-Net or ResU-Net, using labeled intraoperative near-infrared vascular images as the training set, and outputting the probability value of each pixel in each frame belonging to a vascular region. The final vessel distribution map is obtained by averaging the recognition results of multiple frames over time. The value of each pixel represents the probability of a blood vessel region, ranging from [0,1]. The closer the value is to 1, the higher the confidence that the location is a blood vessel region.

[0132] Specifically, the training method for the above deep learning segmentation model can be as follows:

[0133] During the model training phase, multiple sets of intraoperative near-infrared vascular images can be acquired, and the vascular regions in the images can be annotated at the pixel level to form image samples and corresponding vascular region annotation masks for model training. For the nth training sample, the input image is denoted as... The corresponding vascular area is marked with a mask and denoted as For any pixel location (x, y) in the image, when that pixel belongs to the blood vessel region, its labeled value is... It can be set to 1; when the pixel belongs to a non-vascular region, its label value can be set to 0.

[0134] Before training, input images can be normalized, resized, and augmented. Data augmentation methods can include one or more of the following: random rotation, horizontal or vertical flipping, random cropping, scaling, brightness adjustment, contrast adjustment, and noise perturbation, to increase the diversity of training samples and improve the model's adaptability to different imaging conditions, tissue morphology, and blood vessel morphology.

[0135] The training data can be further divided into a training set and a validation set. The training set is used to update the model parameters, while the validation set is used to monitor the generalization performance of the model during training and to determine the termination conditions of the model training.

[0136] The preprocessed intraoperative near-infrared image is input into a deep learning image segmentation model, and the model outputs a blood vessel probability map corresponding to the input image. For any pixel location (x, y), the model output value is denoted as... Its value ranges from [0,1], representing the predicted probability that the pixel belongs to the blood vessel region.

[0137] During model training, the binary cross-entropy loss function can be used as the basic loss function, which is expressed as:

[0138] ;

[0139] in, This represents the total number of pixels involved in the loss calculation. This represents the actual blood vessel region annotation value of the i-th pixel. This represents the probability value that the i-th pixel, predicted by the model, belongs to the blood vessel region.

[0140] Model parameters can be iteratively optimized using gradient descent. For example, Adam, AdamW, or stochastic gradient descent optimization algorithms can be used to backpropagate and iteratively update the model parameters based on the gradient of the loss function with respect to the model parameters.

[0141] During training, multiple training images can be grouped into a batch for batch training. After completing the forward computation, loss calculation and backpropagation of a batch, the model parameters are updated once, and the above process is repeated until the preset number of training rounds is completed or the preset stopping condition is met. A learning rate decay strategy can also be used during training to dynamically adjust the learning rate according to the number of training rounds or the validation set loss.

[0142] After each round of model training, the segmentation performance of the model can be calculated using the validation set, and the model performance can be judged based on evaluation metrics such as validation set loss and pixel accuracy. When the model's performance on the validation set reaches the preset requirements, or no longer significantly improves within several consecutive training rounds, model training can be stopped, and the model parameters with the best validation performance can be saved, thereby obtaining the pre-trained blood vessel segmentation model.

[0143] Based on the vascular distribution map, the vascular proximity risk of each pixel is further quantified to reflect the degree of danger of proximity between the implantation site and the blood vessel.

[0144] Specifically, methods for calculating the risk of blood vessel proximity can include:

[0145] The boundaries of vascular regions are determined based on the vascular distribution map; the vascular proximity risk of pixels located within vascular regions is taken as the maximum value; the vascular proximity risk of pixels located outside vascular regions is inversely proportional to the minimum distance to the boundary of the vascular region.

[0146] For example, based on the above blood vessel distribution map, a preset blood vessel confidence threshold can be set, and continuous regions where V(x,y) is greater than the blood vessel confidence threshold can be identified as blood vessel regions, and the contour boundary of the blood vessel region can be extracted. For pixels that fall inside the blood vessel region, the blood vessel approach risk is set to the maximum value of 1. For pixels outside the blood vessel region, the minimum distance from the point to the boundary of the blood vessel region is calculated, and the risk value is calculated through the negative correlation mapping function. That is, the smaller the minimum distance from the boundary of the blood vessel region, the higher the blood vessel approach risk.

[0147] S300b generates functional response hot zones based on continuous near-infrared fluorescence image frame sequences.

[0148] Specifically, the specific steps of S300b can be found in the relevant descriptions of S200a~S500a above, and will not be repeated here.

[0149] Specifically, please refer to Figure 4 , Figure 4 This is a schematic diagram of the functional response thermal zone of the puncture-type brain-computer interface electrode of this application. Figure 4 Color is used to distinguish between functional response hot zones and vascular areas, hence the use of color images.

[0150] like Figure 4As shown in the figure, the red area is the functional response hot zone, which has a high response to neural evoked events. The bright white lines are arterial vessels, and the dark gray lines are venous vessels. The implant site is the electrode implantation location, which is located within the functional response hot zone and avoids the vascular area.

[0151] S400b: Calculate the functional loss risk of each pixel based on the functional response hot zone.

[0152] Furthermore, based on the functional response hot zone, the functional loss risk of each pixel can be determined. The functional loss risk is used to quantify the proximity of each pixel to the functional response hot zone. Specifically, the functional loss risk of pixels falling within the functional response hot zone can be set to the minimum value of 0. For pixels outside the functional response hot zone, the shortest distance to the nearest functional zone boundary is calculated. The functional loss risk is positively correlated with the distance.

[0153] Based on the aforementioned risk of functional loss, pixels closer to the functional response hotspot can be given a lower risk of functional loss. This allows the electrode implantation site to be prioritized for proximity to the functional response hotspot during subsequent electrode positioning, while meeting vascular safety requirements. This ensures that the electrode channel can accurately cover the functional hotspots with active neural activity, effectively improving the effective channel ratio of electrodes, the signal-to-noise ratio of neural signals, and the decoding accuracy and communication stability of the brain-computer interface system.

[0154] S500b generates a comprehensive risk map based on vascular distribution maps, vascular proximity risks, and functional loss risks.

[0155] After obtaining risk assessment results for each dimension of vascular distribution and functional response, the multi-source information is fused to generate a unified comprehensive risk map.

[0156] Specifically, the method for generating the comprehensive risk map includes: for each pixel, taking a weighted average of the probability of the corresponding blood vessel region, the risk of blood vessel proximity, and the risk of functional loss to obtain the comprehensive risk value of that pixel; and generating a comprehensive risk map based on the comprehensive risk values ​​of each pixel.

[0157] It should be noted that the risks mentioned above in this embodiment are not simply stacked, but rather indispensable and work synergistically to ensure the safety and functionality of the electrode implantation site.

[0158] Specifically, the vascular distribution map visually marks the confidence level of each pixel belonging to a subdural vessel, effectively avoiding punctures into the vessel itself. The quantification of functional loss risk points indicates the degree of signal attenuation far from the core area of ​​nerve activation. Simply avoiding vessels would result in a large number of non-functional puncture points. This indicator ensures that the implantation site has effective nerve acquisition capabilities. Through comprehensive consideration, a quantitative balance is achieved between the safety, functional, and quality constraints of electrode puncture.

[0159] In one implementation, a weighted fusion method can be used to generate a comprehensive risk value. For each pixel, the probability of its corresponding blood vessel region, the risk of blood vessel proximity, and the risk of functional loss are weighted and summed according to preset weights to obtain the comprehensive risk value of that pixel. The calculation formula can be as follows:

[0160] ;

[0161] In the formula This is the weighting coefficient, and its value can be set to 0 to 1. This represents a map showing the distribution of blood vessels. This indicates that the blood vessel is close to the risk. This indicates a risk of functional loss.

[0162] In one implementation, the aforementioned weighting coefficients can be optimized based on a grid search method. To avoid the impact of different original numerical ranges of each risk component on the weight optimization results, the vascular risk, functional loss risk, structural risk, and registration error risk can be normalized or standardized before performing the weight search, so that each risk component is on a uniform numerical scale.

[0163] The search range of each weight coefficient can be set to 0 to 1, the search step size can be set to 0.02, and the constraint that the sum of all weight coefficients is 1 can be applied, thereby obtaining the discrete weight search space Ω.

[0164] For each case in the validation dataset, obtain the probability of the vascular region, the risk of vascular proximity, and the risk of functional loss for each pixel in that case; for any weight vector in the search space Ω The pixel points are weighted and fused according to the above comprehensive risk value function to generate the corresponding comprehensive risk map. Path planning is performed while keeping the entry area, target area, path planning algorithm and other non-weight related parameters consistent to obtain the predicted puncture path corresponding to the weight combination.

[0165] The reference puncture path determined by experts is used as the supervisory information, and the path matching accuracy is used as the evaluation index for the weighted combination. For the i-th case, the predicted puncture path is discretized according to a preset spatial interval. Let j be the j-th predicted path point. The expert reference puncture path is recorded as Let the preset spatial tolerance threshold be τ. When the shortest spatial distance from the predicted path point to the expert reference path is not greater than τ, the predicted path point is considered a correct match. The path matching accuracy of the i-th case is defined as:

[0166] ;

[0167] in, Indicates the predicted path point Seek expert reference for puncture path The shortest spatial distance, This is an indicator function; when the shortest spatial distance is not greater than the preset spatial tolerance threshold τ, The value is 1 if it is not 1, otherwise the value is 0.

[0168] Suppose the validation dataset contains N cases, then the weight vector... Overall evaluation function Defined as the average of the path matching accuracy for all cases:

[0169] ;

[0170] thus, This indicates the overall degree of matching between the predicted puncture path obtained from the integrated risk map planning and the expert reference puncture path within a preset spatial tolerance range, given a given weight combination. A higher evaluation value indicates that the integrated risk map generated by this weight combination is more conducive to obtaining planning results consistent with the expert reference path.

[0171] Iterate through all weight combinations in Ω that satisfy the constraints, generate a comprehensive risk map for each weight combination, perform path planning, and calculate the corresponding path matching accuracy. Then, apply the evaluation function... The largest weight combination is used as the final risk fusion weight for the pixel-level comprehensive risk map, that is:

[0172] ;

[0173] When multiple weight combinations achieve the same highest evaluation value, the final weight parameters can be further determined based on the safety margin of the planned path, the variance of cross-case evaluation results, the sensitivity of weight changes, or the preset risk priority. To improve the generalization ability of the determined weights, independent validation sets or cross-validation methods can be used for repeated validation.

[0174] The combined risk value of all pixels constitutes the overall risk map of the target surgical area. The lower the overall risk value, the more suitable the location is as an electrode implantation site.

[0175] S600b: Based on the comprehensive risk map, candidate puncture points for brain-computer interface electrodes are determined.

[0176] Based on the comprehensive risk map, combined with vascular safety constraints, structural risk constraints, and functional targeting constraints, candidate puncture points for brain-computer interface electrodes can be screened.

[0177] Specifically, please refer to Figure 5 , Figure 5 yes Figure 3 A flowchart of one embodiment corresponding to S600b.

[0178] like Figure 5 As shown, the method for determining candidate puncture sites may include:

[0179] S601. Traverse all pixels in the comprehensive risk map, filter out pixels whose comprehensive risk value is less than the preset risk threshold, and collect them into a set to obtain a pixel set.

[0180] S602. Remove pixels located outside the functional response hot zone from the pixel set, and remove pixels with a blood vessel proximity risk greater than the preset blood vessel proximity risk threshold to obtain candidate puncture positioning points.

[0181] Based on the above screening scheme, the overall high-risk area is filtered using a comprehensive risk threshold, and only points within the functional response hot zone are retained. This ensures that the electrode covers the target cortical functional hotspots after puncture, improves the quality of nerve signal acquisition, eliminates high vascular risk points, avoids puncturing subdural vessels, and ensures that the candidate puncture points simultaneously meet functional requirements and vascular safety conditions.

[0182] The remaining pixels after screening are the candidate puncture points for brain-computer interface electrodes. The surgeon can select the final dural puncture and implantation location from these points based on the size, number of channels, and arrangement of the electrode array.

[0183] S700b generates multiple candidate puncture paths based on candidate puncture location points.

[0184] S800b: Calculate the risk cost of each candidate puncture path and select the path with the lowest risk cost as the target path output.

[0185] In one implementation, to further ensure the safety of the entire electrode implantation process, candidate puncture paths can be generated based on candidate puncture positioning points, and puncture paths can be screened by path risk cost to determine the puncture path with the lowest risk.

[0186] Specifically, multiple candidate puncture paths can be generated based on different needle insertion angles, using candidate puncture points as the puncture starting point. These different needle insertion angles can be uniformly and discretely sampled tilt angles of the puncture needle relative to the normal direction of the dermal surface within the range of 0° to 45°. For example, multiple tilt angle schemes of 0°, 10°, 20°, 30°, 40°, and 45° can be generated sequentially with step sizes of 5° or 10°. Simultaneously, different deflection azimuth angles of the puncture needle in the tangential plane of the dermis can be combined, for example, generating a set of deflection directions every 15° circumferentially centered on the normal direction of the puncture starting point, resulting in multiple sets of differentiated needle insertion postures in the spatial dimension.

[0187] For further details, please refer to Figure 6 , Figure 6 yes Figure 3 A flowchart of one embodiment corresponding to S800b.

[0188] like Figure 6 As shown, methods for calculating risk costs may include:

[0189] S801. Discretely sample the candidate puncture path and extract several sampling points along the path.

[0190] S802. Read the blood vessel proximity risk and functional loss risk corresponding to each sampling point, and accumulate the integral along the path to obtain the blood vessel proximity cost and functional loss cost.

[0191] The methods for obtaining the risks of blood vessel proximity and functional loss at the sampling point can be the same as those in the steps above.

[0192] By integrating along the path, the risk level of the entire path can be comprehensively assessed.

[0193] S803. Determine the path length cost based on the total length of the candidate puncture path.

[0194] Among them, the cost of path length can be directly proportional to the length of the path. The longer the path, the higher the puncture risk and the higher the cumulative error, and correspondingly, the greater the cost of path length.

[0195] S804. Determine the path reachability cost based on the needle insertion angle of the candidate puncture path.

[0196] Under clinical operational constraints, the upper limit of the needle insertion angle is limited by surgical instruments and the exposure range of the cranial window. The angle should not exceed 45° to avoid the puncture needle scraping the edge of the skull and pulling on the blood vessels on the surface of the cortex. Too small an angle can easily cause local compression damage to the cortex. Therefore, the accessibility cost of the path can be determined based on the needle insertion angle. The closer the angle is to the optimal operating angle, such as 30°, the lower the accessibility cost of the path.

[0197] S805. Calculate the weighted average of blood vessel proximity cost, functional loss cost, path length cost, and path reachability cost to obtain the risk cost of the candidate puncture path.

[0198] Finally, the four costs are weighted and summed according to preset weights to obtain the total risk cost C of the candidate path:

[0199]

[0200] In the formula, These are weighting coefficients, which can be used to adjust the priority of various costs according to the needs of the surgery. These represent the costs of blood vessel accessibility, functional loss, path reachability, and path length, respectively. By ranking the total risk costs, the optimal target puncture path can be selected and output to the execution device, such as a robotic arm or puncture instrument.

[0201] In one implementation, similar to the method for generating weight coefficients in the comprehensive risk map described above, the weight coefficients of each cost can be optimized using a web search method. To eliminate differences in the dimensions and numerical ranges of different cost items, each cost item is normalized or standardized before performing the weight search, so that each cost item is on a uniform numerical scale.

[0202] The search range for each weight coefficient is set to 0 to 1, the search step size is set to 0.02, and a constraint is imposed that the sum of all weight coefficients is 1, thus obtaining the discrete weight search space. .

[0203] For each case in the validation dataset, a set of candidate puncture paths is pre-obtained, and the four normalized cost values ​​mentioned above are calculated for each candidate puncture path. For the search space... Any weight vector in The total cost of all candidate puncture paths for the case is calculated, and the candidate puncture path with the minimum total cost is determined as the predicted optimal puncture path under the weight combination.

[0204] The optimal puncture path determined by experts is used as supervision information, and the path selection accuracy is used as the evaluation metric for the weight combination. Let the validation dataset contain N cases. For the i-th case, the predicted optimal puncture path selected by the algorithm under the weight vector w is denoted as... The optimal puncture path determined by experts is denoted as... Then the evaluation function Defined as:

[0205] ;

[0206] in, This is an indicator function; when the predicted optimal puncture path matches the expert-determined optimal reference puncture path, The value is 1 if it is not 1, and 0 otherwise. Therefore, This indicates that a weight vector is used across all validated cases. The proportion of cases where the algorithm correctly selects the optimal puncture path from expert reference.

[0207] Traversal For each weight combination that satisfies the constraints, calculate its corresponding path selection accuracy and apply the evaluation function. The largest weight combination is used as the final weight parameter of the total cost function of the candidate puncture path, that is:

[0208] ;

[0209] When multiple weight combinations achieve the same highest accuracy, the final weight parameters can be determined from among the multiple equally optimal weight combinations by using the stability of the total cost of the selected path, the variance of evaluation results among different cases, or a preset risk priority as secondary judgment criteria. To reduce the dependence of the weight search results on a specific case set, the determined weight combinations can be further validated using independent validation sets or cross-validation.

[0210] Based on the positioning methods described above, near-infrared fluorescence imaging technology combined with digital frequency domain demodulation can generate functional response heatmaps in real time during surgery. This allows surgeons to intuitively determine the spatial location and extent of the target functional brain region before electrode placement, thereby significantly reducing the blindness and trial-and-error costs of positioning, and improving the effective channel ratio, signal quality, and subsequent decoding accuracy. For open dural puncture scenarios, the combined decision-making of functional targeting and vascular safety can be achieved through vascular distribution maps and comprehensive risk maps, effectively improving the safety of puncture implantation.

[0211] The algorithm finds that pixels closer to the functional response hotspot have a lower risk of functional loss. When performing comprehensive risk fusion and site selection, it automatically prioritizes the retention of functional hotspot areas, guides electrode implantation sites to target the core area of ​​neural activity, significantly improves the signal-to-noise ratio and effective channel ratio of neural signals acquired by electrodes, and optimizes the signal decoding accuracy and communication effect of brain-computer interfaces.

[0212] Functional response hot zones can be delineated through peripheral stimulation and other neural evoked events, reducing reliance on patient cooperation and providing more direct visual guidance and verification during electrode placement. This allows surgeons to more quickly identify target areas and safe pathways, reducing repeated attempts and ineffective adjustments, and expanding the applicability of brain-computer interface electrode implantation technology.

[0213] This application also provides a positioning device for brain-computer interface electrodes; please refer to [link to relevant documentation]. Figure 7 , Figure 7 This is a schematic diagram of one embodiment of the positioning device for the brain-computer interface electrode of this application.

[0214] like Figure 7 As shown, the device includes: a preprocessing module 21, a fluorescence timing analysis module 22, a frequency domain extraction module 23, a response region division module 24, and a positioning module 25.

[0215] The preprocessing module 21 is used to acquire a continuous near-infrared fluorescence image frame sequence of the target surgical area and perform preprocessing. The temporal sequence of the continuous near-infrared fluorescence image frame sequence covers at least the steady-state phase before the application of the neural evoked event and the execution phase during the application of the neural evoked event.

[0216] The fluorescence time series analysis module 22 is used to determine the baseline fluorescence intensity at each moment in the execution phase based on the image frame sequence under the steady state phase, and to calculate the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence based on the baseline fluorescence intensity, so as to obtain the fluorescence change time series matrix.

[0217] The frequency domain extraction module 23 is used to determine the target response frequency based on the period of the stimulus signal of the neural evoked event, and to extract the response parameters from the fluorescence change time matrix by combining the image acquisition time series of the continuous near-infrared fluorescence image frame sequence. The response parameters are used to describe the blood perfusion response characteristics of each pixel under the action of the neural evoked event.

[0218] The response area division module 24 is used to determine the response score of each pixel based on the response parameters, and to generate a functional response hot zone based on the response score.

[0219] The positioning module 25 is used to determine the positioning points of the brain-computer interface electrodes based on the functional response hot zone.

[0220] As per the above reference Figures 1 to 6 The method for locating brain-computer interface electrodes according to embodiments of this specification has been described. The details mentioned in the above description of the method embodiments also apply to the brain-computer interface electrode positioning device according to embodiments of this specification. The brain-computer interface electrode positioning device described above can be implemented in hardware, software, or a combination of hardware and software.

[0221] This application also provides an electronic device, please refer to... Figure 8 , Figure 8 This is a schematic diagram of one embodiment of the electronic device of this application. For example... Figure 8 As shown, the electronic device 30 may include at least one processor 31, a memory 32 (e.g., non-volatile memory), a RAM 33, and a communication interface 34, and the at least one processor 31, memory 32, RAM 33, and communication interface 34 are connected together via a bus 35. The at least one processor 31 executes at least one computer-readable instruction stored or encoded in the memory 32.

[0222] It should be understood that the computer-executable instructions stored in memory 32, when executed, cause at least one processor 31 to perform the above-described combinations in the various embodiments of this specification. Figures 1-6 The description includes various operations and functions.

[0223] In the embodiments of this specification, electronic device 30 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.

[0224] According to one embodiment, a program product, such as a machine-readable medium, is provided. The machine-readable medium may have instructions (i.e., the elements implemented in software as described above), which, when executed by a machine, cause the machine to perform the above-described combinations of the various embodiments of this specification. Figures 1-6 The various operations and functions described. Specifically, a system or apparatus equipped with a readable storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer or processor of the system or apparatus to read and execute the instructions stored in the readable storage medium.

[0225] In this case, the program code read from the readable medium itself can perform the functions of any of the above embodiments, and therefore the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of this specification.

[0226] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer or the cloud via a communication network.

[0227] Those skilled in the art will understand that the various embodiments disclosed above can be modified and varied without departing from the spirit of the invention. Therefore, the scope of protection of this specification should be defined by the appended claims.

[0228] It should be noted that not all steps and units in the above process and system structure diagrams are mandatory; some steps or units can be omitted according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above embodiments can be a physical structure or a logical structure; that is, some units may be implemented by the same physical element, or some units may be implemented by multiple physical elements, or they may be jointly implemented by certain components in multiple independent devices.

[0229] In the above embodiments, the hardware units or modules can be implemented mechanically or electrically. For example, a hardware unit, module, or processor may include permanent dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operation. The hardware unit or processor may also include programmable logic or circuitry (such as a general-purpose processor or other programmable processor), which can be temporarily configured by software to perform the corresponding operation. The specific implementation method (mechanical, dedicated permanent circuitry, or temporarily configured circuitry) can be determined based on cost and time considerations.

[0230] The specific embodiments described above with reference to the accompanying drawings are exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" compared to other embodiments. Specific details are included to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.

[0231] The foregoing description of this disclosure is provided to enable any person skilled in the art to implement or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles applicable herein can be applied to other variations without departing from the scope of this disclosure. Therefore, this disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.

Claims

1. A method for locating brain-computer interface electrodes, characterized in that, include: A continuous near-infrared fluorescence image frame sequence of the target surgical area is acquired and preprocessed. The temporal sequence of the continuous near-infrared fluorescence image frame sequence covers at least the steady-state phase before the application of the neural evoked event and the execution phase during the application of the neural evoked event. Based on the image frame sequence in the steady state phase, the baseline fluorescence intensity at each moment in the execution phase is determined, and based on the baseline fluorescence intensity, the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence is calculated to obtain the fluorescence change time series matrix. Based on the period of the stimulation signal of the neural evoked event, the target response frequency is determined, and the response parameters are extracted from the fluorescence change time series matrix by combining the image acquisition time series of the continuous near-infrared fluorescence image frame sequence. The response parameters are used to describe the blood perfusion response characteristics of each pixel under the action of the neural evoked event. Based on the response parameters, a response score for each pixel is determined, and a functional response hotspot is generated based on the response score. Based on the functional response hot zone, the positioning points of the brain-computer interface electrodes are determined.

2. The positioning method according to claim 1, characterized in that, The preprocessing steps for the continuous near-infrared fluorescence image frame sequence include: sequentially performing background subtraction, brightness normalization, motion correction, spatial denoising, and blood vessel enhancement on the continuous near-infrared fluorescence image frame sequence.

3. The positioning method according to claim 1, characterized in that, The step of determining the baseline fluorescence intensity at each moment in the execution phase based on the image frame sequence under the steady-state phase includes: Calculate the average fluorescence intensity of each image frame during the steady-state phase, and fit the average fluorescence intensity change curve. Based on the average fluorescence intensity change curve, predict the baseline fluorescence intensity at each time point during the execution phase; and / or, The specific steps for calculating the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence are as follows: ; In the formula, The baseline fluorescence intensity at time t is represented by the value of t. For the pixels in the continuous near-infrared fluorescence image frame sequence The fluorescence intensity at time t, Represents pixels The rate of change of relative fluorescence at time t.

4. The positioning method according to claim 1, characterized in that, The step of extracting the response parameters from the fluorescence change time series matrix includes: Based on the target response frequency and the acquisition time points corresponding to each image frame, generate in-phase reference sequences and orthogonal reference sequences corresponding to the target response frequency, respectively. The in-phase reference sequence and the quadrature reference sequence are normalized to obtain the in-phase reference vector and the quadrature reference vector required for digital frequency domain demodulation. The in-phase reference vector and the quadrature reference vector have a 90° phase difference. Based on the in-phase reference vector and the orthogonal reference vector, response parameters are extracted from the fluorescence change time series matrix.

5. The positioning method according to claim 4, characterized in that, The step of extracting response parameters from the fluorescence change time series matrix based on the in-phase reference vector and the orthogonal reference vector includes: The fluorescence change time series matrix is ​​multiplied by the in-phase reference vector to obtain the in-phase response vector, which is used to describe the in-phase response value of each pixel. The fluorescence change time series matrix is ​​multiplied by the orthogonal reference vector to obtain the orthogonal response vector, which is used to describe the orthogonal response value of each pixel. The response amplitude and response phase are calculated based on the in-phase and quadrature response values ​​corresponding to each pixel to obtain the response parameters.

6. The positioning method according to claim 5, characterized in that, The step of determining the response score for each pixel based on the response parameters includes: The fluorescence change time series matrix is ​​divided into multiple periodic sub-matrices according to the periodic boundaries of the neural evoked events; Calculate the response amplitude and response phase of each pixel in each periodic submatrix, and calculate the periodic response consistency based on the amplitude dispersion and phase dispersion of each pixel in multiple periods. Extract the adjacent frequency components on both sides of the target response frequency that are outside the preset guard band, and calculate the adjacent frequency noise features of each pixel; The response score for each pixel is obtained by weighting the ratio of the response amplitude to the adjacent-frequency noise feature and combining it with the periodic response consistency; and / or, The step of generating functional response hotspots based on the response score includes: Background pixels are selected from a preset background area or a low-response score area to construct a background score sequence; Calculate the median and dispersion of the background rating sequence to obtain the background noise statistical parameters; The response judgment threshold is determined based on the background noise statistical parameters and the preset threshold coefficient; Pixels whose response scores are greater than or equal to the response determination threshold are identified as response pixels, and continuous response pixel regions are marked as functional response hot zones.

7. The positioning method according to claim 1, characterized in that, The step of determining the location points of the brain-computer interface electrodes based on the functional response thermal zone includes: The pixels within the functional response hot zone are used as candidate bonding and positioning points for the brain-computer interface electrodes.

8. The positioning method according to claim 1, characterized in that, The continuous near-infrared fluorescence image frame sequence is acquired after the dura mater of the target surgical area is opened and the cortex is exposed. The localization method further includes: Based on the continuous near-infrared fluorescence image frame sequence, a blood vessel distribution map is generated, and the blood vessel proximity risk of each pixel is calculated. The blood vessel distribution map includes the probability of blood vessel regions for each pixel. The step of determining the location points of the brain-computer interface electrodes based on the functional response thermal zone further includes: Based on the aforementioned functional response hot zone, calculate the functional loss risk of each pixel; A comprehensive risk map is generated based on the vascular distribution map, the vascular proximity risk, and the functional loss risk. Based on the comprehensive risk map, candidate puncture sites for brain-computer interface electrodes are determined.

9. The positioning method according to claim 8, characterized in that, The step of generating a blood vessel distribution map based on the continuous near-infrared fluorescence image frame sequence includes: performing blood vessel identification on the continuous near-infrared fluorescence image frame sequence based on a pre-trained deep learning segmentation model to generate the blood vessel distribution map; The method for calculating the blood vessel proximity risk includes: determining the boundary of the blood vessel region based on the blood vessel distribution map; taking the maximum value of the blood vessel proximity risk for pixels located within the blood vessel region; and stating that the blood vessel proximity risk for pixels located outside the blood vessel region is inversely proportional to their minimum distance to the boundary of the blood vessel region; and / or, The steps for calculating the functional loss risk of each pixel include: The risk of functional loss for pixels located within the functional response hot zone is minimized. The risk of functional loss for pixels located outside the functional response hot zone is positively correlated with their minimum distance to the boundary of the functional response hot zone; and / or, The method for generating the comprehensive risk map includes: For each pixel, the probability of the corresponding blood vessel region, the risk of blood vessel proximity, and the risk of functional loss are weighted and averaged to obtain the comprehensive risk value of the pixel. A comprehensive risk map is generated based on the comprehensive risk value of each pixel.

10. The positioning method according to claim 8, characterized in that, The step of determining candidate puncture sites for brain-computer interface electrodes includes: Traverse all pixels in the comprehensive risk map, filter out pixels whose comprehensive risk value is less than a preset risk threshold, and collect them into a set to obtain a pixel set; Pixels located outside the functional response hot zone are removed from the pixel set, and pixels with a blood vessel approach risk greater than a preset blood vessel approach risk threshold are also removed to obtain candidate puncture positioning points.

11. The positioning method according to claim 8, characterized in that, Also includes: Based on the candidate puncture location point, multiple candidate puncture paths are generated, and the candidate puncture path takes the candidate puncture location point as the puncture starting point. Calculate the risk cost of each candidate puncture path and select the path with the lowest risk cost as the target path output.

12. The positioning method according to claim 11, characterized in that, The step of calculating the risk cost of each candidate puncture path includes: Discrete sampling is performed on the candidate puncture path, and several sampling points are extracted along the path; Read the blood vessel proximity risk and the functional loss risk corresponding to each sampling point, and accumulate the integral along the path to obtain the blood vessel proximity cost and the functional loss cost; The path length cost is determined based on the total length of the candidate puncture paths; Based on the needle insertion angle of the candidate puncture path, determine the path reachability cost; The risk cost of the candidate puncture path is obtained by calculating the weighted average of the blood vessel proximity cost, functional loss cost, path length cost, and path reachability cost.

13. A positioning device for brain-computer interface electrodes, characterized in that, include: The preprocessing module is used to acquire a continuous near-infrared fluorescence image frame sequence of the target surgical area and perform preprocessing. The temporal sequence of the continuous near-infrared fluorescence image frame sequence covers at least the steady-state phase before the application of the neural evoked event and the execution phase during the application of the neural evoked event. The fluorescence time series analysis module is used to determine the baseline fluorescence intensity at each moment in the execution phase based on the image frame sequence under the steady state phase, and to calculate the relative fluorescence change rate of each pixel in the continuous near-infrared fluorescence image frame sequence based on the baseline fluorescence intensity, so as to obtain the fluorescence change time series matrix. The frequency domain extraction module is used to determine the target response frequency based on the period of the stimulation signal of the neural evoked event, and to extract response parameters from the fluorescence change time series matrix by combining the image acquisition time series of the continuous near-infrared fluorescence image frame sequence. The response parameters are used to describe the blood perfusion response characteristics of each pixel under the action of the neural evoked event. The response area division module is used to determine the response score of each pixel based on the response parameters, and to generate a functional response hot zone based on the response score. The positioning module is used to determine the positioning points of the brain-computer interface electrodes based on the functional response hot zone.

14. An electronic device comprising: At least one processor; as well as A memory that stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the brain-computer interface electrode localization method as described in any one of claims 1 to 12.

15. A machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the brain-computer interface electrode positioning method as described in any one of claims 1 to 12.