A large model inference method and related equipment for stem cell production and preparation
By constructing and utilizing the first and second prompt templates of the big model inference method in the stem cell production and preparation environment, the problem of poor timeliness of big model inference in the prior art is solved, and real-time monitoring and abnormal prediction of the stem cell production and preparation environment are achieved.
Patent Information
- Application Number
- CN202510267380.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-03-07
AI Technical Summary
Existing large-model inference methods are used in stem cell production and preparation environment for abnormal detection, which is poor in time-consuming and cannot effectively meet the inference requirements of complex tasks.
By obtaining stem cell production, the first and second prompt templates are constructed, and the first and second prediction results are obtained using a large model to make inferences. When the inference mode switching condition is met, this method automatically switches the inference mode to realize the inference of short-term and abnormal conditions of sensor data.
The timeliness and inference depth of large models during abnormal detection in stem cell production and preparation environment are improved, real-time monitoring and abnormal prediction of the environment are achieved.
Smart Images

Figure CN119783831B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of sensor data analysis, and particularly to a large model inference method and related devices for stem cell production and preparation. Background Art
[0002] Monitoring and analyzing sensor data is of great significance in the stem cell production and preparation environment. Most research on machine learning in sensor systems focuses on low-level perception tasks of processing raw sensor data in a short period, while many practical applications require more advanced reasoning capabilities for conceptual understanding and reasoning from long-term sensor data. Existing machine learning-based methods have poor generalization ability when the data is limited. Therefore, existing research has proposed the concept of pervasive artificial intelligence, that is, large models can interact and reason with the physical world through Internet of Things sensors. Large models have powerful reasoning capabilities and rich world knowledge, which can be used to interpret sensor data and perform advanced reasoning to identify complex events in long-term sensor data. And advanced reasoning tasks usually require powerful reasoning capabilities to interpret complex sensor data and integrate domain knowledge to make decisions.
[0003] In order to effectively reason about the sensor data in the stem cell production and preparation environment and realize the interaction and reasoning of large models with the physical world, researchers use static prompts to reason about sensor signal data. Once the prompt template is set, it is frozen. Only new sensor data needs to be provided for new inferences, without further changing the prompt. However, the singularity of static prompts undoubtedly limits the capabilities of large models in complex tasks. Then, in order to further improve the capabilities of large models in dealing with complex tasks, researchers proposed to use machine learning models to complete the low-level perception tasks of sensor data, and then input the perception results into the large model to assist in advanced reasoning. However, this method has requirements for the performance of machine learning models, and the single output of perception results will miss potential information in the data, affecting the reasoning performance of large models in complex tasks. Thus, it can be seen that the current large model inference methods have the problem of poor timeliness in using large model inference for anomaly detection in the stem cell production and preparation environment. Summary of the Invention
[0004] This application provides a large model inference method and related devices for stem cell production and preparation, which can solve the problem of poor timeliness in using large model inference for anomaly detection in the stem cell production and preparation environment.
[0005] In a first aspect, this application provides a large model inference method for stem cell production and preparation, and the large model inference method includes:
[0006] Obtain multiple sensor data at the current moment in the Internet of Things for stem cell production and preparation;
[0007] Construct a first prompt template based on all sensor data at the current moment, and use a large model to reason about the first prompt template to obtain a first prediction result; the first prediction result is used to describe whether the detection index corresponding to each sensor at the current moment is abnormal, and the first prompt template is used to prompt the large model to perform abnormal detection on the detection index.
[0008] When all sensor data and the first prediction result at the current moment meet the inference mode switching condition, construct a second prompt template based on all sensor data at the current moment and the output format of the large model, and use the large model to reason about the second prompt template to obtain a second prediction result; the second prediction result is used to describe the abnormal condition of the detection index corresponding to each sensor at a future moment, and the second prompt template is used to prompt the large model to predict the abnormal condition of the detection index.
[0009] Optionally, constructing the first prompt template based on all sensor data at the current moment includes:
[0010] Through the formula:
[0011]
[0012] Construct the first prompt template ;
[0013] Wherein, represents the first target of the large model, represents the mode threshold, represents all sensor data at the current moment, represents the first domain knowledge.
[0014] Optionally, the inference mode switching condition is:
[0015] The first prediction result describes that there is at least one sensor data corresponding to an abnormal detection index at the current moment, or at least one sensor data value among all sensor data at the current moment does not fall within the numerical range described by the mode threshold.
[0016] Optionally, constructing the second prompt template based on all sensor data at the current moment and the output format of the large model includes:
[0017] Through the formula:
[0018]
[0019] Construct the second prompt template ;
[0020] Wherein, represents the second target of the large model, represents the mode threshold, Represents all sensor data at the current moment, Represents the second domain knowledge, Represents the output format of the large model.
[0021] Optionally, the large model inference method further includes:
[0022] When the termination moment of the inference cycle arrives, use the sensor data of all sensors at each moment in the inference cycle to generate examples at each moment, construct a third prompt template based on all the examples, and use the large model to infer the third prompt template to obtain the long-term inference prediction result; the long-term inference prediction result is used to describe the data change situation of the detection index within the inference cycle.
[0023] Optionally, using the sensor data of all sensors at each moment in the inference cycle to generate examples at each moment includes:
[0024] Through the formula:
[0025]
[0026] Generate the example corresponding to the th moment ;
[0027] Wherein, Represents the problem objective, Represents the triple corresponding to the th moment, , Represents the th moment, Represents the th moment of all sensor data, Represents the th moment of the true result, , Represents the inference chain, Represents the answer;
[0028] Constructing the third prompt template based on all the examples includes:
[0029] Through the formula:
[0030]
[0031] Construct the third prompt template ;
[0032] Wherein, Represents the third objective, Represents the mode threshold, Represents the set of triples corresponding to all moments, Represents the third domain knowledge, Represents the set of examples corresponding to all moments.
[0033] Optionally, after the step of using the large model to infer the second prompt template to obtain the second prediction result, the large model inference method further includes:
[0034] Through the formula:
[0035]
[0036] Update the pattern threshold to obtain the updated pattern threshold ;
[0037] Wherein, Represents the lower limit value of the numerical range described by the pattern threshold, Represents the upper limit value of the numerical range described by the pattern threshold, Represents all sensor data at the current moment.
[0038] In a second aspect, the present application provides a large model inference device for stem cell production and preparation, including:
[0039] An acquisition module for acquiring multiple sensor data at the current moment in the stem cell production and preparation Internet of Things;
[0040] A first inference module for constructing a first prompt template based on all sensor data at the current moment and using the large model to infer the first prompt template to obtain a first prediction result; the first prediction result is used to describe whether the detection index corresponding to each sensor at the current moment is abnormal, and the first prompt template is used to prompt the large model to perform abnormal detection on the detection index;
[0041] A second inference module for, when all sensor data at the current moment and the first prediction result meet the inference mode switching condition, constructing a second prompt template based on all sensor data at the current moment and the output format of the large model, and using the large model to infer the second prompt template to obtain a second prediction result; the second prediction result is used to describe the abnormal condition of the detection index corresponding to each sensor at a future moment, and the second prompt template is used to prompt the large model to perform abnormal condition prediction on the detection index.
[0042] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned large model inference method for stem cell production and preparation.
[0043] Fourthly, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the above-mentioned large model inference method for stem cell production and preparation.
[0044] The above solution of the present application has the following beneficial effects:
[0045] In the embodiment of the present application, by obtaining the sensor data of multiple sensors at the current moment in the stem cell production and preparation Internet of Things, then constructing a first prompt template based on all the sensor data at the current moment, and using the large model to infer the first prompt template to obtain a first prediction result. When all the sensor data at the current moment and the first prediction result meet the inference mode switching condition, a second prompt template is constructed based on all the sensor data at the current moment and the output format of the large model, and the large model is used to infer the second prompt template to obtain a second prediction result. Among them, by adaptively switching the process of large model inference, the large model can automatically infer the sensor data in the short term and abnormal situations, meet different inference and prediction requirements, realize real-time monitoring and abnormal prediction of the stem cell production and preparation environment adaptively, ensure the timeliness and inference depth of large model inference, and effectively improve the timeliness of using large model inference to detect abnormalities in the stem cell production and preparation environment.
[0046] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0048] Figure 1 It is a flowchart of the large model inference method for stem cell production and preparation provided by an embodiment of the present application;
[0049] Figure 2 It is a flowchart of the sentinel mode provided by an embodiment of the present application;
[0050] Figure 3 It is a flowchart of the early warning mode provided by an embodiment of the present application;
[0051] Figure 4 It is a flowchart of the detection mode provided by an embodiment of the present application;
[0052] Figure 5Schematic diagram of the structure of the large model inference device for stem cell production and preparation provided by an embodiment of the present application;
[0053] Figure 6 Schematic diagram of the structure of the terminal device provided by an embodiment of the present application. Detailed implementation manners
[0054] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0055] It should be understood that when used in the specification and claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0056] It should also be understood that the term "and / or" as used in the specification and claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0057] As used in the specification and claims of the present application, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if detected [the described condition or event]" can be interpreted as meaning "once determined", "in response to determining", "once detected [the described condition or event]", or "in response to detecting [the described condition or event]" according to the context.
[0058] In addition, in the description of the specification and claims of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0059] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that specific features, structures, or characteristics described in connection with that embodiment are included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in some other embodiments", "in still some other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized.
[0060] Aiming at the problem of poor timeliness in the existing abnormal detection of the stem cell production and preparation environment using large model reasoning, the embodiments of this application provide a large model reasoning method for stem cell production and preparation. This large model reasoning method obtains the sensor data of multiple sensors at the current moment in the stem cell production and preparation Internet of Things, then constructs a first prompt template based on all the sensor data at the current moment, and uses the large model to reason about the first prompt template to obtain a first prediction result. When all the sensor data at the current moment and the first prediction result meet the reasoning mode switching condition, a second prompt template is constructed based on all the sensor data at the current moment and the output format of the large model, and the large model is used to reason about the second prompt template to obtain a second prediction result. Among them, by adaptively switching the process of large model reasoning, the large model can automatically reason about sensor data in the short term and abnormal situations, meet different reasoning and prediction requirements, realize real-time monitoring and abnormal prediction of the stem cell production and preparation environment adaptively, ensure the timeliness and reasoning depth of large model reasoning, and effectively improve the timeliness of using large model reasoning to detect abnormalities in the stem cell production and preparation environment.
[0061] Next, an exemplary description will be given of the large model reasoning method for stem cell production and preparation provided by this application.
[0062] As Figure 1 shown, the large model reasoning method for stem cell production and preparation provided by this application includes the following steps:
[0063] Step 11, obtain the sensor data of multiple sensors at the current moment in the stem cell production and preparation Internet of Things.
[0064] The above sensor data is the data of the corresponding detection indicators collected by the sensors in the stem cell production and preparation Internet of Things. The corresponding detection indicators include indicators such as temperature, humidity, pH value, carbon dioxide concentration, dissolved oxygen concentration, etc., and the corresponding data are temperature data, humidity data, pH value data, carbon dioxide concentration data, dissolved oxygen concentration data, etc.
[0065] In an embodiment of the present application, sensor data of multiple sensors at the current moment can be obtained by accessing the data uploaded in real time by sensors in the Internet of Things.
[0066] Exemplarily, the Internet of Things for stem cell production and preparation is the Internet of Things related to the monitoring of the production environment of stem cells, including monitoring devices (sensors, video monitoring components, etc.), control systems (automation control systems), data transmission devices (gateway devices, wireless networks, etc.), and management systems (systems for monitoring and analyzing relevant data of the stem cell production environment to achieve functions such as real-time monitoring, alarm, and fault diagnosis, such as a computer running a large language model). The sensor is used to measure data of detection indicators for stem cell production and preparation, including temperature, humidity, pH value, etc.
[0067] Step 12: Construct a first prompt template based on all sensor data at the current moment, and use a large model to reason about the first prompt template to obtain a first prediction result.
[0068] The above first prompt template is used to prompt the large model to perform anomaly detection on the detection indicators. The above first prediction result is used to describe whether the detection indicators corresponding to each sensor data at the current moment are abnormal. For example, the first prediction result is the label of the detection indicator corresponding to each sensor. When the label is 1, the corresponding detection indicator is abnormal; when the label is 0, the corresponding detection indicator is normal. The above large model is the abbreviation of the large-scale pre-trained model in the field of artificial intelligence (such as the large language model (LLM, Large Language Model)), which has powerful logical reasoning ability.
[0069] In some embodiments of the present application, the above steps of constructing a first prompt template based on all sensor data at the current moment and using a large model to reason about the first prompt template to obtain a first prediction result include:
[0070] The first step: Construct a first prompt template based on all sensor data at the current moment.
[0071] Specifically, through the formula:
[0072]
[0073] Construct the first prompt template .
[0074] Wherein, represents the first target of the large model, represents the mode threshold, represents all sensor data at the current moment, represents the first domain knowledge.
[0075] It should be noted that the above first objective is used to describe the task content that the large model is expected to complete (in this step, it is to classify and predict whether the sensor data is abnormal). The first domain knowledge is the professional knowledge or background information required for the large model to complete the first objective, which helps the large model provide more accurate and professional answers. The mode threshold is the reference range value of the sensor data in the current task scenario determined according to industry knowledge , where is the minimum value of this range, is the maximum value of this range, and and are matrices, which include the minimum and maximum values of the ranges corresponding to all sensor data; the + in the above formula is a concatenation operation, which is used to concatenate all data into one piece of data.
[0076] Exemplarily, when the Internet of Things for stem cell production and preparation is the Internet of Things related to the production environment monitoring of stem cells, the above first objective is to classify the anomalies of the detection indicators corresponding to each sensor in the stem cell production environment at the current moment, and the first domain knowledge is the professional knowledge such as the normal value range and change range of the detection indicator data in the stem cell production and preparation scenario.
[0077] In the second step, use the large model to reason about the first prompt template to obtain the first prediction result.
[0078] Specifically, the large model converts the content in the first prompt template into multiple Tokens (i.e., tokens, the smallest unit for the large model to process and understand language, which can be a word, character, sub-word, or symbol), and maps all Tokens to the first high-dimensional vector representation (which can be achieved using a mapping function), then performs context encoding on the first high-dimensional vector representation through the attention mechanism, passes the intermediate representation layer by layer, obtains the first encoding result, and finally decodes the first encoding result according to the attention weights (which can be achieved using the Transformer architecture) to obtain the first prediction result.
[0079] Exemplarily, the large model can be a large language model, etc. Input the first prompt template into the large model, and the large model processes the first prompt template to obtain the first prediction result. Specifically, the large model performs shallow reasoning on multiple sensor data streams according to the first objective in the first prompt template, combined with the first domain knowledge, and outputs the prediction result.
[0080] It should be noted that in order to improve the accuracy of the first prediction result, before actually obtaining the first prediction result at the current moment, the large model needs to be trained. The sensor data at historical moments is used as training data, and the first prediction result of the training data is obtained using the large model. Then, the online gradient loss is calculated based on the first prediction result of the training data. If the value of the online gradient loss is less than the preset loss value, the training ends. If the value of the online gradient loss is greater than or equal to the preset loss value, the model weights of the large model are adjusted, and the step of obtaining the first prediction result of the training data using the large model is returned. Specifically, through the formula:
[0081]
[0082] Calculate the online loss value .
[0083] Among them, represents the class probability distribution of the -th sensor data in the first prediction result of the training data, represents the class probability distribution of the -th sensor data in the true prediction result of the training data, represents the number of sensor data in the training data.
[0084] Through the formula:
[0085]
[0086] Adjust the model weights of the large model to obtain the adjusted model weights .
[0087] Among them, represents the model weights of the large model, represents the learning rate, represents the gradient.
[0088] The following uses a specific example to exemplarily illustrate this step.
[0089] The flowchart of the sentinel mode of the large model (i.e., the mode of executing this step to obtain the first prediction result) is as shown in Figure 2 . The signal data of the sensor is uploaded to the prompt template, and at the same time, the content of the prompt template is loaded through the knowledge base to obtain the prompt template (i.e., the first prompt template above). The prompt template is input into the large model, and the large model performs shallow inference to obtain the prediction result . According to the prediction result, the prompt template is fed back and the threshold is corrected. At the same time, according to the true result and the prediction result , the online learning weight of the large model is updated. Finally, , , Save to the knowledge base.
[0090] Step 13, when all the sensor data and the first prediction result at the current moment meet the inference mode switching condition, construct a second prompt template based on all the sensor data at the current moment and the output format of the large model, and use the large model to infer the second prompt template to obtain a second prediction result.
[0091] The above-mentioned second prompt template is used to prompt the large model to predict the abnormal conditions of the detection indicators. The second prediction result is used to describe the abnormal conditions of the detection indicators corresponding to each sensor at the future moment. For example, for the sensor data of the temperature in the stem cell production environment, the second prediction result is: within the next 1 hour, the prediction of the sensor data of the temperature in the stem cell production environment shows that there is a 70% probability that the environmental temperature will have abnormal fluctuations, and it may rise sharply to above 39°C, exceeding the ideal temperature range required for stem cell growth.
[0092] The above-mentioned inference mode switching condition is: the first prediction result describes that there is at least one detection indicator corresponding to the sensor data as abnormal at the current moment, or at least one value of the sensor data among all the sensor data at the current moment does not fall within the numerical range described by the mode threshold.
[0093] It should be noted that since the mode threshold includes the numerical ranges corresponding to all the sensor data, when judging whether the sensor data falls within the numerical range described by the mode threshold, the sensor data is compared with the numerical range corresponding to the sensor data in the mode threshold.
[0094] In the embodiments of the present application, the steps of constructing the second prompt template based on all the sensor data at the current moment and the output format of the large model, and using the large model to infer the second prompt template to obtain a second prediction result include:
[0095] The first step is to construct a second prompt template based on all the sensor data at the current moment and the output format of the large model.
[0096] Specifically, through the formula:
[0097]
[0098] Construct the second prompt template .
[0099] Among them, represents the second target of the large model, represents the mode threshold, represents all the sensor data at the current moment, represents the second domain knowledge, Represents the output format of the large model.
[0100] It should be noted that the above second objective is used to describe the task content that the large model is expected to complete (in this step, it is to predict the abnormal conditions of sensor data at future times), the second domain knowledge is the professional knowledge or background information required for the large model to complete the second objective, and the output format is the format of the second prediction result. The + in the above formula is a concatenation operation used to concatenate all data into one piece of data.
[0101] Exemplarily, when the stem cell production and preparation Internet of Things is an Internet of Things related to production environment monitoring, the above second objective can be to predict whether there will be abnormal fluctuations in the carbon dioxide concentration in the stem cell production environment in the next five minutes, and the second domain knowledge can be the range of ideal environmental conditions required for stem cell growth and the influence mechanism of carbon dioxide concentration on stem cell growth. The output format can be the probability and confidence interval of abnormal fluctuations in the carbon dioxide concentration in the stem cell production environment within the next five minutes.
[0102] In the second step, use the large model to reason about the second prompt template to obtain the second prediction result.
[0103] Specifically, the large model converts the content in the second prompt template into multiple Tokens, maps all Tokens to the second high-dimensional vector representation, then performs context encoding on the second high-dimensional vector representation through the attention mechanism, passes the intermediate representation layer by layer to obtain the second encoding result, and finally decodes the second encoding result according to the attention weights to obtain the second prediction result.
[0104] Exemplarily, input the second prompt template into the large model, and the large model processes the second prompt template to obtain the second prediction result. Specifically, the large model infers the possible abnormal conditions at future times by performing zero-shot reasoning on the sensor data in combination with the second objective in the second prompt template and the required second domain knowledge.
[0105] It should be noted that after this step, the model threshold also needs to be updated. Specifically, through the formula:
[0106]
[0107] Update the mode threshold to obtain the updated mode threshold .
[0108] Among them, represents the lower limit value of the numerical range described by the mode threshold, represents the upper limit value of the numerical range described by the mode threshold, represents all sensor data at the current moment.
[0109] Perform calculations using the updated mode threshold at the next moment after the current moment.
[0110] It should be noted that updating the mode threshold according to the sensor data at the current moment can improve the adaptability of the mode threshold to the current task.
[0111] It is worth mentioning that when the mode switching condition is met, actively use the large model to infer the abnormal conditions of the sensor data, infer the possible abnormal conditions in the short term in the future for the environment of stem cell production and preparation, and give an alarm according to the abnormal conditions, so that the environment of stem cell production and preparation can be intervened in advance to reduce losses.
[0112] The following will illustrate this step with a specific example.
[0113] The early warning mode of the large model (i.e., the mode of performing this step to obtain the second prediction result) is as Figure 3 shown. The data of the sensor is uploaded to the prompt template, and at the same time, the knowledge base is used to reorganize the content of the prompt template to obtain the second prompt template. The second prompt template is input into the large model for zero-shot reasoning to obtain the reasoning result (i.e., the second prediction result above), and the reasoning result is used to feedback and correct the threshold of the prompt template.
[0114] In some embodiments of the present application, when the termination moment of the inference cycle arrives, use the sensor data of all sensors at each moment in the inference cycle to generate examples at each moment, construct a third prompt template according to all the examples, and use the large model to reason about the third prompt template to obtain a long-term inference prediction result.
[0115] The above long-term inference prediction result is used to describe the data change situation of the detection index within the inference cycle. For example, for the pH value, the long-term inference prediction result is: within the inference cycle, the pH value of the culture medium shows a trend of first decreasing and then tending to be stable. In the initial stage of the cycle, due to the gradual increase in cell metabolic activities, more metabolites such as carbon dioxide are produced, resulting in the pH value of the culture medium gradually decreasing from the initial 7.4 to about 7.2. As the production cycle progresses, the cells gradually adapt to the growth environment, the metabolic balance tends to be stable, and at the same time, the regulatory effect of the environmental control system on the CO2 concentration appears, making the pH value decrease rate slow down, and finally fluctuate within the range of 7.2 - 7.3, maintaining a relatively stable state. This pH value change trend meets the physiological requirements of stem cell growth and is conducive to the continuous proliferation and differentiation of cells.
[0116] Exemplarily, the inference cycle is 30 minutes, and the end time of the previous inference cycle is 8 o'clock. If the current time is 8:20, the end time of the inference cycle has not been reached. If the current time is 8:30, the end time of the inference cycle has been reached. For the inference cycle from 8 o'clock to 8:30, the multiple moments therein can be: 8 o'clock, 8:10, 8:20, 8:30.
[0117] In the embodiments of the present application, the steps of generating examples for each moment using the sensor data of all sensors at each moment in the inference cycle, constructing a third hint template based on all the examples, and using a large model to perform inference on the third hint template to obtain a long-term inference prediction result include:
[0118] First step, generate examples for each moment using the sensor data of all sensors at each moment in the inference cycle.
[0119] Specifically, through the formula:
[0120]
[0121] Generate the example corresponding to the th moment .
[0122] Wherein, represents the problem target, represents the triple corresponding to the th moment, , represents the th moment, represents the sensor data of all sensors at the th moment, represents the true result at the th moment, , represents the inference chain, represents the answer.
[0123] It should be noted that the problem objective is used to describe the task that the example needs to complete. The reasoning chain is used to describe the steps, basis, and logical relationships involved in the reasoning process of obtaining the answer according to the problem objective and triples in the example. The answer is used to describe the conclusion obtained according to the problem objective and the reasoning chain. For example, when the Internet of Things for stem cell production and preparation is the Internet of Things related to production environment monitoring, the above problem objective can be to analyze the change of environmental temperature during the inference period and judge whether there are abnormal fluctuations. The reasoning chain can be to first extract the environmental temperature data at each moment during the inference period, calculate statistical indicators such as the average value, maximum value, minimum value, and standard deviation of the environmental temperature, identify abnormal fluctuations of the temperature according to the statistical indicators of the environmental temperature, and finally analyze the reasons and potential risks of the temperature abnormal fluctuations in combination with the operating status and historical data of the environmental control system. The answer can be that during the inference period, the average temperature of the stem cell production environment is 37.2°C, the maximum value is 38.5°C, the minimum value is 36.5°C, there is an abnormal situation of large temperature fluctuations, which may be related to the lag of the environmental control system adjustment or the change of the external environmental temperature. It is recommended to check the sensors and adjustment devices of the environmental control system and optimize the temperature control parameters to ensure the stability of the environmental temperature.
[0124] Second, construct the third prompt template based on all examples and use the large model to reason about the third prompt template to obtain the long-term reasoning prediction result.
[0125] Specifically, through the formula:
[0126]
[0127] Construct the third prompt template .
[0128] Among them, represents the third objective, represents the mode threshold, represents the set of triples corresponding to all moments, represents the third domain knowledge, represents the set of examples corresponding to all moments.
[0129] It should be noted that the + in the above formula is a concatenation operation, which is used to concatenate all data into one piece of data. The above third objective is used to describe the task content that the large model is expected to complete (in this step, it is to analyze the data change status of the detection indicators during the inference period). The third domain knowledge is the professional knowledge or background information required for the large model to complete the third objective.
[0130] Exemplarily, when the Internet of Things for stem cell production preparation is the Internet of Things related to production environment monitoring, the above-mentioned third objective is to analyze the changing trend of the environmental conditions in the stem cell production environment during the analysis and reasoning cycle, so as to evaluate the stability and reliability of the environmental control system and provide a basis for optimizing the environmental control strategy. The third domain knowledge is the influence law of environmental condition changes on the growth quality of stem cells, the adjustment mechanism of the environmental control system, and the fault diagnosis method.
[0131] Then, the third prompt template is input into the large model for reasoning to obtain the long-term reasoning prediction result.
[0132] Exemplarily, the large model according to the target in the prompt template, the large model first extracts the corresponding time nodes , entities , , and relationships from the input , , , ), and constructs an evidence quadruple ( ). Through learning from the example , , , ), an explanatory prompt is generated. The evidence quadruple ( , , , , , ) and the explanatory prompt are used as the reasoning process of the knowledge chain. Then, the large model performs in-depth reasoning of the knowledge chain through inductive summarization of the time nodes
[0133] in the input data X, the true results
[0134] , the evidence quadruple (
[0135] ), etc., and outputs the long-term reasoning prediction result. Figure 4As shown in the figure, inputting Example 1, Example 2, …, Example k into the hint template, together with the target, domain knowledge, pattern threshold, and the input sensor data, constitutes the third hint template. During the reasoning process, based on the evidence quadruple and the explanation hint, the third hint template is reasoned to obtain the reasoning answer (i.e., the long-term reasoning prediction result in the above text).
[0136] It is worth mentioning that by adaptively switching the process of large model reasoning, the large model can automatically reason about sensor data in the short term and abnormal situations, meet different reasoning prediction requirements, adaptively monitor the stem cell production and preparation environment in real time and predict abnormalities, ensure the timeliness and reasoning depth of large model reasoning, and effectively improve the timeliness of using large model reasoning to detect abnormalities in the stem cell production and preparation environment.
[0137] In addition, the method of this application relies on a hint template framework containing a pattern threshold, controls the adaptive switching of the large model through multiple modes and reasoning depths, and realizes the monitoring and reasoning prediction of data in multiple periods. Through online learning and incremental fine-tuning, online learning is carried out on the real-time data stream, and the weights and pattern thresholds of the large model are continuously adjusted to adapt to the personalized needs of specific tasks. The knowledge chain enhanced by temporal knowledge constructs a knowledge chain through combining temporal knowledge and association relationships to reason and analyze long-term trends, and improves the accuracy of long-term prediction. By using the powerful reasoning ability and rich world knowledge of the large model, through adaptive mode switching and online learning, real-time monitoring and personalized analysis of data are realized, and the accuracy and robustness of reasoning prediction are improved. Through multiple modes and reasoning depths, the reasoning prediction requirements for different lengths of time periods are met, such as short-term anomaly detection, long-term trend analysis, etc.
[0138] Next, an exemplary description is provided for the large model reasoning device for stem cell production and preparation provided by this application.
[0139] As Figure 5 shown, the embodiment of this application provides a large model reasoning device for stem cell production and preparation. The large model reasoning device 500 for stem cell production and preparation includes:
[0140] An acquisition module 501, configured to acquire sensor data of multiple sensors at the current moment in the stem cell production and preparation Internet of Things;
[0141] A first reasoning module 502, configured to construct a first hint template based on all the sensor data at the current moment, and use the large model to reason about the first hint template to obtain a first prediction result; the first prediction result is used to describe whether the detection index corresponding to each sensor at the current moment is abnormal, and the first hint template is used to prompt the large model to perform anomaly detection on the detection index;
[0142] The second inference module 503 is configured to, when all the sensor data and the first prediction result at the current moment meet the inference mode switching condition, construct a second prompt template based on all the sensor data at the current moment and the output format of the large model, and use the large model to perform inference on the second prompt template to obtain a second prediction result; the second prediction result is used to describe the abnormal conditions of the detection indicators corresponding to each sensor at a future moment, and the second prompt template is used to prompt the large model to predict the abnormal conditions of the detection indicators.
[0143] It should be noted that for the information interaction, execution process, etc. between the above-mentioned devices / units, since they are based on the same concept as the method embodiments of the present application, their specific functions and the technical effects brought can be specifically referred to in the method embodiment part, and will not be elaborated here.
[0144] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments and will not be elaborated here.
[0145] As Figure 6 shown, an embodiment of the present application provides a terminal device. The terminal device D10 in this embodiment includes: at least one processor D100 ( Figure 6 only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, the steps in any of the above method embodiments are implemented.
[0146] Specifically, when the processor D100 executes the computer program D102, it obtains the sensor data of multiple sensors at the current moment in the Internet of Things for stem cell production and preparation, then constructs a first prompt template based on all the sensor data at the current moment, and uses a large model to reason about the first prompt template to obtain a first prediction result. When all the sensor data at the current moment and the first prediction result meet the inference mode switching condition, a second prompt template is constructed based on all the sensor data at the current moment and the output format of the large model, and the large model is used to reason about the second prompt template to obtain a second prediction result. Among them, by adaptively switching the process of large model reasoning, the large model can automatically reason about sensor data in the short term and abnormal situations, meet different inference and prediction requirements, realize real-time monitoring and abnormal prediction of the stem cell production and preparation environment adaptively, ensure the timeliness and inference depth of large model reasoning, and effectively improve the timeliness of using large model reasoning to detect abnormalities in the stem cell production and preparation environment.
[0147] The so-called processor D100 may be a central processing unit (CPU, Central Processing Unit), and this processor D100 may also be other general-purpose processors, digital signal processors (DSP, Digital Signal Processor), application specific integrated circuits (ASIC, Application Specific Integrated Circuit), off-the-shelf programmable gate arrays (FPGA, Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.
[0148] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as the hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk equipped on the terminal device D10, a smart media card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. Further, the memory D101 may also include both the internal storage unit of the terminal device D10 and the external storage device. The memory D101 is used to store an operating system, application programs, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or will be output.
[0149] The embodiments of the present application further provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0150] The embodiments of the present application provide a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executed.
[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the large model inference method device / terminal device for stem cell production and preparation, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0152] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0153] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0154] The above are the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A large-scale model reasoning method for stem cell production and preparation, characterized in that: include: Obtain sensor data of multiple sensors in the stem cell production and preparation Internet of Things at the current moment; A first prompt template is constructed based on all sensor data at the current moment, and the first prompt template is inferred using the large model to obtain a first prediction result; the first prediction result is used to describe whether the detection index corresponding to each sensor at the current moment is abnormal, the first prompt template is used to prompt the large model to perform abnormal detection on the detection index, the content in the first prompt template is converted into a first high-dimensional vector representation using the large model, and the first high-dimensional vector representation is context-encoded and then decoded to obtain a first prediction result; When all the sensor data at the current moment and the first prediction result meet the inference mode switching condition, a second prompt template is constructed based on all the sensor data at the current moment and the output format of the large model, and the large model is used to infer the second prompt template to obtain a second prediction result; the second prediction result is used to describe the abnormal condition of the detection indicator corresponding to each sensor at a future moment, and the second prompt template is used to prompt the large model to predict the abnormal condition of the detection indicator, and the large model is used to convert the content in the second prompt template into a second high-dimensional vector representation, and the second high-dimensional vector representation is context encoded and then decoded to obtain a second prediction result.
2. The large model reasoning method according to claim 1, characterized in that: The step of constructing a first prompt template based on all sensor data at the current moment includes: By formula: Constructing the First Prompt Template ; in, represents the first target of the large model, represents the mode threshold, Represents all sensor data at the current moment, represents the first domain knowledge, and + represents the concatenation and combination operation.
3. The large model reasoning method according to claim 1, characterized in that: The reasoning mode switching condition is: The first prediction result describes that at the current moment, there is at least one sensor data corresponding to an abnormal detection indicator, or at least one sensor data among all the sensor data at the current moment has a value that is not within the numerical range described by the mode threshold.
4. The large model reasoning method according to claim 1, characterized in that: The second prompt template is constructed based on all sensor data at the current moment and the output format of the large model, including: By formula: Constructing the Second Prompt Template ; in, represents the second goal of the large model, represents the mode threshold, Represents all sensor data at the current moment, represents the second domain knowledge, Indicates the output format of the large model, and + indicates the concatenation operation.
5. The large model reasoning method according to claim 1, characterized in that: The large model reasoning method also includes: When the termination moment of the reasoning cycle arrives, the sensor data of all sensors at each moment in the reasoning cycle are used to generate examples for each moment, a third prompt template is constructed based on all the examples, and the third prompt template is inferred using a large model to obtain a long-term reasoning prediction result; the long-term reasoning prediction result is used to describe the data changes of the detection indicators within the reasoning cycle.
6. The large model reasoning method according to claim 5, characterized in that: The using the sensor data of all sensors at each moment in the reasoning cycle to generate an example at each moment includes: By formula: Generate Examples of moments ; in, Indicates the problem target, Indicates The triplet corresponding to each moment is , Indicates a moment, Indicates the All sensor data at a moment in time, Indicates the The actual result of the moment, , represents the reasoning chain, Indicates answer, + indicates concatenation operation; The third prompt template is constructed according to all the examples, including: By formula: Constructing the Third Prompt Template ; in, Indicates the third goal, represents the mode threshold, represents the set of triples corresponding to all moments, Represents the third domain knowledge, Represents the set of examples corresponding to all moments.
7. The large model reasoning method according to claim 3, characterized in that: After the step of using the large model to infer the second prompt template to obtain a second prediction result, the large model inference method further includes: By formula: Update the mode threshold to obtain the updated mode threshold ; in, Indicates the lower limit of the numerical range described by the mode threshold. represents the upper limit of the numerical range described by the mode threshold, Represents all sensor data at the current moment.
8. A large model inference device based on stem cell production, characterized in that: include: An acquisition module, used to acquire sensor data of multiple sensors in the stem cell production and preparation Internet of Things at the current moment; A first reasoning module is used to construct a first prompt template based on all sensor data at the current moment, and use the large model to infer the first prompt template to obtain a first prediction result; the first prediction result is used to describe whether the detection index corresponding to each sensor at the current moment is abnormal, the first prompt template is used to prompt the large model to perform abnormal detection on the detection index, and the content in the first prompt template is converted into a first high-dimensional vector representation by using the large model, and the first high-dimensional vector representation is context-encoded and then decoded to obtain a first prediction result; The second reasoning module is used to construct a second prompt template based on all sensor data at the current moment and the output format of the large model when all sensor data at the current moment and the first prediction result meet the reasoning mode switching condition, and use the large model to infer the second prompt template to obtain a second prediction result; the second prediction result is used to describe the abnormal condition of the detection indicator corresponding to each sensor at a future moment, the second prompt template is used to prompt the large model to predict the abnormal condition of the detection indicator, and the large model is used to convert the content in the second prompt template into a second high-dimensional vector representation, and the second high-dimensional vector representation is context-encoded and then decoded to obtain a second prediction result.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the large model reasoning method as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the large model reasoning method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Stem cell offline parameter prediction method and device, equipment and storage medium
CN118136133A
Establishment method, evaluation method and device of clinical auxiliary diagnosis and treatment major large model
CN119204196A