A method for comfortable anesthesia and controlled analgesia for day-time breast augmentation
By analyzing image changes in facial fold areas using computer vision, infusion parameters are automatically adjusted, solving the problem of precise and dynamic control of anesthesia and analgesia in daytime thoracic surgery, and achieving comfortable anesthesia and controlled-release analgesia for patients.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN YIXING MEDICAL BEAUTY HOSPITAL
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, it is difficult to achieve precise and dynamic control of anesthesia and analgesia management in daytime thoracotomy, especially in balancing rapid intraoperative and postoperative recovery with adequate analgesia. Existing methods lack quantitative analysis and objective assessment of subtle changes in facial structures.
By analyzing image changes in facial fold areas using computer vision technology, quantitative feature parameters such as contour length and grayscale gradient are extracted to generate offsets and automatically adjust infusion parameters, thereby achieving closed-loop control of anesthesia and analgesia.
It achieves objective, continuous, and automated control of anesthesia and analgesia, ensuring patient comfort and rapid recovery during daytime thoracic surgery.
Smart Images

Figure CN122290865A_ABST
Abstract
Description
Technical Field
[0001] This invention discloses a method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery, belonging to the field of computer technology that combines computer vision and medical device control. Background Technology
[0002] Day surgery for thoracic anesthesia is characterized by short operation time, rapid patient turnover, and high requirements for the quality of anesthesia recovery. Its anesthesia and analgesia management needs to ensure patient comfort while achieving rapid onset, precise control, and timely recovery. Currently, anesthesiologists mainly rely on monitoring vital signs such as heart rate and blood pressure, as well as subjectively observing the patient's facial expressions and limb responses, to judge the depth of anesthesia and the degree of pain, and manually adjust the drug delivery parameters of the infusion device accordingly. This experience-dependent approach suffers from problems such as judgment lag, discontinuous control, and significant subjective differences, making it difficult to achieve precise and dynamic control of anesthetic and analgesic drug infusion throughout the entire surgical process. Especially for day surgery, balancing rapid postoperative recovery with adequate intraoperative analgesia presents a significant challenge.
[0003] In recent years, the application of computer vision technology in the medical field has gradually expanded, leading to the emergence of patient status monitoring methods based on facial image analysis. Existing technologies have attempted to acquire patient facial images using cameras and utilize image processing techniques to detect changes in facial expressions or eyelid opening and closing, in order to assist in determining the depth of anesthesia or level of sedation. However, existing solutions mostly focus on the classification and recognition of overall facial expressions or the detection of specific facial movements, lacking quantitative analysis of subtle structural changes in specific anatomical regions. Furthermore, their outputs are often only used as supplementary information for medical staff reference, failing to form a closed-loop linkage with the control logic of infusion devices. In addition, existing technologies lack objective and continuous evidence for assessing analgesia needs, typically relying on intermittent assessment methods such as patient complaints or pain rating scales, making it difficult to capture early signs of pain response during surgery. Summary of the Invention
[0004] To address the aforementioned technological limitations, this technical solution provides a comfortable anesthesia and controlled-release analgesia method for daytime thoracic surgery, aiming to achieve closed-loop control of anesthesia and analgesia based on facial fold image change analysis. This method involves real-time acquisition and processing of images of specific folded areas of the patient's face, extracting quantitative feature parameters such as contour length and grayscale gradient, comparing the current feature parameters with preoperative baseline parameters to generate offsets reflecting changes in the patient's state, and then automatically determining and executing corresponding infusion parameter adjustments according to a preset control strategy. This solution deeply couples computer vision processing technology with the infusion device control logic, achieving a complete technical closed loop from image feature extraction and state quantification assessment to dynamic adjustment of infusion parameters, providing an objective, continuous, and automated means of anesthesia and analgesia control for daytime thoracic surgery.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] A comfortable anesthesia and controlled-release analgesia method for daytime thoracic surgery includes:
[0007] S1, Obtain a first image acquisition instruction, the first image acquisition instruction being generated based on the first confirmation operation received by the anesthesiologist's terminal within the preoperative confirmation time window;
[0008] S2, in response to the first image acquisition command, control the first image acquisition unit to acquire the facial region image stream of the subject at a first acquisition frequency, the facial region image stream containing multiple facial frames arranged in chronological order;
[0009] S3, perform a wrinkle feature extraction operation on the current face frame in the face region image stream to obtain a first wrinkle feature parameter set, the first wrinkle feature parameter set containing at least one contour length value and grayscale gradient value of a wrinkle region;
[0010] S4, compare the first set of wrinkle feature parameters with the preset set of reference wrinkle parameters to generate wrinkle change offset;
[0011] S5, based on the wrinkle change offset, determine the first infusion control parameter from the preset control strategy mapping table, the first infusion control parameter including the infusion rate value and the infusion duration;
[0012] S6, Generate a first infusion control command based on the first infusion control parameters. The first infusion control command is used to instruct the first infusion unit to perform a first infusion action, which is used to deliver anesthetic drugs into the recipient's body.
[0013] Furthermore, before obtaining the first image acquisition command in step S1, the method further includes:
[0014] Obtain surgical scheduling data, which includes patient identification and surgical type identification;
[0015] According to the surgical type identifier, a reference fold template corresponding to the surgical type identifier is called from a preset fold reference library. The reference fold template includes multiple reference fold regions and a reference contour length range and a reference grayscale gradient range corresponding to each reference fold region.
[0016] During the preoperative preparation stage, the first image acquisition unit is controlled to acquire static facial images of the recipient at a second acquisition frequency;
[0017] Perform a wrinkle feature extraction operation on the static facial image to obtain a static wrinkle feature parameter set. Use the static wrinkle feature parameter set as the preset baseline wrinkle parameter set and bind and store the baseline wrinkle parameter set with the recipient's identity identifier.
[0018] Further, S2 includes:
[0019] Parse the first image acquisition command and extract the terminal identifier and current timestamp of the anesthesiologist's terminal;
[0020] Based on the terminal identifier, search the task queue for an anesthesia execution task instance that is bound to the anesthesiologist's terminal, and the anesthesia execution task instance contains the recipient's identity identifier;
[0021] Based on the recipient's identity identifier, obtain the set of reference wrinkle parameters bound to the recipient;
[0022] Send an acquisition parameter configuration instruction to the first image acquisition unit. The acquisition parameter configuration instruction includes the first acquisition frequency, exposure compensation parameters, and focus area coordinates. The focus area coordinates are determined based on the center point coordinates of each fold area in the reference fold parameter set.
[0023] The system receives the facial region image stream returned by the first image acquisition unit according to the acquisition parameter configuration instruction, and performs spatiotemporal alignment processing on the facial region image stream and the reference wrinkle parameter set. The spatiotemporal alignment processing includes establishing a mapping relationship between the timestamp of each facial frame and the acquisition timestamp of the reference wrinkle parameter set.
[0024] Further, S3 includes:
[0025] Obtain the current facial frame, perform grayscale conversion on the current facial frame, and obtain the current grayscale image;
[0026] On the current grayscale image, multiple regions of interest are defined based on the contour position coordinates of each wrinkle region in the reference wrinkle parameter set;
[0027] For each region of interest, perform the following operations: perform edge detection on the pixels within the region of interest to obtain a set of edge pixels; perform connected component analysis on the set of edge pixels to extract continuous edge curves;
[0028] Calculate the number of pixels on the continuous edge curve to obtain the contour length value, and calculate the variance of gray values of all pixels in the region of interest to obtain the gray gradient value.
[0029] The contour length value and grayscale gradient value corresponding to each region of interest are structured and organized to form the first wrinkle feature parameter set. The parameter arrangement order of the first wrinkle feature parameter set is consistent with the parameter arrangement order of the reference wrinkle parameter set.
[0030] Further, S4 includes:
[0031] Obtain the reference wrinkle parameter set, which includes multiple reference wrinkle regions and the reference contour length value and reference grayscale gradient value corresponding to each reference wrinkle region;
[0032] The difference between the first contour length value in the first set of fold feature parameters and the corresponding reference contour length value in the set of reference fold parameters is calculated to obtain the contour length offset.
[0033] The difference between the first gray-level gradient value in the first set of wrinkle feature parameters and the corresponding reference gray-level gradient value in the reference set of wrinkles is calculated to obtain the gray-level gradient offset.
[0034] The contour length offset and the grayscale gradient offset are weighted and combined according to a preset weighting coefficient to generate a comprehensive offset index, which is then used as the wrinkle change offset.
[0035] Further, S5 includes:
[0036] Obtain the preset control strategy mapping table, which contains multiple offset intervals and input control parameter entries corresponding to each offset interval;
[0037] The wrinkle change offset is matched with multiple offset intervals in the control strategy mapping table to determine the target offset interval where the wrinkle change offset is located.
[0038] Read the target infusion control parameter entry corresponding to the target offset interval from the control strategy mapping table. The target infusion control parameter entry includes the infusion rate value and the infusion duration.
[0039] The infusion rate value and the infusion duration are determined as the first infusion control parameters.
[0040] Furthermore, the method also includes:
[0041] During the execution of the first infusion control command, subsequent facial frames are continuously acquired, and wrinkle feature extraction operations are performed on the subsequent facial frames to obtain a second wrinkle feature parameter set.
[0042] The second set of wrinkle feature parameters is compared with the reference set of wrinkle parameters to generate an updated wrinkle change offset.
[0043] Determine whether the updated wrinkle change offset exceeds the boundary value of the target offset range;
[0044] When the boundary value of the target offset range is exceeded, the second infusion control parameter is re-determined from the control strategy mapping table according to the updated wrinkle change offset, and a second infusion control instruction is generated. The second infusion control instruction is used to instruct the first infusion unit to adjust the infusion parameter to the second infusion control parameter.
[0045] Furthermore, the method also includes:
[0046] During the execution of the first infusion control command, an analgesia intervention request is obtained, which is generated based on the analgesia confirmation operation received by the anesthesiologist's terminal in the intraoperative observation window.
[0047] In response to the analgesia intervention request, the second image acquisition unit is controlled to acquire a close-up image stream of the recipient's facial region at a third acquisition frequency, wherein the field of view of the close-up image stream of the facial region is smaller than the field of view of the facial region image stream.
[0048] A wrinkle texture analysis operation is performed on the current close-up frame in the close-up image stream of the facial region to obtain a texture complexity parameter. The texture complexity parameter is obtained by statistically analyzing the contrast value of the gray-level co-occurrence matrix in the close-up frame.
[0049] The texture complexity parameter is compared with a preset analgesia trigger threshold;
[0050] When the texture complexity parameter exceeds the analgesia trigger threshold, an analgesia control command is generated. The analgesia control command is used to instruct the second infusion unit to perform analgesia infusion action, which is used to deliver analgesic drugs into the recipient's body.
[0051] Furthermore, the method also includes:
[0052] During the execution of the analgesia control command, the close-up image stream of the facial region is continuously acquired, and a temporal analysis operation is performed on multiple consecutive close-up frames in the close-up image stream of the facial region to obtain a temporal texture change curve.
[0053] Calculate the slope of texture change within the current time window based on the temporal texture change curve;
[0054] The slope of the texture change is compared with a preset slope decrease threshold;
[0055] When the absolute value of the slope of the texture change is less than the slope decrease threshold, an analgesia maintenance command is generated, which is used to instruct the second infusion unit to continue infusion at the current infusion rate;
[0056] When the slope of the texture change is negative and its absolute value is greater than the slope decrease threshold, an analgesia reduction instruction is generated. The analgesia reduction instruction is used to instruct the second infusion unit to reduce the infusion rate according to a preset reduction step size.
[0057] Furthermore, the method also includes:
[0058] Obtain a regulatory retrospective request, wherein the regulatory retrospective request includes the target subject identifier and the retrospective time range;
[0059] Based on the target recipient identifier, obtain the image storage address set associated with the recipient from the storage node, the image storage address set containing the storage addresses of multiple facial frames collected within the retrospective time interval;
[0060] Based on the image storage address set, read the multiple facial frames and the corresponding wrinkle feature parameter set snapshots from the storage node;
[0061] The multiple facial frames are arranged in chronological order to generate video stream data. The snapshot of the wrinkle feature parameter set is overlaid and annotated with the corresponding facial frames to generate a visual retrospective interface. The visual retrospective interface is then returned to the monitoring terminal for display.
[0062] This invention discloses a method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery, belonging to the field of computer technology combining computer vision and medical device control. The method involves: acquiring a first image acquisition command to control the image acquisition unit to acquire a facial region image stream of the subject at a first acquisition frequency; performing a wrinkle feature extraction operation on the current facial frame to obtain a first wrinkle feature parameter set containing contour length values and grayscale gradient values; comparing this parameter set with a preset benchmark wrinkle parameter set to generate a wrinkle change offset; determining infusion control parameters from a preset control strategy mapping table based on this offset, and generating an infusion control command to instruct the infusion unit to perform the corresponding infusion action. This invention achieves refined control of the anesthesia process by real-time quantitative analysis of facial wrinkle morphological changes and automatically generating and adjusting infusion control commands. Attached Figure Description
[0063] Figure 1 A flowchart illustrating a method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery, as claimed in an embodiment of the present invention.
[0064] Figure 2 This is a second workflow diagram of a method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery, as claimed in an embodiment of the present invention.
[0065] Figure 3 A third workflow diagram of a method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery claimed in an embodiment of the present invention;
[0066] Figure 4 The fourth flowchart is a method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery, as claimed in an embodiment of the present invention. Detailed Implementation
[0067] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0068] The terms "first," "second," and "third" in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of those features. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications in the embodiments of this application, such as up, down, left, right, front, back, etc., are only used to explain the relative positional relationships and movements between components in a specific orientation as shown in the accompanying drawings. If the specific orientation changes, the directional indications will change accordingly. Furthermore, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0069] References to embodiments herein mean that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0070] According to a first embodiment of the present invention, the present invention claims protection for a method of comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery, referring to... Figure 1 ,include:
[0071] S1, Obtain a first image acquisition instruction, the first image acquisition instruction being generated based on the first confirmation operation received by the anesthesiologist's terminal within the preoperative confirmation time window;
[0072] S2, in response to the first image acquisition command, control the first image acquisition unit to acquire the facial region image stream of the subject at a first acquisition frequency, the facial region image stream containing multiple facial frames arranged in chronological order;
[0073] S3, perform a wrinkle feature extraction operation on the current face frame in the face region image stream to obtain a first wrinkle feature parameter set, the first wrinkle feature parameter set containing at least one contour length value and grayscale gradient value of a wrinkle region;
[0074] S4, compare the first set of wrinkle feature parameters with the preset set of reference wrinkle parameters to generate wrinkle change offset;
[0075] S5, based on the wrinkle change offset, determine the first infusion control parameter from the preset control strategy mapping table, the first infusion control parameter including the infusion rate value and the infusion duration;
[0076] S6, Generate a first infusion control command based on the first infusion control parameters. The first infusion control command is used to instruct the first infusion unit to perform a first infusion action, which is used to deliver anesthetic drugs into the recipient's body.
[0077] In this embodiment, a method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery is provided. This method can be applied to an anesthesia workstation deployed in the operating room, an edge computing node connected to a hospital information system, or a cloud server. It has an interface for data communication with an anesthesiologist's terminal, a first image acquisition unit, and a first infusion unit.
[0078] First, the first image acquisition command is obtained. In this implementation, the anesthesiologist's terminal is a mobile workstation equipped with a touchscreen display. This terminal displays an interface within a pre-operative confirmation time window, such as 30 to 5 minutes before the planned surgery time. The interface includes a virtual control labeled "Start Anesthesia Monitoring." After the anesthesiologist completes confirmation operations such as verifying the patient's identity and preparing anesthetic drugs, they click the virtual control, and the anesthesiologist's terminal immediately generates the first image acquisition command. The data structure of this command includes: a command type identifier (e.g., IMG_CAPTURE_START), a command generation timestamp, the anesthesiologist's terminal's device serial number, and the patient's electronic medical record identifier. The anesthesiologist's terminal sends this command via the hospital's intranet or wireless communication network.
[0079] Upon receiving the first image acquisition command, the command is parsed and verified. The parsing process includes extracting the device serial number from the command and comparing it with a pre-registered list of authorized devices to confirm that the anesthesiologist's terminal has operating permissions. After successful verification, in response to the command, the first image acquisition unit is controlled to acquire a stream of facial region images of the subject at a first acquisition frequency. The first image acquisition unit is specifically a high-definition digital camera mounted above the operating table or on the side arm of the anesthesia machine, equipped with autofocus and auto-exposure functions. A configuration command is sent to the camera via a serial communication interface or network interface, containing a first acquisition frequency, such as 15 frames per second, and an image resolution setting, such as 1920×1080 pixels. After the camera begins acquisition, it continuously transmits the facial region image stream back via Real-Time Protocol (RTP). The facial region image stream contains multiple facial frames arranged chronologically, each frame accompanied by an acquisition timestamp and frame number.
[0080] Upon receiving the facial region image stream, a wrinkle feature extraction operation is performed on the current facial frame. This operation is completed by the internally running image processing engine. First, the latest facial frame is read from the image stream buffer and converted from the RGB color space to the grayscale color space to obtain a grayscale image. Then, based on a pre-stored facial wrinkle region template, multiple regions of interest (ROIs) are defined on the grayscale image, such as the glabella region, nasolabial fold region, and forehead wrinkle region. For each ROI, an edge detection algorithm, such as Canny edge detection, is executed to identify boundary points with drastic pixel value changes within the region, forming an edge pixel set. Then, connected component analysis is performed on the edge pixel set to connect adjacent pixels into a continuous edge curve, and the number of pixels contained in the curve is calculated as the contour length value. Simultaneously, the standard deviation of the grayscale values of all pixels within the ROI is calculated as the grayscale gradient value. The contour length value and grayscale gradient value calculated for each ROI are organized into a data structure, namely the first wrinkle feature parameter set, according to a preset order, such as the glabella region, nasolabial fold region, and forehead wrinkle region.
[0081] The first set of wrinkle feature parameters is then compared with a preset baseline set of wrinkle parameters. The baseline set of wrinkle parameters, collected and stored during preoperative preparation, represents the baseline of facial wrinkles in the subject at rest. The comparison process involves retrieving the baseline set of wrinkle parameters associated with the subject from a local database or memory. This baseline set contains the same number of parameter items as the first set of wrinkle feature parameters. The difference between each parameter value in the first set of wrinkle feature parameters and the corresponding parameter value in the baseline set is calculated, resulting in multiple difference items. These difference items are then weighted and summed according to preset weighting coefficients to obtain a scalar value, which serves as the wrinkle change offset. For example, the weight for the change in the contour length of the glabella region is set to 0.4, the weight for the change in the grayscale gradient of the nasolabial fold region is set to 0.3, and the weight for the change in the contour length of the forehead wrinkle region is set to 0.3.
[0082] Based on the calculated fold change offset, the first infusion control parameter is determined from a preset control strategy mapping table. The control strategy mapping table is stored in non-volatile memory as a lookup table. Each row of this mapping table contains an offset range, such as 0-10, 11-20, etc., and a corresponding infusion control parameter entry. The infusion control parameter entry includes the infusion rate value in milliliters per hour and the infusion duration in minutes. The fold change offset is compared with each offset range in the mapping table to determine which range the offset falls into, and then the corresponding infusion rate value and infusion duration are read.
[0083] Finally, a first infusion control command is generated based on the determined first infusion control parameters. The data structure of this command includes: a command type identifier (e.g., INFUSION_CONTROL), the communication address of the target infusion unit, the infusion rate value, the infusion duration, and an execution start timestamp. This command is sent to the first infusion unit via a network communication protocol. The first infusion unit is specifically a medical syringe pump or infusion pump equipped with a communication interface, capable of receiving external commands and executing infusion actions according to the command parameters. After receiving the command, the first infusion unit parses the infusion rate value and infusion duration, drives its internal stepper motor to push the syringe piston at a specified rate, and delivers the anesthetic drug into the recipient's body through the intravenous route.
[0084] Furthermore, referring to Figure 2 Before obtaining the first image acquisition command in step S1, the method further includes:
[0085] Obtain surgical scheduling data, which includes patient identification and surgical type identification;
[0086] According to the surgical type identifier, a reference fold template corresponding to the surgical type identifier is called from a preset fold reference library. The reference fold template includes multiple reference fold regions and a reference contour length range and a reference grayscale gradient range corresponding to each reference fold region.
[0087] During the preoperative preparation stage, the first image acquisition unit is controlled to acquire static facial images of the recipient at a second acquisition frequency;
[0088] Perform a wrinkle feature extraction operation on the static facial image to obtain a static wrinkle feature parameter set. Use the static wrinkle feature parameter set as the preset baseline wrinkle parameter set and bind and store the baseline wrinkle parameter set with the recipient's identity identifier.
[0089] In this embodiment, surgical scheduling data is acquired. Specifically, data is synchronized with the hospital's surgical scheduling system via a database view or an application programming interface (API). The surgical scheduling system automatically pushes the scheduling data for all surgeries of the day to a cached database every morning at midnight. Each surgical scheduling record contains multiple fields: patient identification (e.g., inpatient or outpatient number), patient name, surgical type identification (e.g., daytime thoracic surgery), planned surgical time window (including planned start and end times), surgeon identification, anesthesiologist identification, and operating room number. Upon receiving this data, it is sorted according to the operating room number and planned start time to generate a list of surgical tasks for the day.
[0090] Based on the surgical type identifier, a baseline fold template corresponding to that surgical type identifier is retrieved from a pre-defined fold reference library. This fold reference library, stored on the local disk or external storage server, is pre-established by the system administrator and contains facial fold region divisions and reference parameter ranges for different surgical types. For example, for daytime thoracotomy, the reference fold template specifies three fold regions: the glabellar region, the nasolabial fold region, and the forehead wrinkle region, defining a reference contour length range (e.g., 45-65 pixels for the glabellar region) and a reference grayscale gradient range (e.g., 12-18 for the glabellar region). Using the surgical type identifier as a keyword, a precise match is performed in the fold reference library to retrieve the corresponding baseline fold template.
[0091] Subsequently, during the preoperative preparation phase, the first image acquisition unit is controlled to acquire static facial images of the subject at a second acquisition frequency. The specific timing of the preoperative preparation phase is determined based on the planned surgical time window in the surgical scheduling data, for example, triggering the acquisition operation 20 minutes before the planned start time. The second acquisition frequency is typically lower than the first acquisition frequency, for example, 1 frame per second, with an acquisition duration of 5 seconds, to obtain multiple static images for subsequent optimization. An acquisition command is sent to the first image acquisition unit, specifying the second acquisition frequency, image resolution, and exposure mode, such as automatic exposure. After executing the acquisition, the first image acquisition unit returns multiple static images.
[0092] A wrinkle feature extraction operation is performed on the obtained static facial images to obtain a static wrinkle feature parameter set. The specific process of this extraction operation is consistent with the wrinkle feature extraction operation described in claim 1: each frame of the static image is converted to grayscale, edge detection and connected component analysis are performed within the preset wrinkle region, and contour length and grayscale gradient values are calculated. Since multiple frames of static images are acquired, the parameters calculated for each frame can be averaged to obtain a more stable static wrinkle feature parameter set.
[0093] The static wrinkle feature parameter set is used as the preset baseline wrinkle parameter set, and this baseline wrinkle parameter set is bound and stored with the recipient's identity identifier. The specific binding and storage method is as follows: a baseline parameter table is created in a local relational database. This table contains the following fields: recipient identity identifier primary key, acquisition timestamp, baseline contour length of the glabella region, baseline grayscale gradient of the glabella region, baseline contour length of the nasolabial fold region, baseline grayscale gradient of the nasolabial fold region, baseline contour length of the forehead wrinkle region, and baseline grayscale gradient of the forehead wrinkle region. The calculated parameter values for each region are filled into the corresponding fields to form a complete record. This record will serve as a benchmark for judging wrinkle changes during subsequent intraoperative monitoring. Simultaneously, this baseline wrinkle parameter set is loaded into the memory cache to accelerate access speed for real-time intraoperative comparison.
[0094] Furthermore, referring to Figure 3 S2 includes:
[0095] Parse the first image acquisition command and extract the terminal identifier and current timestamp of the anesthesiologist's terminal;
[0096] Based on the terminal identifier, search the task queue for an anesthesia execution task instance that is bound to the anesthesiologist's terminal, and the anesthesia execution task instance contains the recipient's identity identifier;
[0097] Based on the recipient's identity identifier, obtain the set of reference wrinkle parameters bound to the recipient;
[0098] Send an acquisition parameter configuration instruction to the first image acquisition unit. The acquisition parameter configuration instruction includes the first acquisition frequency, exposure compensation parameters, and focus area coordinates. The focus area coordinates are determined based on the center point coordinates of each fold area in the reference fold parameter set.
[0099] The system receives the facial region image stream returned by the first image acquisition unit according to the acquisition parameter configuration instruction, and performs spatiotemporal alignment processing on the facial region image stream and the reference wrinkle parameter set. The spatiotemporal alignment processing includes establishing a mapping relationship between the timestamp of each facial frame and the acquisition timestamp of the reference wrinkle parameter set.
[0100] In this embodiment, the received first image acquisition command is parsed. The data format of the first image acquisition command adopts a JSON structure, containing multiple key-value pairs. The JSON parser is called to parse the command and extract the following key fields: the value corresponding to the key device_id is the terminal identifier of the anesthesiologist's terminal, such as the terminal serial number ANES-T-01234; the value corresponding to the key timestamp is the current timestamp, such as 2025-03-30T09:15:30.123Z; and the value corresponding to the key patient_id is the patient's identity identifier.
[0101] Based on the extracted terminal identifier, the anesthesia execution task instance bound to the anesthesiologist's terminal is retrieved from the task queue. The task queue is stored in a Redis cache using an ordered set data structure, with the key `anesthesia_task_queue` and each member being a serialized string representing an anesthesia execution task instance. Each anesthesia execution task instance contains the following fields: task instance identifier, recipient identifier, anesthesiologist terminal identifier, planned surgery time window, anesthesia protocol template identifier, and task status: pending, in progress, or completed. Using the terminal identifier as the query condition, the task queue is traversed to find task instances with a pending status and a matching anesthesiologist terminal identifier. If multiple instances are found, the instance with the planned surgery time window closest to the current time is selected.
[0102] The recipient's identity is extracted from the anesthesia execution task instance. Then, based on this identity, the baseline fold parameter set bound to the recipient is queried from the baseline parameter table established in the embodiment of claim 2. The query process is executed using a Structured Query Language (SQL) statement, selecting all baseline fold parameter fields corresponding to the recipient, and loading the query results into memory.
[0103] A configuration command for acquisition parameters is sent to the first image acquisition unit. This command is sent to the first image acquisition unit via a TCP / IP connection in binary or text protocol form. The command includes the following parameters: a first acquisition frequency, for example, 15 frames / second; an exposure compensation parameter, for example, an exposure compensation value of +0.3EV; and the coordinates of the focus area. The coordinates of the focus area are determined by obtaining the center point coordinates of each fold region from a reference fold parameter set. These center point coordinates are automatically calculated and stored by a facial keypoint detection algorithm during preoperative static facial image acquisition. For example, the center point coordinates of the glabella region are 960, 540; the center point coordinates of the nasolabial fold region are 820, 720 and 1100, 720; and the center point coordinates of the forehead wrinkle region are 960, 480. These center point coordinates are clustered to calculate the minimum bounding rectangle, and the coordinates of the upper left and lower right corners of this rectangle are used as the coordinates of the focus area. After receiving the instruction, the first image acquisition unit sets its autofocus area to the rectangular area to ensure that the area remains in clear focus during intraoperative acquisition.
[0104] The system receives a facial region image stream returned by the first image acquisition unit according to the acquisition parameter configuration instructions. The image stream is transmitted via Real-Time Transport Protocol (RTP), and each data packet contains JPEG compressed data of a facial frame and its acquisition timestamp. During reception, spatiotemporal alignment is performed simultaneously. This alignment involves establishing a mapping between the timestamp of each facial frame and the acquisition timestamp of a reference wrinkle parameter set. Specifically, a time offset variable is maintained in memory, calculated by subtracting the timestamp of the first facial frame from the acquisition timestamp of the reference wrinkle parameter set. For each subsequent facial frame, this offset is subtracted from its timestamp to obtain the aligned relative timestamp. This ensures that the current facial frame and the reference wrinkle parameter set are comparable in the time dimension during subsequent wrinkle change comparisons, eliminating errors caused by clock asynchrony.
[0105] Furthermore, referring to Figure 4 S3 includes:
[0106] Obtain the current facial frame, perform grayscale conversion on the current facial frame, and obtain the current grayscale image;
[0107] On the current grayscale image, multiple regions of interest are defined based on the contour position coordinates of each wrinkle region in the reference wrinkle parameter set;
[0108] For each region of interest, perform the following operations: perform edge detection on the pixels within the region of interest to obtain a set of edge pixels; perform connected component analysis on the set of edge pixels to extract continuous edge curves;
[0109] Calculate the number of pixels on the continuous edge curve to obtain the contour length value, and calculate the variance of gray values of all pixels in the region of interest to obtain the gray gradient value.
[0110] The contour length value and grayscale gradient value corresponding to each region of interest are structured and organized to form the first wrinkle feature parameter set. The parameter arrangement order of the first wrinkle feature parameter set is consistent with the parameter arrangement order of the reference wrinkle parameter set.
[0111] In this embodiment, the current face frame is first obtained. The current face frame is the latest frame of image data retrieved from the image stream buffer. This data is stored in memory in a bitmap format such as BMP. Each pixel contains color values for three channels: red, green, and blue. Each channel is an 8-bit integer with a value range of 0 to 255.
[0112] Perform grayscale conversion on the current facial frame. The grayscale conversion uses a weighted average method, multiplying the red, green, and blue channel values of each pixel by preset weight coefficients, such as red weight 0.299, green weight 0.587, and blue weight 0.114 respectively. Then, sum the products to obtain the grayscale value of that pixel. After traversing all pixels of the entire image, a new image is generated, which is the current grayscale image. This grayscale image has the same size as the original image, and each pixel uses an 8-bit integer to represent its grayscale value, ranging from 0 to 255, where 0 represents black and 255 represents white.
[0113] On the current grayscale image, multiple regions of interest (ROIs) are defined based on the contour coordinates of each fold region in the baseline fold parameter set. The contour coordinates stored in the baseline fold parameter set are determined during the preoperative preparation stage through manual annotation or automatic detection. Specifically, each fold region is represented by a set of polygon vertex coordinates, and the area enclosed by this polygon is the ROI. The polygon vertex coordinate set of each fold region is traversed, and a rasterization algorithm is used on the current grayscale image to mark all pixels within that polygon as belonging to that ROI. For each pixel, its corresponding ROI number is also recorded.
[0114] For each region of interest, perform the following sequence of operations:
[0115] First, edge detection is performed on the pixels within the region of interest. Using the Sobel operator or a similar first-order differential operator, the gradient magnitudes in the horizontal and vertical directions are calculated for each pixel. For each pixel, the sum of the squares and the square root of the vertical gradient magnitudes are taken to obtain the edge strength value. An edge strength threshold is set, and pixels with edge strength values greater than this threshold are marked as edge pixels. All edge pixels constitute the edge pixel set of the region of interest.
[0116] Second, perform connected component analysis on the edge pixel set. Using a binary image connected component labeling algorithm, such as the two-pass scanning method, adjacent four- or eight-connected edge pixels are divided into the same connected component. Each connected component corresponds to one or more continuous edge curves. The edge pixels within each connected component are then sorted to form ordered curve paths.
[0117] Third, after extracting the continuous edge curve, calculate the contour length of the continuous edge curve. The contour length is calculated by accumulating the Euclidean distance between every two adjacent pixels along the curve path to obtain the total length. Since pixel coordinates are discrete, the Euclidean distance between adjacent pixels may be 1 or √2. After accumulating all distances, a floating-point number is obtained, which is the contour length of the curve, in pixels.
[0118] Fourth, calculate the variance of grayscale values for all pixels within the region of interest. Iterate through all pixels within the region of interest, summing the grayscale value of each pixel and dividing by the total number of pixels to obtain the average grayscale value. Then, calculate the squared difference between the grayscale value of each pixel and the average value, summing these differences and dividing by the total number of pixels to obtain the variance of the grayscale values. This variance value serves as the grayscale gradient value, reflecting the degree of grayscale variation within the region, i.e., the roughness of the texture.
[0119] The contour length and grayscale gradient values corresponding to each region of interest are structured to form the first wrinkle feature parameter set. Specifically, an array or list is created where the first element is the contour length value of the glabella region, the second element is the grayscale gradient value of the glabella region, the third element is the contour length value of the nasolabial fold region, the fourth element is the grayscale gradient value of the nasolabial fold region, the fifth element is the contour length value of the forehead wrinkle region, and the sixth element is the grayscale gradient value of the forehead wrinkle region. The parameter arrangement order is completely consistent with the parameter arrangement order in the baseline wrinkle parameter set, ensuring that subsequent comparison operations can correspond item by item.
[0120] Further, S4 includes:
[0121] Obtain the reference wrinkle parameter set, which includes multiple reference wrinkle regions and the reference contour length value and reference grayscale gradient value corresponding to each reference wrinkle region;
[0122] The difference between the first contour length value in the first set of fold feature parameters and the corresponding reference contour length value in the set of reference fold parameters is calculated to obtain the contour length offset.
[0123] The difference between the first gray-level gradient value in the first set of wrinkle feature parameters and the corresponding reference gray-level gradient value in the reference set of wrinkles is calculated to obtain the gray-level gradient offset.
[0124] The contour length offset and the grayscale gradient offset are weighted and combined according to a preset weighting coefficient to generate a comprehensive offset index, which is then used as the wrinkle change offset.
[0125] In this embodiment, a preset set of baseline wrinkle parameters is first obtained. This set of baseline wrinkle parameters is stored in a memory cache, with the recipient's identity as the key and a structured data object as the value. This structured data object contains multiple fields: baseline contour length of the glabella region (e.g., 52.3), baseline grayscale gradient of the glabella region (e.g., 14.7), baseline contour length of the nasolabial fold region (e.g., 78.5), baseline grayscale gradient of the nasolabial fold region (e.g., 16.2), baseline contour length of the forehead wrinkle region (e.g., 45.1), and baseline grayscale gradient of the forehead wrinkle region (e.g., 13.8). These values have been calculated and stored during the preoperative preparation stage.
[0126] The difference between the first contour length value in the first fold feature parameter set and the corresponding reference contour length value in the reference fold parameter set is calculated. Specifically, for the glabella region, the contour length value of the glabella region in the first fold feature parameter set is read, for example, 68.9, and the reference glabella region contour length value of 52.3 is subtracted to obtain the glabella region contour length offset of 16.6. For the nasolabial fold region, the contour length value of the nasolabial fold region in the first fold feature parameter set is read, for example, 85.2, and the reference nasolabial fold region contour length value of 78.5 is subtracted to obtain the nasolabial fold region contour length offset of 6.7. The same operation is performed for the forehead wrinkle region to obtain the forehead wrinkle region contour length offset.
[0127] The difference between the first gray-level gradient value in the first wrinkle feature parameter set and the corresponding reference gray-level gradient value in the reference wrinkle parameter set is calculated. For the glabella region, the gray-level gradient value of the glabella region in the first wrinkle feature parameter set is read, for example, 21.3, and the reference gray-level gradient value of the glabella region, 14.7, is subtracted to obtain a gray-level gradient offset of 6.6. For the nasolabial fold region, the gray-level gradient value of the nasolabial fold region in the first wrinkle feature parameter set is read, for example, 18.5, and the reference gray-level gradient value of the nasolabial fold region, 16.2, is subtracted to obtain a gray-level gradient offset of 2.3. The same operation is performed on the forehead wrinkle region to obtain the gray-level gradient offset of the forehead wrinkle region.
[0128] The calculated contour length offset and grayscale gradient offset are weighted and combined according to preset weighting coefficients to generate a comprehensive offset index. These weighting coefficients are preset by the system administrator based on clinical experience and stored in a configuration file. For example, the weighting coefficients are set as follows: contour length offset of the glabella region 0.2, grayscale gradient offset of the glabella region 0.2, contour length offset of the nasolabial fold region 0.15, grayscale gradient offset of the nasolabial fold region 0.15, contour length offset of the forehead wrinkle region 0.15, and grayscale gradient offset of the forehead wrinkle region 0.15. The sum of all weighting coefficients is 1. Each offset is multiplied by its corresponding weighting coefficient, and all products are summed to obtain a floating-point number, i.e., the comprehensive offset index. For example, the comprehensive offset index = 16.6 × 0.2 + 6.6 × 0.2 + 6.7 × 0.15 + 2.3 × 0.15 + corresponding forehead wrinkle region offset × 0.15 + corresponding forehead wrinkle region grayscale gradient offset × 0.15. The composite offset index is the offset amount of the fold change.
[0129] The offset of the wrinkle change is a dimensionless scalar value that reflects the overall degree of change in the current facial wrinkle state relative to the preoperative baseline state. The larger the offset, the more obvious the facial wrinkles, such as frowning and facial muscle contraction.
[0130] Further, S5 includes:
[0131] Obtain the preset control strategy mapping table, which contains multiple offset intervals and input control parameter entries corresponding to each offset interval;
[0132] The wrinkle change offset is matched with multiple offset intervals in the control strategy mapping table to determine the target offset interval where the wrinkle change offset is located.
[0133] Read the target infusion control parameter entry corresponding to the target offset interval from the control strategy mapping table. The target infusion control parameter entry includes the infusion rate value and the infusion duration.
[0134] The infusion rate value and the infusion duration are determined as the first infusion control parameters.
[0135] In this embodiment, a preset control strategy mapping table is first obtained. This control strategy mapping table is stored in non-volatile memory as an XML file or a database table. This mapping table is predefined by the system administrator during system deployment based on clinical guidelines and expert experience, and contains multiple entries. The data structure of each entry is as follows: lower bound of the offset interval, upper bound of the offset interval, infusion rate value, and infusion duration. For example, the first entry: lower bound 0, upper bound 10, infusion rate value 5, infusion duration 10; the second entry: lower bound 11, upper bound 20, infusion rate value 8, infusion duration 15; the third entry: lower bound 21, upper bound 30, infusion rate value 12, infusion duration 20; and so on. The offset interval is a left-closed and right-closed interval, i.e., it includes both the lower and upper bounds.
[0136] The wrinkle change offset calculated in claim 5, for example 18.3, is matched with multiple offset intervals in the control strategy mapping table. The matching process uses a sequential comparison method: starting from the first entry in the mapping table, it is sequentially determined whether the wrinkle change offset is greater than or equal to the lower bound of the entry and less than or equal to the upper bound of the entry. For the wrinkle change offset 18.3, it is compared with the interval 0-10 of the first entry, and 18.3 is not in this interval; it is compared with the interval 11-20 of the second entry, and 18.3 is greater than or equal to 11 and less than or equal to 20, so the match is successful, and it is determined that the wrinkle change offset is within the target offset interval of the second entry.
[0137] Read the target infusion control parameter entry corresponding to the target offset range from the control strategy mapping table. In this entry, the infusion rate is 8 ml / h and the infusion duration is 15 minutes. Use these values as the target infusion control parameter entry.
[0138] The infusion rate and infusion duration are determined as the first infusion control parameters. During the determination process, the parameters are also validated for validity. Validity checks include: verifying whether the infusion rate is within the minimum and maximum rate range supported by the infusion unit, for example, 0.1 ml / h to 50 ml / h; and verifying whether the infusion duration is within the preset safe duration range, for example, 1 minute to 60 minutes. If the validation passes, these parameters are encapsulated into an instruction data packet; if the validation fails, default safe parameters are used, such as a default infusion rate of 3 ml / h and a default duration of 10 minutes, and an exception log record is generated for subsequent system auditing.
[0139] Furthermore, the method also includes:
[0140] During the execution of the first infusion control command, subsequent facial frames are continuously acquired, and wrinkle feature extraction operations are performed on the subsequent facial frames to obtain a second wrinkle feature parameter set.
[0141] The second set of wrinkle feature parameters is compared with the reference set of wrinkle parameters to generate an updated wrinkle change offset.
[0142] Determine whether the updated wrinkle change offset exceeds the boundary value of the target offset range;
[0143] When the boundary value of the target offset range is exceeded, the second infusion control parameter is re-determined from the control strategy mapping table according to the updated wrinkle change offset, and a second infusion control instruction is generated. The second infusion control instruction is used to instruct the first infusion unit to adjust the infusion parameter to the second infusion control parameter.
[0144] In this embodiment, during the execution of the first infusion control command, subsequent facial frames are continuously acquired. Specifically, an image stream receiving thread is maintained, which continuously receives facial region image streams from the first image acquisition unit and sequentially places the received facial frames into a circular buffer. The size of the circular buffer is set to 300 frames, capable of storing approximately 20 seconds of image data at a rate of 15 frames per second. Simultaneously, a separate feature extraction thread is started, which reads the latest facial frame from the circular buffer at fixed intervals, for example, every 2 seconds, and processes it as a subsequent facial frame.
[0145] The feature extraction thread performs wrinkle feature extraction on subsequent facial frames to obtain a second wrinkle feature parameter set. This extraction operation is exactly the same as that described in claim 4: grayscale conversion, region of interest delineation, edge detection, connected component analysis, and calculation of contour length and grayscale gradient values. Finally, a second wrinkle feature parameter set with the same structure as the first wrinkle feature parameter set is obtained, containing the contour length and grayscale gradient values of each wrinkle region.
[0146] The second set of wrinkle feature parameters is compared with the baseline set of wrinkle parameters to generate an updated wrinkle change offset. The comparison method is exactly the same as that described in claim 5: the differences between each parameter are calculated, and a weighted sum is obtained to obtain a comprehensive offset index. This updated wrinkle change offset reflects the latest degree of change in the recipient's facial wrinkle state relative to the preoperative baseline at the current time point.
[0147] Determine if the updated wrinkle change offset exceeds the boundary value of the target offset interval. The target offset interval is the interval matched from the control strategy mapping table when the input parameters were previously determined. Store the currently active target offset interval variable in memory, including its lower and upper bounds. For example, the current target offset interval is 11 to 20. Obtain the updated wrinkle change offset, for example, 25.6, and compare it with the lower bound of 11 and the upper bound of 20. Since 25.6 is greater than 20, it exceeds the upper bound and is therefore determined to exceed the boundary value of the target offset interval.
[0148] When the boundary value is exceeded, the second infusion control parameters are re-determined from the control strategy mapping table based on the updated wrinkle change offset. Specifically, the mapping query process described in claim 6 is executed again to match the updated wrinkle change offset 25.6 with each interval in the control strategy mapping table. This offset falls within interval 21-30, corresponding to an infusion rate of 12 ml / h and an infusion duration of 20 minutes. These parameters are then determined as the second infusion control parameters.
[0149] A second infusion control command is generated. The data structure of the second infusion control command is the same as the first infusion control command, including a command type identifier, the communication address of the target infusion unit, the infusion rate value, the infusion duration, and the execution start timestamp. This command is sent to the first infusion unit, instructing it to adjust the infusion parameters to the second infusion control parameters. Upon receiving the command, the first infusion unit smoothly adjusts the stepper motor speed during the current infusion process, gradually changing the infusion rate from the current value to the new target rate value, avoiding sudden changes in the infusion rate that could affect the recipient.
[0150] Furthermore, the method also includes:
[0151] During the execution of the first infusion control command, an analgesia intervention request is obtained, which is generated based on the analgesia confirmation operation received by the anesthesiologist's terminal in the intraoperative observation window.
[0152] In response to the analgesia intervention request, the second image acquisition unit is controlled to acquire a close-up image stream of the recipient's facial region at a third acquisition frequency, wherein the field of view of the close-up image stream of the facial region is smaller than the field of view of the facial region image stream.
[0153] A wrinkle texture analysis operation is performed on the current close-up frame in the close-up image stream of the facial region to obtain a texture complexity parameter. The texture complexity parameter is obtained by statistically analyzing the contrast value of the gray-level co-occurrence matrix in the close-up frame.
[0154] The texture complexity parameter is compared with a preset analgesia trigger threshold;
[0155] When the texture complexity parameter exceeds the analgesia trigger threshold, an analgesia control command is generated. The analgesia control command is used to instruct the second infusion unit to perform analgesia infusion action, which is used to deliver analgesic drugs into the recipient's body.
[0156] In this embodiment, an analgesia intervention request is acquired during the execution of the first infusion control command. The analgesia intervention request is generated by an analgesia confirmation operation received by the anesthesiologist's terminal within the intraoperative observation window. The intraoperative observation window is a dedicated interface displayed on the anesthesiologist's terminal, showing the patient's vital signs, infusion status, and facial image in real time. The interface includes a virtual button labeled "Analgesia Intervention." When the anesthesiologist observes a potential pain response in the patient, such as facial tension or frowning, they click this button, and the anesthesiologist's terminal immediately generates an analgesia intervention request. The data structure of this request includes: a request type identifier (e.g., ANALGESIA_REQUEST), a request generation timestamp, an anesthesiologist's terminal identifier, and a patient identification identifier. The anesthesiologist's terminal sends this request via the hospital's local area network.
[0157] In response to the analgesia intervention request, the second image acquisition unit is controlled to acquire a stream of close-up images of the recipient's facial region at a third acquisition frequency. The second image acquisition unit and the first image acquisition unit can be different operating modes of the same physical device, or they can be a separately installed dedicated close-up camera. The third acquisition frequency is higher than the first acquisition frequency, for example, 30 frames per second, to capture more subtle changes in facial texture. The field of view of the close-up facial region image stream is smaller than that of the first image acquisition unit, for example, focusing only on the glabella or nasolabial folds, to improve image resolution and texture detail. Configuration instructions are sent to the second image acquisition unit, specifying the third acquisition frequency, a higher image resolution (e.g., 3840×2160 pixels), and a fixed focusing distance (e.g., 30 cm), to ensure the clarity of the close-up images.
[0158] A wrinkle texture analysis operation is performed on the current close-up frame in the received close-up image stream of the facial region. The wrinkle texture analysis operation first converts the close-up frame into a grayscale image, and then calculates the gray-level co-occurrence matrix (GLCM) of that close-up frame. The GLCM is constructed by statistically analyzing the frequency of grayscale value pairs at a specific direction (e.g., 0 degrees, horizontal) and a specific distance (e.g., one pixel). The grayscale value range is quantized into 16 levels to reduce computational complexity. All pixels in the image are traversed. For each pixel, its right-hand neighbor is found, the grayscale level combination of these two pixels is recorded, and the corresponding position in a 16×16 matrix is incremented by 1. After traversal, each element in the matrix is divided by the total number of pixel pairs to obtain the normalized GLCM.
[0159] The texture complexity parameter is calculated based on the gray-level co-occurrence matrix. Specifically, the contrast value of the gray-level co-occurrence matrix is calculated. The formula for contrast is conceptually as follows: for each element in the matrix, its value is multiplied by the square of the gray-level difference corresponding to that element, and then the sum is applied to all elements. This contrast value reflects the sharpness of the image texture and the depth of the grooves; a higher contrast value indicates a coarser texture and more pronounced wrinkles. This contrast value is used as the texture complexity parameter.
[0160] The texture complexity parameter is compared to a preset analgesia trigger threshold. The analgesia trigger threshold is a preset floating-point number stored in a configuration file, for example, set to 1250. This threshold is calibrated based on clinical experience and device characteristics. The system then determines whether the texture complexity parameter exceeds this threshold. If it does, it indicates that the recipient's facial wrinkles have reached the preset level of pain response.
[0161] When the texture complexity parameter exceeds the analgesia trigger threshold, an analgesia control command is generated. The data structure of this command includes: a command type identifier (e.g., ANALGESIA_CONTROL), the communication address of the second infusion unit, and analgesic drug infusion parameters, including the initial infusion rate, maintenance infusion rate, and total infusion duration. This command is sent to the second infusion unit via the network, and the second infusion unit executes the analgesic infusion, delivering the analgesic drug into the recipient's body.
[0162] Furthermore, the method also includes:
[0163] During the execution of the analgesia control command, the close-up image stream of the facial region is continuously acquired, and a temporal analysis operation is performed on multiple consecutive close-up frames in the close-up image stream of the facial region to obtain a temporal texture change curve.
[0164] Calculate the slope of texture change within the current time window based on the temporal texture change curve;
[0165] The slope of the texture change is compared with a preset slope decrease threshold;
[0166] When the absolute value of the slope of the texture change is less than the slope decrease threshold, an analgesia maintenance command is generated, which is used to instruct the second infusion unit to continue infusion at the current infusion rate;
[0167] When the slope of the texture change is negative and its absolute value is greater than the slope decrease threshold, an analgesia reduction instruction is generated. The analgesia reduction instruction is used to instruct the second infusion unit to reduce the infusion rate according to a preset reduction step size.
[0168] In this embodiment, during the execution of analgesia control commands, a continuous stream of close-up images of the facial region is acquired. This close-up image stream is continuously provided by a second image acquisition unit at a third acquisition frequency, and the close-up frames are stored sequentially into a dedicated buffer.
[0169] A temporal analysis operation is performed on multiple consecutive close-up frames in the received close-up image stream of the facial region to obtain a temporal texture change curve. Specifically, for each received close-up frame, the texture complexity parameter, i.e., the contrast value of the gray-level co-occurrence matrix, is calculated according to the wrinkle texture analysis operation described in claim 8. The timestamp of each close-up frame and its corresponding texture complexity parameter are grouped into a data point, and these data points are connected in chronological order to form a temporal texture change curve. This curve is stored in a circular queue in memory, with a queue length set to 300 data points, corresponding to approximately 10 seconds of data calculated at 30 frames / second.
[0170] Based on the temporal texture change curve, the slope of texture change within the current time window is calculated. The width of the current time window is preset to 5 seconds, meaning it includes the most recent 150 data points calculated at 30 frames per second. A linear fit is performed on the data points within this time window: using the timestamp as the independent variable and the texture complexity parameter as the dependent variable, the slope of the fitted line is calculated using the least squares method. In the specific implementation, the mean of the timestamps, the mean of the texture complexity parameter, and their covariance and time variance are calculated. The covariance is divided by the variance to obtain the slope value. This slope value reflects the rate and direction of change of the texture complexity parameter over time within the current time window. A positive slope indicates that the texture complexity is increasing, and a negative slope indicates that the texture complexity is decreasing.
[0171] The slope of the texture change is compared with a preset slope decrease threshold. The slope decrease threshold is a preset negative number stored in the configuration file, for example, set to -10, which means the texture complexity decreases by 10 units per second. This threshold indicates that when the texture complexity decreases at a sufficiently fast rate, it can be determined that the analgesic drug has taken effect and the recipient's pain response is being relieved.
[0172] When the absolute value of the texture change slope is less than the slope decrease threshold, i.e., the slope value is close to zero (e.g., -2), it indicates that the texture complexity changes slowly and the analgesic effect is maintained stably. At this time, an analgesia maintenance command is generated. The data structure of the analgesia maintenance command includes a command type identifier (e.g., ANALGESIA_MAINTAIN), the communication address of the second infusion unit, and an identifier field instructing the second infusion unit to continue infusion at the current infusion rate. After receiving the command, the second infusion unit keeps the stepper motor speed constant, maintaining the current infusion rate.
[0173] When the slope of the texture change is negative and its absolute value is greater than the slope decrease threshold (i.e., the slope value is less than -10, for example -15), it indicates a rapid decrease in texture complexity, suggesting a possible overdose of analgesics or significant pain relief for the recipient. In this case, an analgesic dose reduction instruction is generated. The data structure of the analgesic dose reduction instruction includes an instruction type identifier (e.g., ANALGESIA_REDUCE), the communication address of the second infusion unit, and a dose reduction step size (e.g., 1 ml per hour). The dose reduction step size is preset by the system administrator in the configuration file. After receiving the instruction, the second infusion unit subtracts the dose reduction step size from the current infusion rate to obtain a new infusion rate and adjusts the stepper motor speed to the new rate. If the new infusion rate is lower than the minimum safe infusion rate, the minimum safe infusion rate is maintained.
[0174] Furthermore, the method also includes:
[0175] Obtain a regulatory retrospective request, wherein the regulatory retrospective request includes the target subject identifier and the retrospective time range;
[0176] Based on the target recipient identifier, obtain the image storage address set associated with the recipient from the storage node, the image storage address set containing the storage addresses of multiple facial frames collected within the retrospective time interval;
[0177] Based on the image storage address set, read the multiple facial frames and the corresponding wrinkle feature parameter set snapshots from the storage node;
[0178] The multiple facial frames are arranged in chronological order to generate video stream data. The snapshot of the wrinkle feature parameter set is overlaid and annotated with the corresponding facial frames to generate a visual retrospective interface. The visual retrospective interface is then returned to the monitoring terminal for display.
[0179] In this embodiment, a regulatory retrospective request is obtained. This request is initiated by a regulatory terminal, such as a quality control workstation in the hospital's anesthesiology department or a review terminal in the medical affairs department. The regulatory terminal sends an HTTP POST request via the hospital's internal network. The request body is in JSON format and includes the following fields: a request type identifier (e.g., AUDIT_REPLAY), a target recipient identifier (e.g., hospital number 123456), and a retrospective time range including a start timestamp and an end timestamp. The request also includes the identity identifier and digital signature of the regulatory personnel initiating the request for authorization verification.
[0180] Upon receiving the request, authorization verification is performed first. This verification includes checking if the supervisor's identity is on the authorized personnel list and verifying the validity of the digital signature. If verification is successful, based on the target recipient's identity, the set of image storage addresses associated with that recipient is retrieved from the storage node. The storage node can be a distributed object storage system such as MinIO or a network-attached storage device. An image index table is maintained in the database. Each record in this table contains: recipient identity, image acquisition timestamp, image storage address (e.g., bucket name and object key), and the associated snapshot storage address of the fold feature parameter set. A structured query language query is executed to select all records where the recipient identity matches and the image acquisition timestamp falls within the backtracking time interval. The image storage addresses from these records are then retrieved to form the image storage address set.
[0181] Based on the set of image storage addresses, multiple facial frames and a snapshot of the wrinkle feature parameter set corresponding to each facial frame are read from the storage nodes. Specifically, each address in the set of image storage addresses is traversed, and a GET request is sent to the object storage system to obtain the corresponding image file in JPEG or PNG format and the wrinkle feature parameter set snapshot file in JSON format. The wrinkle feature parameter set snapshot file records the complete data of the first or second wrinkle feature parameter set calculated at the time of facial frame acquisition.
[0182] Multiple facial frames are read and arranged chronologically to generate a video stream. The video stream generation process involves using a video encoding library such as FFmpeg to encode multiple consecutive facial frames into an H.264 format video stream, setting appropriate frame rates and bit rates to generate an MP4 format video file. Simultaneously, a snapshot of the wrinkle feature parameter set is overlaid and annotated with the corresponding facial frames. The overlay annotation process is as follows: For each facial frame, an image canvas is created, and the original facial frame is drawn at the bottom layer; then a semi-transparent layer is overlaid on this frame, displaying the contour length value and grayscale gradient value of the corresponding wrinkle area in text form; simultaneously, the timestamp of the frame and the calculated wrinkle change offset are displayed at the top or bottom of the image. The annotated image frame replaces the original frame and is encoded into the video stream.
[0183] The final generated visual retrospective interface, i.e., the labeled video stream file, is returned to the monitoring terminal for display. The return method can be either by transmitting the video file as an attachment via an HTTP response, or by generating a temporary access URL for online playback in a web browser on the monitoring terminal. Monitoring personnel can visually view the real-time changes in facial folds and corresponding anesthesia / analgesia control parameters throughout the entire surgical process in this visual retrospective interface, for postoperative review, quality analysis, or teaching and training.
[0184] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0185] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0186] The specific embodiments of the invention have been described in detail above, but they are only examples, and this application is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications or substitutions to the invention are also within the scope of this application. Therefore, all equivalent changes, modifications, and improvements made without departing from the spirit and principles of this application should be covered within the scope of this application.
Claims
1. A method for comfortable anesthesia and controlled-release analgesia for daytime thoracic surgery, characterized in that, include: S1, Obtain a first image acquisition instruction, the first image acquisition instruction being generated based on the first confirmation operation received by the anesthesiologist's terminal within the preoperative confirmation time window; S2, in response to the first image acquisition command, control the first image acquisition unit to acquire the facial region image stream of the subject at a first acquisition frequency, the facial region image stream containing multiple facial frames arranged in chronological order; S3, perform a wrinkle feature extraction operation on the current face frame in the face region image stream to obtain a first wrinkle feature parameter set, the first wrinkle feature parameter set containing at least one contour length value and grayscale gradient value of a wrinkle region; S4, compare the first set of wrinkle feature parameters with the preset set of reference wrinkle parameters to generate wrinkle change offset; S5, based on the wrinkle change offset, determine the first infusion control parameter from the preset control strategy mapping table, the first infusion control parameter including the infusion rate value and the infusion duration; S6, Generate a first infusion control command based on the first infusion control parameters. The first infusion control command is used to instruct the first infusion unit to perform a first infusion action, which is used to deliver anesthetic drugs into the recipient's body.
2. The method according to claim 1, characterized in that, Before obtaining the first image acquisition command in step S1, the method further includes: Obtain surgical scheduling data, which includes patient identification and surgical type identification; According to the surgical type identifier, a reference fold template corresponding to the surgical type identifier is called from a preset fold reference library. The reference fold template includes multiple reference fold regions and a reference contour length range and a reference grayscale gradient range corresponding to each reference fold region. During the preoperative preparation stage, the first image acquisition unit is controlled to acquire static facial images of the recipient at a second acquisition frequency; Perform a wrinkle feature extraction operation on the static facial image to obtain a static wrinkle feature parameter set. Use the static wrinkle feature parameter set as the preset baseline wrinkle parameter set and bind and store the baseline wrinkle parameter set with the recipient's identity identifier.
3. The method according to claim 2, characterized in that, S2 includes: Parse the first image acquisition command and extract the terminal identifier and current timestamp of the anesthesiologist's terminal; Based on the terminal identifier, search the task queue for an anesthesia execution task instance that is bound to the anesthesiologist's terminal, and the anesthesia execution task instance contains the recipient's identity identifier; Based on the recipient's identity identifier, obtain the set of reference wrinkle parameters bound to the recipient; Send an acquisition parameter configuration instruction to the first image acquisition unit. The acquisition parameter configuration instruction includes the first acquisition frequency, exposure compensation parameters, and focus area coordinates. The focus area coordinates are determined based on the center point coordinates of each fold area in the reference fold parameter set. The system receives the facial region image stream returned by the first image acquisition unit according to the acquisition parameter configuration instruction, and performs spatiotemporal alignment processing on the facial region image stream and the reference wrinkle parameter set. The spatiotemporal alignment processing includes establishing a mapping relationship between the timestamp of each facial frame and the acquisition timestamp of the reference wrinkle parameter set.
4. The method according to claim 3, characterized in that, The S3 includes: Obtain the current facial frame, perform grayscale conversion on the current facial frame, and obtain the current grayscale image; On the current grayscale image, multiple regions of interest are defined based on the contour position coordinates of each wrinkle region in the reference wrinkle parameter set; For each region of interest, perform the following operations: perform edge detection on the pixels within the region of interest to obtain a set of edge pixels; perform connected component analysis on the set of edge pixels to extract continuous edge curves; Calculate the number of pixels on the continuous edge curve to obtain the contour length value, and calculate the variance of gray values of all pixels in the region of interest to obtain the gray gradient value. The contour length value and grayscale gradient value corresponding to each region of interest are structured and organized to form the first wrinkle feature parameter set. The parameter arrangement order of the first wrinkle feature parameter set is consistent with the parameter arrangement order of the reference wrinkle parameter set.
5. The method according to claim 1, characterized in that, The S4 includes: Obtain the reference wrinkle parameter set, which includes multiple reference wrinkle regions and the reference contour length value and reference grayscale gradient value corresponding to each reference wrinkle region; The difference between the first contour length value in the first set of fold feature parameters and the corresponding reference contour length value in the set of reference fold parameters is calculated to obtain the contour length offset. The difference between the first gray-level gradient value in the first set of wrinkle feature parameters and the corresponding reference gray-level gradient value in the reference set of wrinkles is calculated to obtain the gray-level gradient offset. The contour length offset and the grayscale gradient offset are weighted and combined according to a preset weighting coefficient to generate a comprehensive offset index, which is then used as the wrinkle change offset.
6. The method according to claim 5, characterized in that, The S5 includes: Obtain the preset control strategy mapping table, which contains multiple offset intervals and input control parameter entries corresponding to each offset interval; The wrinkle change offset is matched with multiple offset intervals in the control strategy mapping table to determine the target offset interval where the wrinkle change offset is located. Read the target infusion control parameter entry corresponding to the target offset interval from the control strategy mapping table. The target infusion control parameter entry includes the infusion rate value and the infusion duration. The infusion rate value and the infusion duration are determined as the first infusion control parameters.
7. The method according to claim 6, characterized in that, The method further includes: During the execution of the first infusion control command, subsequent facial frames are continuously acquired, and wrinkle feature extraction operations are performed on the subsequent facial frames to obtain a second wrinkle feature parameter set. The second set of wrinkle feature parameters is compared with the reference set of wrinkle parameters to generate an updated wrinkle change offset. Determine whether the updated wrinkle change offset exceeds the boundary value of the target offset range; When the boundary value of the target offset range is exceeded, the second infusion control parameter is re-determined from the control strategy mapping table according to the updated wrinkle change offset, and a second infusion control instruction is generated. The second infusion control instruction is used to instruct the first infusion unit to adjust the infusion parameter to the second infusion control parameter.
8. The method according to claim 1, characterized in that, The method further includes: During the execution of the first infusion control command, an analgesia intervention request is obtained, which is generated based on the analgesia confirmation operation received by the anesthesiologist's terminal in the intraoperative observation window. In response to the analgesia intervention request, the second image acquisition unit is controlled to acquire a close-up image stream of the recipient's facial region at a third acquisition frequency, wherein the field of view of the close-up image stream of the facial region is smaller than the field of view of the facial region image stream. A wrinkle texture analysis operation is performed on the current close-up frame in the close-up image stream of the facial region to obtain a texture complexity parameter. The texture complexity parameter is obtained by statistically analyzing the contrast value of the gray-level co-occurrence matrix in the close-up frame. The texture complexity parameter is compared with a preset analgesia trigger threshold; When the texture complexity parameter exceeds the analgesia trigger threshold, an analgesia control command is generated. The analgesia control command is used to instruct the second infusion unit to perform analgesia infusion action, which is used to deliver analgesic drugs into the recipient's body.
9. The method according to claim 8, characterized in that, The method further includes: During the execution of the analgesia control command, the close-up image stream of the facial region is continuously acquired, and a temporal analysis operation is performed on multiple consecutive close-up frames in the close-up image stream of the facial region to obtain a temporal texture change curve. Calculate the slope of texture change within the current time window based on the temporal texture change curve; The slope of the texture change is compared with a preset slope decrease threshold; When the absolute value of the slope of the texture change is less than the slope decrease threshold, an analgesia maintenance command is generated, which is used to instruct the second infusion unit to continue infusion at the current infusion rate; When the slope of the texture change is negative and its absolute value is greater than the slope decrease threshold, an analgesia reduction instruction is generated. The analgesia reduction instruction is used to instruct the second infusion unit to reduce the infusion rate according to a preset reduction step size.
10. The method according to claim 1, characterized in that, The method further includes: Obtain a regulatory retrospective request, wherein the regulatory retrospective request includes the target subject identifier and the retrospective time range; Based on the target recipient identifier, obtain the image storage address set associated with the recipient from the storage node, the image storage address set containing the storage addresses of multiple facial frames collected within the retrospective time interval; Based on the image storage address set, read the multiple facial frames and the corresponding wrinkle feature parameter set snapshots from the storage node; The multiple facial frames are arranged in chronological order to generate video stream data. The snapshot of the wrinkle feature parameter set is overlaid and annotated with the corresponding facial frames to generate a visual retrospective interface. The visual retrospective interface is then returned to the monitoring terminal for display.