A control method for oxygen output device, electronic device and storage medium
By obtaining and analyzing the user's blood oxygen saturation data and adjusting the parameters of the oxygen output device in combination with the classification model, the problem of difficult equipment to dynamically adjust is solved, improving the oxygen absorption effect and reducing health risks.
Patent Information
- Application Number
- CN202411760327.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-12-03
AI Technical Summary
It is difficult for household oxygen output devices to dynamically adjust the output oxygen parameters according to the physical signs of different users and the needs of different periods of time, resulting in the risk of oxygen poisoning or hypoxia.
By obtaining the target user's historical blood oxygen saturation data, calculating the blood oxygen saturation deviation, and combining the preset classification model, determine whether to issue a prompt message to adjust the operating parameters of the oxygen output device.
It is achieved dynamic adjustment of the operating status of the oxygen output equipment according to the physical signs of different users and different periods of time, improving the oxygen absorption effect and avoiding the risks of oxygen poisoning and hypoxia.
Smart Images

Figure CN119596701B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oxygen output device control, and in particular to a control method, electronic device and storage medium of oxygen output device. Background Art
[0002] Home oxygen output equipment, especially home oxygen concentrators, plays an increasingly important role in modern families. Usually, the parameters of oxygen output equipment are set by the user and always run at the same parameters. However, different users have different physical signs, and users with different physical signs have different tolerance to oxygen. In addition, the oxygen consumption of the same user is different at different times of the day, such as the oxygen demand increases during physical activities, while the oxygen demand decreases after falling asleep. If the physical signs of different types of users and different time periods are not taken into account, and a fixed parameter is maintained from beginning to end to output oxygen, it may cause the user to over-inhale oxygen, causing oxygen poisoning that harms the user's lungs, eyes, nerve function, and even threatens life. It may also cause the user to inhale insufficient oxygen, causing hypoxia that endangers the user's life. Therefore, how to control the operation of oxygen output equipment according to the physical signs of different types of users and different time periods has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is:
[0004] According to a first aspect of the present application, a control method for an oxygen output device is provided, the method comprising the following steps:
[0005] S100, obtaining the blood oxygen saturation group of the target user in the preset time period of each day in the historical time period, so as to obtain the blood oxygen saturation group list A corresponding to the target user = (A1, A2, ..., A i , …, A n ), i=1, 2,..., n; among them, A i is the preset time period T of the target user on the i-th day in the historical time period i The corresponding blood oxygen saturation group, n is the number of days corresponding to the historical time period; A i =(A i,1 , A i,2 , …, A i,j , …, A i,m ), j = 1, 2, ..., m; A i,j For target users in T i The blood oxygen saturation group at the jth preset time in T i The number of preset moments in the i,j =(A i,j _1, A i,j _2); A i,j_1 is the target user in T i The blood oxygen saturation of the first side at the jth preset moment within i,j _2 is the target user in T i The preset time period includes a period of time after the start of oxygen inhalation and a period of time after the end of oxygen inhalation.
[0006] S200: If the target user is a preset first type user, then according to A, determine the blood oxygen saturation deviation of the target user at each preset time on the first side and the second side to obtain a blood oxygen saturation deviation list set λ corresponding to the target user = (λ1, λ2, ..., λ i , …, λ n ), where λ i For target users in T i The corresponding blood oxygen saturation deviation list; i =(λ i,1 ,λ i,2 , …, λ i,j , …, λ i,m ); i,j For target users in T i The blood oxygen saturation deviation corresponding to the jth preset moment within λ; i,j =|A i,j _1-A i,j _2| / MAX(A i,j ); MAX() is the preset maximum value function.
[0007] S300, according to λ, determine the oxygen absorption degree corresponding to each day of the target user in the historical time period to obtain the oxygen absorption degree feature vector θ corresponding to the target user = (θ1, θ2, ..., θ i ,…,θ n ), where θ i is the oxygen uptake of the target user on the i-th day in the historical time period.
[0008] S400, inputting θ into a preset classification model to obtain a classification result corresponding to θ.
[0009] S500, determining whether to issue a prompt message according to the classification result; wherein the prompt message is used to prompt the target user to adjust the working parameters of the oxygen output device.
[0010] According to another aspect of the present application, a non-transitory computer-readable storage medium is also provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the control method of the above-mentioned oxygen output device.
[0011] According to another aspect of the present application, an electronic device is provided, including a processor and the above-mentioned non-transitory computer-readable storage medium.
[0012] The present invention has at least the following beneficial effects:
[0013] The control method of the oxygen output device of the present invention, if the target user is a preset first type of user, then according to the blood oxygen saturation group of the target user in the preset time period of each day in the historical time period, the blood oxygen saturation deviation of the target user on the first side and the second side at each preset moment is determined to obtain the blood oxygen saturation deviation list set λ corresponding to the target user, according to λ, the oxygen absorption corresponding to each day of the target user in the historical time period is determined to obtain the oxygen absorption characteristic vector θ corresponding to the target user, θ is input into the preset classification model to obtain the classification result corresponding to θ, and according to the classification result, it is determined whether to issue a prompt information to prompt the target user whether to adjust the working parameters of the oxygen output device; thereby, the operation of the oxygen output device is controlled according to the physical signs of different types of users and different time periods, so that the operating state of the oxygen output device is more in line with the physical signs of the target user, so that the oxygen absorption effect of the target user is better; at the same time, it is avoided that the user's excessive oxygen absorption causes oxygen poisoning that endangers the user's lungs, eyes, nerve function and even life, and the user's insufficient oxygen absorption causes hypoxia that endangers the user's life. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 This is a flow chart of a control method for an oxygen output device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0017] It should be noted that, based on the present disclosure, those skilled in the art should understand that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, the various aspects described herein can be used to implement a device and / or practice a method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0018] Embodiment 1:
[0019] The following will refer to Figure 1 The flowchart of the control method of the oxygen output device shown in the figure introduces a control method of the oxygen output device.
[0020] The control method of the oxygen output device may include the following steps:
[0021] S100, obtaining the blood oxygen saturation group of the target user in the preset time period of each day in the historical time period, so as to obtain the blood oxygen saturation group list A corresponding to the target user = (A1, A2, ..., A i , …, A n ), i=1, 2,..., n; among them, A i is the preset time period T of the target user on the i-th day in the historical time period i The corresponding blood oxygen saturation group, n is the number of days corresponding to the historical time period; A i =(A i,1 , A i,2 , …, A i,j , …, A i,m ), j = 1, 2, ..., m; A i,j For target users in T i The blood oxygen saturation group at the jth preset time in T i The number of preset moments in the i,j =(A i,j _1, A i,j _2); A i,j _1 is the target user in T i The blood oxygen saturation of the first side at the jth preset moment within i,j _2 is the target user in T i The preset time period includes a period of time after the start of oxygen inhalation and a period of time after the end of oxygen inhalation.
[0022] In this embodiment, the target user can be any user who uses the oxygen output device, and the historical time period can be several days before the current day, for example: 30 days before the current day; when the target user uses the oxygen output device every day in the historical time period, the fingertip blood oxygen saturation on the left and right sides, that is, the first side and the second side can be monitored and recorded by a fingertip blood oximeter to form historical data; therefore, the blood oxygen saturation group of the target user in the preset time period of each day in the historical time period can be obtained through the historical data to obtain the blood oxygen saturation group list A corresponding to the target user; the preset time interval is set with a fixed duration.
[0023] Furthermore, the duration of the period after the start of oxygen inhalation ranges from 5 minutes to 120 minutes; the duration of the period after the end of oxygen inhalation ranges from 5 minutes to 120 minutes; for example: the duration of the period after the start of oxygen inhalation is 10 minutes; the duration of the period after the end of oxygen inhalation is 10 minutes.
[0024] Furthermore, A i It can be obtained by following the steps below:
[0025] S110, obtaining the target user's T i The blood oxygen saturation group QA at each preset time within a period of time after the start of oxygen inhalation and the target user at T i The blood oxygen saturation group QB is the blood oxygen saturation group at each preset time within a period of time after the end of oxygen inhalation.
[0026] S120, concatenate QA and QB to obtain A.
[0027] In this embodiment, the target user generally inhales oxygen for more than 10 hours. In order to improve calculation efficiency, blood oxygen saturation data for a period of time after the start of oxygen inhalation and a period of time after the end of oxygen inhalation are used.
[0028] S200: If the target user is a preset first type user, then according to A, determine the blood oxygen saturation deviation of the target user at each preset time on the first side and the second side to obtain a blood oxygen saturation deviation list set λ corresponding to the target user = (λ1, λ2, ..., λ i , …, λ n ), where λ i For target users in T i The corresponding blood oxygen saturation deviation list; i =(λ i,1 ,λ i,2 , …, λ i,j , …, λ i,m ); i,j For target users in T i The blood oxygen saturation deviation corresponding to the jth preset moment within λ; i,j=|A i,j _1-A i,j _2| / MAX(A i,j ); MAX() is the preset maximum value function.
[0029] In this embodiment, the user type of the target user can be input by the target user himself or directly obtained through the medical structure data platform; the preset first type user can be understood as a user with unilateral lung dysfunction, and the blood oxygen saturation changes on both sides of the first type user are different during oxygen inhalation; since the target user is the preset first type user, the blood oxygen saturation of one side of the first type user is normal, that is, the side with higher blood oxygen saturation at the same time is normal, therefore, according to A, the blood oxygen saturation deviation of the target user on the first side and the second side at each preset time can be determined to obtain the blood oxygen saturation deviation list set λ corresponding to the target user.
[0030] Furthermore, after step S200 and before step S300, the method further includes the following steps:
[0031] S210: If the target user is a preset second type user, obtain the standard blood oxygen saturation of the standard user at each preset time to obtain a standard blood oxygen saturation list B = (B1, B2, ..., B j , …, B m ), where B i is the standard blood oxygen saturation corresponding to the standard user at the jth preset moment; the first type of users is different from the second type of users.
[0032] In this embodiment, the preset second type of user can be understood as a user with bilateral lung dysfunction. During the oxygen inhalation process of the second type of user, the changes in blood oxygen saturation on the first side and the second side are different from those of the standard user. The standard blood oxygen saturation of the standard user at each preset moment can be obtained to obtain the standard blood oxygen saturation list B; the standard user can be understood as a user with normal lung function.
[0033] S220, according to A and B, determine the blood oxygen saturation deviation of the target user at the first side and the second side at each preset time, so as to obtain a blood oxygen saturation deviation list set λ=(λ1, λ2, ..., λ i , …, λ n ), where λ i For target users in T i The corresponding blood oxygen saturation deviation list; i =(λ i,1 ,λ i,2 , …, λ i,j , …, λ i,m );i,j For target users in T i The blood oxygen saturation deviation corresponding to the jth preset moment within λ; i,j =(|A i,j _1-B j | / B j +|A i,j _2-B j | / B j ) / 2; MAX() is the preset maximum value function.
[0034] In this embodiment, through the above-mentioned steps S210 and S220, the blood oxygen saturation deviation corresponding to the second type of user can be determined, and the determined blood oxygen saturation deviation takes into account the bilateral blood oxygen saturation, so that the determined blood oxygen saturation deviation is more in line with the physical signs of the second type of user.
[0035] S300, according to λ, determine the oxygen absorption degree corresponding to each day of the target user in the historical time period to obtain the oxygen absorption degree feature vector θ corresponding to the target user = (θ1, θ2, ..., θ i ,…,θ n ), where θ i is the oxygen uptake of the target user on the i-th day in the historical time period.
[0036] In this embodiment, the oxygen absorption degree corresponding to each day of the target user in the historical time period can be understood as the oxygen absorption effect of the target user in each day of the historical time period.
[0037] Further, step S300 may include the following steps:
[0038] S310, input λ into a preset linear regression model to obtain the oxygen absorption degree corresponding to each day of the target user in the historical time period, and then obtain the oxygen absorption effect feature vector θ corresponding to the target user.
[0039] In this embodiment, λ can be input into a preset linear regression model to obtain the evaluation value corresponding to the target user after oxygen inhalation every day in the historical time period, that is, the oxygen absorption degree, and then obtain the oxygen absorption effect characteristic vector θ corresponding to the target user; the preset linear regression model can be obtained through the historical data of a large number of users. It should be noted that those skilled in the art can use the existing linear regression model establishment method according to actual needs to establish a preset linear regression model through the historical data of a large number of users, which will not be elaborated here.
[0040] Furthermore, step S300 may further include the following steps:
[0041] S320, obtain λ iThe first blood oxygen saturation deviation corresponding to a period of time after the target user starts to inhale oxygen is obtained to obtain a first blood oxygen saturation deviation list C = (C1, C2, ..., C r , …, C s ), r = 1, 2, ..., s; where C r is the rth first blood oxygen saturation deviation within a period of time after the target user starts to inhale oxygen, and s is the number of first blood oxygen saturation deviations within a period of time after the target user starts to inhale oxygen.
[0042] S330, obtaining λ i The second blood oxygen saturation deviation corresponding to a period of time after the target user finishes oxygen inhalation is obtained to obtain a second blood oxygen saturation deviation list D=(D1, D2, ..., D p , …, D q ), p = 1, 2, ..., q; where D p is the pth second blood oxygen saturation deviation within a period of time after the target user finishes oxygen inhalation, and q is the number of second blood oxygen saturation deviations within a period of time after the target user finishes oxygen inhalation.
[0043] In this embodiment, the first blood oxygen saturation deviation and the second blood oxygen saturation deviation can be determined by the method in step S210 and step S220 to obtain C and D.
[0044] S340, according to C and D, determine θ i =(1 / s)×∑ s r=1 C r +(1 / q)×∑ q p=1 D p .
[0045] In this embodiment, the first blood oxygen saturation deviation corresponding to a period of time after the target user starts to inhale oxygen and the second blood oxygen saturation deviation corresponding to a period of time after the target user ends to comprehensively determine θ i , so that the determined θ i More precisely; it is understandable that θ i The smaller it is, the better the oxygen absorption effect of the target user on the i-th day.
[0046] S400, inputting θ into a preset classification model to obtain a classification result corresponding to θ.
[0047] In this embodiment, the preset classification model can be obtained by training a large amount of historical data. After θ is input into the preset classification model, the preset classification model can output the corresponding classification result according to θ; the classification result may include several types, each corresponding to a result of oxygen inhalation.
[0048] S500, determining whether to issue a prompt message according to the classification result; wherein the prompt message is used to prompt the target user to adjust the working parameters of the oxygen output device.
[0049] In this embodiment, for example, the classification results include a first result, a second result, and a third result. The first result indicates that no prompt information is issued, the second result indicates that the working parameters of the oxygen output device are increased, and the third result indicates that the working parameters of the oxygen output device are reduced.
[0050] In this embodiment, the method in the above embodiment is aimed at an oxygen output device. If the target user is a preset first type of user, the blood oxygen saturation deviation of the target user on the first side and the second side at each preset moment is determined according to the blood oxygen saturation group of the target user in the preset time period of each day in the historical time period, so as to obtain a blood oxygen saturation deviation list set λ corresponding to the target user. According to λ, the oxygen absorption corresponding to each day of the target user in the historical time period is determined to obtain an oxygen absorption feature vector θ corresponding to the target user. θ is input into a preset classification model to obtain a classification result corresponding to θ. According to the classification result, it is determined whether to issue a prompt message to prompt the target user whether to adjust the working parameters of the oxygen output device. Thus, the operation of the oxygen output device is controlled according to the physical signs of different types of users and different time periods, so that the operating state of the oxygen output device is more in line with the physical signs of the target user, so that the oxygen absorption effect of the target user is better. At the same time, it is avoided that the user's excessive oxygen absorption causes oxygen poisoning that endangers the user's lungs, eyes, and even nerve functions, and the user's insufficient oxygen absorption causes hypoxia that endangers the user's life.
[0051] In some embodiments, the above steps S100 to S500 may be implemented by the following code:
[0052]
[0053]
[0054] lambda_i = []
[0055] for Ai_j in Ai:
[0056] Ai_j_1,Ai_j_2=Ai_j
[0057] MAX_Ai_j=max(Ai_j_1,Ai_j_2)
[0058] lambda_i_j=abs(Ai_j_1-Ai_j_2) / MAX_Ai_j
[0059] lambda_i.append(lambda_i_j)
[0060] lambda_list.append(lambda_i)
[0061] #S300: Determine oxygen absorption (here we simply use the difference between the average values of the first and second side blood oxygen saturation as an example)
[0062] theta=[]
[0063] for Ai in A:
[0064] theta_i=sum([abs(Ai_j[0]-Ai_j[1])for Ai_j in Ai]) / len(Ai)#Simple effect value calculation, which can be adjusted according to actual needs
[0065] theta.append(theta_i)
[0066] #Convert theta to a Pandas DataFrame for subsequent processing
[0067] theta_df=pd.DataFrame({'theta':theta})
[0068] theta_df['date'] = grouped_by_date.groups.keys() #Add date column
[0069] #S400: Input θ into the preset classification model (logistic regression is used as an example here)
[0070] #For the sake of example, we assume that the classification labels are randomly generated (0 or 1)
[0071] #In practical applications, real labels are needed to train the model
[0072] import numpy as np
[0073] np.random.seed(0)
[0074] theta_df['label']=np.random.randint(0,2,size=len(theta_df))
[0075] #Separate features and labels
[0076] X = theta_df[['theta']]
[0077] y = theta_df['label']
[0078] #Standardize features
[0079] scaler = StandardScaler()
[0080] X_scaled=scaler.fit_transform(X)
[0081] # Divide into training set and test set
[0082] X_train,X_test,y_train,y_test=train_test_split(X_scaled,y,test_size=0.2,random_state=0)
[0083] #Training logistic regression model
[0084] model = LogisticRegression()
[0085] model.fit(X_train,y_train)
[0086] #S500: Determine whether to issue a prompt message based on the classification result
[0087] #Here it is assumed that if the prediction result is 1, a prompt message will be issued
[0088] #In actual applications, the triggering conditions of the prompt information can be adjusted according to actual needs
[0089] test_predictions=model.predict(X_test)
[0090] for i,prediction in enumerate(test_predictions):
[0091] if prediction==1:
[0092] date = theta_df.iloc[i+len(X_train)]['date']#Since the training set and test set are divided, the index needs to be adjusted
[0093] print(f"Prompt message: For date {date}, it is recommended to adjust the working parameters of the oxygen output device.")
[0094] Embodiment 2:
[0095] In the above embodiment 1, when the user uses the oxygen output device every day, if the user selects the working parameters of the oxygen output device in a fixed manner, the oxygen absorption effect may be poor. Based on this, the following method is provided to solve the above problem:
[0096] Q100, according to the preset working time TA of the oxygen output device input by the target user and the user type QE of the target user, determine several candidate working parameter groups corresponding to the oxygen output device to obtain a candidate working parameter group list E=(E1, E2, ..., E a , …, E b ), a=1, 2, …, b; where E a is the ath candidate operating parameter group of the oxygen output device determined according to TA and QE, b is the number of candidate operating parameter groups of the oxygen output device determined according to TA and QE; E a Includes concentration-time curve and velocity-time curve of oxygen output equipment.
[0097] In this embodiment, the target user can be any user who uses an oxygen output device, and the oxygen output device can be a home oxygen concentrator; when using the oxygen output device, the target user can input a preset working time, that is, this oxygen inhalation time; and a user type, and the user type includes office workers, students, or users with respiratory system dysfunction, etc.; it can be understood that the method in this embodiment is aimed at different types of users.
[0098] Further, step Q100 may include the following steps:
[0099] Q110, obtain a preset candidate working parameter group mapping table; wherein the candidate working parameter group mapping table includes a plurality of rows, each row corresponding to a combination of a preset working time range and a user type and a corresponding plurality of initial working parameter groups.
[0100] In this embodiment, the preset working time range can be 0 to 1 hour, 1 hour to 2 hours, etc., and the user types can also be exhaustively listed; the preset working time range and user type can be combined, and each combination corresponds to several initial working parameter groups; the initial working parameter group can be obtained through a large amount of historical user data, and the initial working parameter group can be understood as users who are more in line with the corresponding preset working time and user type combination.
[0101] Q120, traverse the combination of preset working time range and user type in each row of the candidate working parameter group mapping table, and determine several initial working parameter groups corresponding to the combination whose user type is the same as the user type of the target user and whose preset working time range includes TA as several candidate working parameter groups corresponding to the oxygen output device.
[0102] In this embodiment, through the above steps Q110 and Q120, several candidate working parameter groups can be preliminarily determined according to the preset working time TA of the oxygen output device input by the target user and the user type QE of the target user, and then the final working parameter group can be determined from the several candidate working parameter groups.
[0103] Q200, cluster the candidate working parameter groups in E according to the standard user feature vector corresponding to each candidate working parameter group in E to obtain a cluster list EA = (EA1, EA2, ..., EA c , …, EA d ), c = 1, 2, ..., d; where EA c is the cth cluster obtained by clustering the candidate working parameter groups in E, and d is the number of clusters obtained by clustering the candidate working parameter groups in E.
[0104] In this embodiment, the standard user feature vector can be understood as the feature vector of a normal user. The standard user feature vector can be obtained by obtaining different preset types of physical sign parameters of the standard user and then converting them into a vector form; the preset types of physical sign parameters include: age, gender, height, weight, blood pressure value, blood oxygen saturation and other physical sign parameters; the standard user feature vector corresponding to each candidate working parameter group can be obtained by averaging the user feature vectors of several standard users corresponding to each candidate working parameter group; the k-means clustering algorithm can be used to cluster the standard user feature vectors to obtain EA.
[0105] Q300, obtain the first similarity between the target user feature vector XM corresponding to the target user and the center vector of each cluster in EA, so as to obtain a first similarity list ε=(ε1, ε2, ..., ε c , …, ε d ), where ε c For XM and EA c The first similarity of the center vector.
[0106] In this embodiment, it should be noted that those skilled in the art can use the existing vector similarity determination method according to actual needs to determine the first similarity between the target user feature vector XM corresponding to the target user and the center vector of each cluster in EA to obtain the first similarity list ε, which will not be elaborated here.
[0107] Furthermore, XM is obtained by the following steps:
[0108] Q310, obtaining each preset type of vital sign parameters corresponding to the target user.
[0109] Q320, fill each preset type of physical sign parameter corresponding to the target user into the corresponding position in the preset initial vector to obtain XM.
[0110] In this embodiment, it should be noted that the dimension of the standard user feature vector corresponding to each candidate working parameter group is the same as the dimension of XM.
[0111] Q400, determine each candidate working parameter group in the cluster corresponding to the first target similarity ε' as a designated working parameter group, so as to obtain a designated working parameter group list F = (F1, F2, ..., F e , …, F h ), e = 1, 2, ..., h; where F e is the e-th designated working parameter group determined, h is the number of designated working parameter groups determined; ε'=MAX(ε); MAX() is a preset maximum value function.
[0112] In this embodiment, the combination of preset working hours and user types corresponding to the candidate working parameter groups in the cluster corresponding to the first target similarity is most consistent with the preset working hours input by the target user and the type of the target user. Therefore, each candidate working parameter group in the cluster corresponding to the first target similarity ε' is determined as a designated working parameter group.
[0113] Q500, determining a basic working parameter group of the oxygen output device according to the sub-concentration time curve and the sub-speed time curve corresponding to the previous preset time length of each candidate working parameter group in F.
[0114] In this embodiment, after determining several designated working parameter groups, it is not possible to directly determine which designated working parameter group is the best at this time, and a final confirmation needs to be made in combination with the change in the blood oxygen saturation of the target user; at this time, it is necessary to control the operation of the oxygen output device, that is, it is necessary to determine the basic working parameter group of the oxygen output device.
[0115] Further, step Q500 may include the following steps:
[0116] Q510, obtain the sub-concentration time curve and sub-speed time curve corresponding to the previous preset time length of each specified working parameter group in F, so as to obtain the sub-candidate working parameter group list ZE=(ZE1, ZE2, ..., ZE a ,…,ZE b ), where ZE a For E a The corresponding sub-specified working parameter group; ZE a =(ZE a,1 , ZE a,2 ); ZE a,1 For E aThe sub-concentration-time curve corresponding to the preset time length of the concentration-time curve in ZE a,2 For E a The sub-speed time curve corresponding to the previous preset duration of the speed time curve within.
[0117] In this embodiment, a part of the concentration-time curve and a part of the speed-time curve corresponding to the previous preset time length of each specified working parameter group in F may be intercepted to obtain a sub-concentration-time curve and a sub-speed-time curve.
[0118] Q520, the average sub-concentration time curve corresponding to all sub-concentration time curves in ZE is determined as the basic concentration time curve JE1, and the average sub-speed time curve corresponding to all sub-speed time curves in ZE is determined as the basic speed time curve JE2.
[0119] In this embodiment, it should be noted that those skilled in the art can use the existing average curve determination method to obtain JE1 and JE2 according to actual needs, which will not be described in detail here.
[0120] Q530, based on JE1 and JE2, determine the basic working parameter group JC = (JE1, JE2) of the oxygen output device.
[0121] In this embodiment, the preset duration ranges from 5 minutes to 60 minutes; the basic working parameter group is obtained according to the sub-concentration time curve and sub-speed time curve corresponding to the previous preset duration of each specified working parameter group in F; therefore, the basic working parameter group is also more in line with the vital sign parameters of the target user.
[0122] Q600, after the oxygen output device runs for a preset time with the basic working parameter group, a blood oxygen saturation time curve GH of the target user within the preset time is obtained.
[0123] In this embodiment, after the oxygen output device operates for a preset time with the basic working parameter group, the blood oxygen saturation of the target user will change during the oxygen inhalation process within the preset time, so GH can be obtained.
[0124] Q700, determine the working parameter group of the oxygen output device according to each standard blood oxygen saturation time curve corresponding to each specified working parameter group in GH and F.
[0125] Further, step Q700 may include the following steps:
[0126] Q710, obtain each standard blood oxygen saturation time curve corresponding to each specified working parameter group in F to obtain a list set of standard blood oxygen saturation time curves RA = (RA1, RA2, ..., RA e , …, RA h ), where RAe F e Corresponding standard blood oxygen saturation time curve list; RA e =(RA e,1 , R.A. e,2 , …, RA e,x , …, RA e,f(e) ), x=1, 2,..., f(e); RA e,x F e The corresponding x-th standard blood oxygen saturation time curve.
[0127] In this embodiment, when the oxygen output device operates in each specified working parameter group, it can obtain standard blood oxygen saturation time curves corresponding to several standard users with different starting blood oxygen saturation, and then average them to obtain the standard blood oxygen saturation time curve corresponding to each specified working parameter group.
[0128] Q720, get traversal RA, if RA e,x If the difference between the initial oxygen saturation of RA and the initial oxygen saturation of GH is within the preset difference range, then RA e,x Determine as a candidate standard blood oxygen saturation time curve to obtain a candidate standard blood oxygen saturation time curve list RB = (RB1, RB2, ..., RB y , …, RB w ), y = 1, 2, ..., w; where RB y is the yth candidate standard blood oxygen saturation time curve obtained, and w is the number of candidate standard blood oxygen saturation time curves obtained.
[0129] In this embodiment, each standard blood oxygen saturation curve in RA corresponds to an initial blood oxygen saturation, and a standard blood oxygen saturation curve whose difference between the initial blood oxygen saturation and the initial blood oxygen saturation of GH is within a preset difference range is determined as a candidate standard blood oxygen saturation time curve.
[0130] Q730, obtaining the second similarity of the partial standard blood oxygen saturation time curve corresponding to the previous preset time length of each candidate standard blood oxygen saturation time curve in GH and RB, so as to obtain a second similarity list δ=(δ1, δ2, ..., δ y , …, δ w ), where δ y For GH and RB y The second similarity of the part of the standard blood oxygen saturation time curve corresponding to the previous preset time length.
[0131] In this embodiment, a portion of the standard blood oxygen saturation time curve corresponding to the previous preset time length of each candidate standard blood oxygen saturation time curve in RB may be intercepted, and then the similarity with GH may be determined to obtain δ.
[0132] Q740, determining the designated working parameter group corresponding to the second target similarity δ' as the working parameter group of the oxygen output device; wherein δ'=MAX(δ).
[0133] In this embodiment, the partial blood oxygen saturation time curve corresponding to the second target similarity has the highest similarity to GH. Therefore, the specified working parameter group corresponding to the second target similarity δ' is determined as the working parameter group of the oxygen output device, so that the target user can achieve a better oxygen inhalation effect.
[0134] In this embodiment, according to the preset working time TA of the oxygen output device input by the target user and the user type QE of the target user, several candidate working parameter groups corresponding to the oxygen output device are determined to obtain a candidate working parameter group list E; according to the standard user feature vector corresponding to each candidate working parameter group in E, the candidate working parameter groups in E are clustered to obtain a cluster list EA; according to the similarity between the target user feature vector XM and the central vector of each cluster in EA, the designated working parameter group is determined; according to the sub-concentration time curve and the sub-speed time curve corresponding to the previous preset time of each designated working parameter group, the basic working parameter group of the oxygen output device is determined, and the oxygen output device is controlled to operate for the preset time with the basic working parameter group, so as to obtain the blood oxygen saturation time curve GH of the target user within the preset time, and the working parameter group of the oxygen output device is determined according to GH and each standard blood oxygen saturation time curve corresponding to each designated working parameter group, so as to determine a relatively suitable working parameter group according to the physical signs of the target user, so that the oxygen output device operates under this working parameter group, and avoids the user's excessive oxygen inhalation causing oxygen poisoning or hypoxia, thereby endangering the user's health or even life safety.
[0135] In some embodiments, the method in steps Q100 to Q700 above may be implemented by the following code:
[0136] #Generate candidate working parameter group list E based on TA and QE
[0137] def generate_candidate_work_parameters(TA,QE):
[0138] #For example: E=[{'concentration_curve':...,'speed_curve':...},...]
[0139] #Use the preset function to calculate the standard user feature vector
[0140] def calculate_standard_user_feature_vector(Ea):
[0141] #Calculate the standard user feature vector based on the candidate working parameter group Ea
[0142] #The returned value is a feature vector
[0143] # Calculate the similarity between two vectors
[0144] def calculate_similarity(vector1,vector2):
[0145] #Use cosine similarity to calculate the similarity between two vectors
[0146] return cosine_similarity([vector1],[vector2])[0][0]
[0147] #Step Q100: Generate candidate working parameter group list E
[0148]
[0149] base_work_parameters = determine_base_work_parameters (F[0], pre_set_duration) # Assume that the first one is selected as the representative to determine the basic parameters
[0150] #Step Q600: Obtain the target user's blood oxygen saturation time curve GH within a preset time period
[0151] #Actual device interface or data acquisition code is required to obtain GH
[0152] GH=...
[0153] #Step Q700: Determine the working parameter group of the oxygen output device
[0154] def determine_final_work_parameters(GH,candidate_work_parameters):
[0155] #Determine the final working parameter group based on GH and the standard blood oxygen saturation time curve corresponding to each specified working parameter group
[0156] #Return the final working parameter group
[0157] final_work_parameters=determine_final_work_parameters(GH,F)
[0158] # Output the final working parameter group
[0159] print("Final Work Parameters:",final_work_parameters)
[0160] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0161] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0162] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0163] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0164] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0165] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0166] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0167] The electronic device is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0168] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one memory mentioned above, and a bus connecting different system components (including the memory and the processor).
[0169] The memory stores program codes, which can be executed by the processor, so that the processor executes the steps in various embodiments described in this specification.
[0170] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).
[0171] The memory may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0172] The bus may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
[0173] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device (e.g., routers, modems, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be performed through an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter. The network adapter communicates with other modules of the electronic device through a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0174] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0175] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0176] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.
Claims
1. A control method for an oxygen output device, characterized in that: The method comprises the following steps: S100, obtaining the blood oxygen saturation group of the target user in the preset time period of each day in the historical time period, so as to obtain the blood oxygen saturation group list A corresponding to the target user = (A1, A2, ..., A i , …, A n ), i=1, 2,...,n; where, A i is the preset time period T of the target user on the i-th day in the historical time period i The corresponding blood oxygen saturation group, n is the number of days corresponding to the historical time period; A i =(A i,1 , A i,2 , …, A i,j , …, A i,m ), j = 1, 2, ..., m; A i,j For target users in T i The blood oxygen saturation group at the jth preset time in T i The number of preset moments in the i,j =(A i,j _1, A i,j _2); A i,j _1 is the target user in T i The blood oxygen saturation of the first side at the jth preset moment within i,j _2 is the target user in T i The blood oxygen saturation of the second side at the jth preset time within the period; the preset time period includes a period of time after the start of oxygen inhalation and a period of time after the end of oxygen inhalation; S200: If the target user is a preset first type user, then according to A, determine the blood oxygen saturation deviation of the target user at each preset time on the first side and the second side to obtain a blood oxygen saturation deviation list set λ corresponding to the target user = (λ1, λ2, ..., λ i , …, λ n ), where λ i For target users in T i The corresponding blood oxygen saturation deviation list; i =(λ i,1 ,λ i,2 , …, λ i,j , …, λ i,m ); i,j For target users in T i The blood oxygen saturation deviation corresponding to the jth preset moment within λ; i,j =|A i,j _1-A i,j _2| / MAX(A i,j ); MAX() is the preset maximum value function; S300, according to λ, determine the oxygen absorption degree corresponding to each day of the target user in the historical time period to obtain the oxygen absorption degree feature vector θ corresponding to the target user = (θ1, θ2, ..., θ i ,…,θ n ), where θ i is the oxygen uptake of the target user on the i-th day in the historical time period; S400, inputting θ into a preset classification model to obtain a classification result corresponding to θ; S500, determining whether to issue a prompt message according to the classification result; wherein the prompt message is used to prompt the target user to adjust the working parameters of the oxygen output device.
2. The control method of the oxygen output device according to claim 1, characterized in that: After step S200 and before step S300, the method further includes the following steps: S210: If the target user is a preset second type user, obtain the standard blood oxygen saturation of the standard user at each preset time to obtain a standard blood oxygen saturation list B = (B1, B2, ..., B j , …, B m ), where B i is the standard blood oxygen saturation corresponding to the standard user at the jth preset time; the first type of user is different from the second type of user; S220, according to A and B, determine the blood oxygen saturation deviation of the target user at the first side and the second side at each preset time, so as to obtain a blood oxygen saturation deviation list set λ=(λ1, λ2, ..., λ i , …, λ n ), where λ i For target users in T i The corresponding blood oxygen saturation deviation list; i =(λ i,1 ,λ i,2 , …, λ i,j , …, λ i,m ); i,j For target users in T i The blood oxygen saturation deviation corresponding to the jth preset moment within λ; i,j =(|A i,j _1-B j | / B j +|A i,j _2-B j | / B j ) / 2; MAX() is the preset maximum value function.
3. The control method of the oxygen output device according to claim 1, characterized in that: Step S300 includes the following steps: S310, input λ into a preset linear regression model to obtain the oxygen absorption degree corresponding to each day of the target user in the historical time period, and then obtain the oxygen absorption effect feature vector θ corresponding to the target user.
4. The control method of the oxygen output device according to claim 1, characterized in that: Step S300 includes the following steps: S320, obtain λ i The first blood oxygen saturation deviation corresponding to a period of time after the target user starts to inhale oxygen is obtained to obtain a first blood oxygen saturation deviation list C = (C1, C2, ..., C r , …, C s ), r = 1, 2, ..., s; where C r is the rth first blood oxygen saturation deviation within a period of time after the target user starts to inhale oxygen, and s is the number of first blood oxygen saturation deviations within a period of time after the target user starts to inhale oxygen; S330, obtaining λ i The second blood oxygen saturation deviation corresponding to a period of time after the target user finishes oxygen inhalation is obtained to obtain a second blood oxygen saturation deviation list D=(D1, D2, ..., D p , …, D q ), p = 1, 2, ..., q; where D p is the pth second blood oxygen saturation deviation within a period of time after the target user finishes oxygen inhalation, and q is the number of second blood oxygen saturation deviations within a period of time after the target user finishes oxygen inhalation; S340, according to C and D, determine θ i =(1 / s)×∑ s r=1 C r +(1 / q)×∑ q p=1 D p .
5. The control method of the oxygen output device according to claim 1, characterized in that: The duration of the period after the start of oxygen inhalation ranges from 5 minutes to 120 minutes; the duration of the period after the end of oxygen inhalation ranges from 5 minutes to 120 minutes.
6. The control method of the oxygen output device according to claim 5, characterized in that: The duration of the period after the start of oxygen inhalation is 10 minutes; the duration of the period after the end of oxygen inhalation is 10 minutes.
7. The control method of the oxygen output device according to claim 1, characterized in that: A i Obtained through the following steps: S110, obtaining the target user's T i The blood oxygen saturation group QA at each preset time within a period of time after the start of oxygen inhalation and the target user at T i Blood oxygen saturation group QB at each preset time within a period of time after the end of oxygen inhalation; S120, concatenate QA and QB to obtain A.
8. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the control method of the oxygen output device according to any one of claims 1 to 7.
9. An electronic device, characterized in that: Includes a processor and the non-transitory computer-readable storage medium of claim 8.
Citation Information
Patent Citations
Method and equipment for determining working parameter group of oxygen output equipment and storage medium
CN119742042A