Instrument task automatic allocation method and system for intelligent laboratory
Through the intelligent allocation mechanism combined with LSTM and CNN models, detection tasks and instruments are automatically identified and matched, which solves the problem of resource waste caused by manual reliance on detection task allocation, and realizes efficient and accurate detection task allocation, improving the operating efficiency and instrument utilization of the laboratory.
Patent Information
- Application Number
- CN202510243817.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, the allocation of detection tasks depends on manual labor, resulting in waste and unreasonable allocation of detection instrument resources, increasing work burden and dependent on the experience of allocating personnel.
The LSTM model is used to predict the completion time of the detection task, combined with the CNN model to monitor the instrument status, calculate the comprehensive score through a weighting algorithm, automatically identify and match the detection task and the corresponding instrument, and dynamically adjust the task allocation plan.
The inspection process has been optimized, which has significantly improved the efficiency of instrument use and overall inspection speed, reduced resource waste and manual intervention, and improved the flexibility and accuracy of inspection.
Smart Images

Figure CN120355120A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of laboratory management, and particularly relates to a method and system for automatically allocating instrument tasks in an intelligent laboratory. Background Art
[0002] Currently, for laboratories self-built by enterprises or organizations, government testing agencies, or other third-party testing agencies, the purpose of test task allocation is to complete the entire test task conveniently and quickly through test task allocation, and finally obtain accurate test results. Therefore, in the process of test task allocation, it is necessary to consider the idle degree and fatigue degree of test instrument equipment, as well as the matching degree between test instrument equipment and test tasks, so as to obtain the best allocation plan and achieve the purpose of saving test instrument resources.
[0003] However, the current test task allocation methods all adopt manual allocation of test tasks, generally by the test supervisor. This traditional manual allocation method of test tasks has the following disadvantages: on the one hand, it increases the workload of the allocator, and on the other hand, manual allocation completely depends on the experience of the allocator and cannot comprehensively consider the idle degree and fatigue degree of test instrument equipment. The obtained allocation plan may be unreasonable, resulting in waste of test instrument resources. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and system for automatically allocating instrument tasks in an intelligent laboratory, which can automatically identify and match test tasks with corresponding instruments, not only optimizing the test process, but also significantly improving the use efficiency of instruments and the overall test speed.
[0005] To solve the above problems, the technical solution of the present invention is as follows: A method for automatically allocating instrument tasks in an intelligent laboratory, comprising: Receiving a test task request, and obtaining task type, sample quantity, and instrument status information; Using an LSTM model to predict the completion time of the test task, where the LSTM model is trained according to historical task data and can learn the relationship between task features and completion time; Using a CNN model to monitor the current operating status of the instrument, where the CNN model is trained according to the image data of the instrument and can classify the operating status of the instrument in real time; Combining the task completion time and instrument status information, calculating a comprehensive score through a weighted algorithm, and selecting the instrument with the highest comprehensive score as the task allocation target; Allocating the test task to the selected instrument, and monitoring the task execution process, and dynamically adjusting the task allocation plan according to the instrument status and task progress.
[0006] According to an embodiment of the present invention, the input data of the LSTM model includes task type encoding, the number of samples, instrument status information, and historical task duration data.
[0007] According to an embodiment of the present invention, the input data of the CNN model is the image data of the instrument, and the output is the instrument status classification result, including the normal operation status and the fault status.
[0008] According to an embodiment of the present invention, the calculation formula for the comprehensive score in the weighted algorithm is: score = α*ω_a + (1 -α) *ω_b Where, ω_a = 1 / n is the weight to be inspected, n is the number to be inspected; ω_b = 1 / m is the inspected weight, m is the number of inspected items; α is the proportion coefficient of the weight to be inspected.
[0009] According to an embodiment of the present invention, the calculation formula for the comprehensive score in the weighted algorithm is: score = α * ω_a + β * ω_b + γ * ω_c + δ * ω_d Where, ω_a is the task completion time weight, ω_b is the instrument idle weight, ω_c is the instrument fatigue weight, ω_d is the instrument status weight, and α, β, γ, δ are the weight coefficients of each item.
[0010] According to an embodiment of the present invention, the dynamic adjustment of the task allocation scheme includes: During the task execution process, the instrument status and task progress are monitored in real time; When an instrument failure or abnormal task duration is detected, the task allocation scheme is re-evaluated; According to the new evaluation result, the task allocation is adjusted, and the task is re-allocated to other suitable instruments.
[0011] According to an embodiment of the present invention, before receiving the detection task request, the detection method is configured for the detection instrument. Different detection tasks correspond to different detection methods, and the corresponding detection instrument is specified according to the detection method corresponding to the detection task.
[0012] An instrument task automatic allocation system for a smart laboratory includes: A task receiving module, configured to receive a detection task request and obtain the task type, the number of samples, and the instrument status information; An LSTM model module, configured to predict the completion time of the detection task; A CNN model module, configured to monitor the current operation status of the instrument; An allocation decision module, which is used to combine the task completion time and instrument status information, calculate a comprehensive score through a weighted algorithm, and select the instrument with the highest comprehensive score as the task allocation target; A task allocation module, which is used to allocate the detection task to the selected instrument, monitor the task execution process, and dynamically adjust the task allocation plan according to the instrument status and task progress.
[0013] According to an embodiment of the present invention, the task allocation module includes a dynamic adjustment mechanism, which is used to monitor the instrument status and task progress in real time during the task execution process, and adjust the task allocation plan according to the new evaluation results.
[0014] An automatic instrument task allocation method for a smart laboratory, including: Receiving a detection task request, obtaining the detection method of the task, and matching the corresponding detection device according to the detection method; Obtaining the status of the detection device, determining whether there is an idle device. If so, obtaining the list of idle devices, determining whether the number of idle devices is greater than 1. If not, outputting the device as the task allocation target; if so, calculating a comprehensive score through a weighted algorithm, and selecting the instrument with the highest comprehensive score as the task allocation target; the calculation formula for the comprehensive score in the weighted algorithm is: score = α*ω_a + (1 -α) *ω_b where ω_a = 1 / n is the weight to be detected, n is the number of items to be detected; ω_b = 1 / m is the weight of the detected items, m is the number of detected items; α is the proportion coefficient of the weight to be detected.
[0015] Due to the above technical solutions, the present invention has the following advantages and positive effects compared with the prior art: In the automatic instrument task allocation method for a smart laboratory according to an embodiment of the present invention, aiming at the problem of waste of detection instrument resources existing in the existing manual allocation method, the LSTM model is used to predict the completion time of the detection task, the CNN model is used to monitor the current operating status of the instrument, the task completion time and instrument status information are combined, a comprehensive score is calculated through a weighted algorithm, and the instrument with the highest comprehensive score is selected as the task allocation target; the detection task is allocated to the selected instrument, and the task execution process is monitored, and the task allocation plan is dynamically adjusted according to the instrument status and task progress; realizing automatic identification and matching of the detection task and the corresponding instrument. When multiple instruments have the same detection method, the system will select an idle device or the instrument with the least number of items to be detected for task allocation through the binding relationship between the detection method and the instrument. This intelligent allocation mechanism not only optimizes the detection process, but also significantly improves the utilization efficiency of the instrument and the overall detection speed. Description of the Drawings
[0016] Figure 1Flow chart of the instrument task automatic allocation method for a smart laboratory in an embodiment of the present invention; Figure 2 Block diagram of the instrument task automatic allocation system for a smart laboratory in an embodiment of the present invention; Figure 3 Flow chart of another instrument task automatic allocation method for a smart laboratory in an embodiment of the present invention. Specific embodiments
[0017] The following further elaborates on a method and system for automatically allocating instrument tasks in a smart laboratory proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will be clearer based on the following description and the claims.
[0018] First embodiment Please refer to Figure 1 , this embodiment provides a method for automatically allocating instrument tasks for a smart laboratory, including the following steps: S1: Receive a detection task request, and obtain the task type, the number of samples, and the instrument status information; S2: Use an LSTM model to predict the completion time of the detection task. This LSTM model is trained based on historical task data and can learn the relationship between task features and the completion time; S3: Use a CNN model to monitor the current operating status of the instrument. This CNN model is trained based on the image data of the instrument and can classify the operating status of the instrument in real time; S4: Combine the task completion time and the instrument status information, calculate a comprehensive score through a weighted algorithm, and select the instrument with the highest comprehensive score as the task allocation target; S5: Allocate the detection task to the selected instrument, monitor the task execution process, and dynamically adjust the task allocation plan according to the instrument status and task progress.
[0019] By introducing the long short-term memory network LSTM and the CNN convolutional neural network, the instrument task automatic allocation method for a smart laboratory can achieve more accurate task duration prediction, more real-time instrument status monitoring, and more optimized task allocation strategies. This not only improves the intelligence level of the system but also significantly enhances the operation efficiency of the laboratory and the utilization rate of instruments.
[0020] Specifically, there are usually various types of equipment in the laboratory, and different types of equipment implement different detection methods. And the samples to be detected often have their dedicated detection methods, and the target equipment can be matched through this detection method. Therefore, before starting to execute the detection task, it is necessary to encode the detection method adopted by the task of the detection sample and bind the detection method encoding with the instrument equipment to ensure that the task can be correctly allocated.
[0021] In step S1, a detection task request is received to obtain the task type, the number of samples, and the instrument status information. According to the received detection task request, the task type and the number of samples are obtained by parsing; the task type indicates the detection method of the samples. According to this detection method, the corresponding instrument equipment is searched. If there is no match, it is directly fed back to the user; if there is a matching instrument equipment, the status information of all matching instrument equipment is obtained, and this status information includes idle and in operation.
[0022] In step S2, an LSTM model is used to predict the completion time of the detection task. In a smart laboratory, the duration of different detection tasks may vary due to factors such as sample type, instrument status, and operating personnel. Accurately predicting the task duration is crucial for optimizing task allocation and reducing instrument idle time. The LSTM model is used to predict the completion time of each detection task in order to more reasonably arrange the task queue.
[0023] Specifically, the input data of the LSTM model: task type (such as chemical analysis, physical detection, etc.), the number of samples, the current status of the instrument (such as idle degree, fatigue degree), historical task duration data; Output data: predicted task completion time; The implementation method includes the following steps: Data collection: Historical task data is collected, including task type, the number of samples, instrument status, and actual completion time; as follows: Task ID | Task Type | Number of Samples | Idle Degree | Fatigue Degree | Completion Time 001 | Task A | 10 | 0.8 | 0.2 | 30 minutes 002 | Task B | 5 | 0.9 | 0.1 | 20 minutes Data preprocessing: The task type is encoded as a numerical value, and the time series data is normalized. Model construction: An LSTM network is used to process the time series data to learn the relationship between task features and completion time. This LSTM network is a relatively mature existing technology, and its structure is not specifically introduced here. An LSTM model can be built using Python and TensorFlow / Keras, as follows: import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import LSTM, Dense model = Sequential() model.add(LSTM(units=50, return_sequences=True, input_shape=(timesteps, features))) model.add(LSTM(units=50)) model.add(Dense(units=1)) model.compile(optimizer='adam', loss='mean_squared_error')。
[0024] Model training: Use historical data to train the LSTM model and optimize the prediction accuracy.
[0025] Model application: When assigning tasks, input the current task features, predict the task completion time, and optimize the task queue arrangement.
[0026] In step S3, use the CNN model to monitor the current operating state of the instrument. Image data of the instrument can be obtained through a camera or sensor to monitor the operating state of the instrument in real time (such as whether it is operating normally or there are abnormalities).
[0027] Specifically, the input data of the CNN model: Image data of the instrument; Output data: Instrument status classification (normal or faulty).
[0028] The implementation method includes the following steps: Data collection: Collect image data of the instrument, including images in normal operating state and faulty state; Data preprocessing: Normalize the image data (such as resizing, normalizing pixel values); Model construction: Use the CNN network to process the image data and learn the relationship between image features and the instrument status; The CNN model can be built using Python and TensorFlow / Keras as follows: import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten,Dense model = Sequential() model.add(Conv2D(filters=32, kernel_size=(3, 3), activation='relu',input_shape=(image_height, image_width, channels))) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Conv2D(filters=64, kernel_size=(3, 3), activation='relu')) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Flatten()) model.add(Dense(units=128, activation='relu')) model.add(Dense(units=1, activation='sigmoid')) model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])。
[0029] Model training: Use image data to train the CNN model and optimize the state classification accuracy; Model application: Monitor the instrument status in real time, classify the instrument operating status, and detect faults in a timely manner.
[0030] In addition, this CNN model is also used to combine image data and task data to optimize the task assignment strategy, reduce the instrument idle time and task waiting time. That is, in step S4, the combined task completion time and instrument status information are used to calculate a comprehensive score through a weighted algorithm, and the instrument with the highest comprehensive score is selected as the task assignment target.
[0031] In step S4, after obtaining the list of instruments matching the samples to be inspected, filter out the instruments in the idle state. If there are multiple idle instruments, use a weighted algorithm to calculate the comprehensive score, and select the instrument with the highest comprehensive score as the task assignment target. The calculation formula for the comprehensive score in this weighted algorithm is: score = α*ω_a + (1 -α) *ω_b Among them, ω_a = 1 / n is the weight to be inspected, where n is the quantity to be inspected; ω_b = 1 / m is the weight of the inspected ones, where m is the quantity of the inspected ones; α is the proportion coefficient of the weight to be inspected. For each instrument, a weight to be inspected is calculated, which can be the reciprocal of the quantity to be inspected, so that the instrument with a smaller quantity to be inspected has a higher weight; similarly, for each instrument, a weight of the inspected ones is calculated, which can be the reciprocal of the quantity of the inspected ones, so that the instrument with a smaller quantity of the inspected ones has a higher weight.
[0032] In addition, after obtaining the list of instruments matching the samples to be inspected, the direct weighting algorithm is used to calculate the comprehensive score, and the instrument with the highest comprehensive score is selected as the task assignment target. The calculation formula for the comprehensive score in this weighting algorithm is: score = α * ω_a + β * ω_b + γ * ω_c + δ * ω_d Among them, ω_a is the weight of the task completion time, ω_b is the weight of the instrument idle degree, ω_c is the weight of the instrument fatigue degree, ω_d is the weight of the instrument status, and α, β, γ, δ are the weight coefficients, and each weight coefficient can be adjusted according to the actual situation.
[0033] In step S5, the detection task is assigned to the selected instrument, and the task execution process is monitored, and the task assignment scheme is dynamically adjusted according to the instrument status and the task progress. Among them, dynamically adjusting the task assignment scheme includes: During the task execution process, the instrument status and the task progress are monitored in real time; When an instrument failure or an abnormal task duration is detected, the task assignment scheme is re-evaluated; According to the new evaluation result, the task assignment is adjusted, and the task is re-assigned to other suitable instruments.
[0034] The above-mentioned method for automatically assigning instrument tasks in the intelligent laboratory greatly improves the operation efficiency and accuracy of the laboratories in the chemical industry. Through the precise binding of tasks and instruments, and by calculating the most suitable detection instrument through the status monitoring and intelligent weighting score mechanism, the efficient and accurate assignment of tasks is realized, and the detection process is optimized. In addition, the automatic fault detection and processing capabilities, including task cancellation, sample loading, and automatic re-assignment, ensure the continuity of the experiment and the maximum utilization of the instruments. This automated and intelligent solution not only reduces manual intervention, reduces operation errors, but also improves work flexibility, extends the equipment life, and greatly reduces the expenditure cost for the laboratory.
[0035] Based on the same concept, this embodiment also provides an automatic instrument task assignment system for an intelligent laboratory. Please refer to Figure 2 and this system includes: A task receiving module, which is used to receive a detection task request and obtain task type, sample quantity, and instrument status information; An LSTM model module for predicting the completion time of detection tasks; A CNN model module for monitoring the current operating status of the instrument; An allocation decision module for combining the task completion time and instrument status information, calculating a comprehensive score through a weighted algorithm, and selecting the instrument with the highest comprehensive score as the task allocation target; A task allocation module for allocating detection tasks to the selected instrument, monitoring the task execution process, and dynamically adjusting the task allocation plan according to the instrument status and task progress.
[0036] Among them, the task allocation module includes a dynamic adjustment mechanism for real-time monitoring of the instrument status and task progress during the task execution process, and adjusting the task allocation plan according to the new evaluation results.
[0037] This system is used to implement the above-mentioned automatic instrument task allocation method for the intelligent laboratory, and its specific implementation is similar and will not be elaborated here.
[0038] The second embodiment Please refer to Figure 3 , this embodiment provides an automatic instrument task allocation method for an intelligent laboratory, including: Receiving a detection task request, obtaining the detection method of the task, and matching the corresponding detection equipment according to the detection method; Obtaining the status of the detection equipment, determining whether there is an idle equipment. If so, obtaining the list of idle equipment, determining whether the number of idle equipment is greater than 1. If not, outputting this equipment as the task allocation target; if so, calculating a comprehensive score through a weighted algorithm, and selecting the instrument with the highest comprehensive score as the task allocation target; the calculation formula for the comprehensive score in this weighted algorithm is: score = α*ω_a + (1 -α) *ω_b Among them, ω_a = 1 / n is the weight to be detected, n is the number of items to be detected; ω_b = 1 / m is the weight of the detected items, m is the number of detected items; α is the proportion coefficient of the weight to be detected.
[0039] Specifically, for the specific method code required for the task of detecting samples, bind the detection method code to the instrument to ensure that the task can be correctly allocated. Query the bound instrument according to the received task code. If the corresponding instrument is not found, the system will notify the user of the task matching exception by email. If the corresponding instrument is found, obtain the status of all equipment that meets the current detection method, count the number of items to be detected and the number of detected items for each instrument, and determine the most suitable detection instrument through weighted calculation. When obtaining the status of the list of dedicated machines that can detect and screening out the idle status, the following situations exist: a. If both are in the idle or running state, find the instrument with the highest score according to the optimal instrument recommendation algorithm and output it.
[0040] b. If there is only one idle device in the list, directly output this device as the detection instrument.
[0041] c. If some are idle and some are running, only screen out the instrument list from the idle ones, and find the instrument with the highest score according to the optimal instrument recommendation algorithm and output it.
[0042] Among them, the optimal instrument recommendation algorithm includes the following steps: Screen the instruments that support this task type according to the detection method number, count the number of samples to be detected and the number of samples already detected for each instrument, and calculate the comprehensive score: score = α*ω_a + (1 -α) *ω_b Among them, α is the proportion coefficient of the weight to be detected. Select the instrument with the highest comprehensive score for task allocation. Update the number of samples to be detected and the number of samples already detected for the selected instrument. When calculating the weight, for each instrument, calculate a weight to be detected, which can be the reciprocal of the number of samples to be detected, so that the instrument with fewer samples to be detected has a higher weight. For each instrument, calculate a weight of samples already detected, which can be the reciprocal of the number of samples already detected, so that the instrument with fewer samples already detected has a higher weight.
[0043] If a failure occurs, the following processing is carried out: Task cancellation and sample loading: When the instrument fails, cancel the task operation and load the samples to be detected.
[0044] Automatic allocation: Automatically allocate the task to the next instrument that meets the task requirements. And roll back the previous statistics.
[0045] Alarm and notification: If there is no suitable instrument, the system will alarm and notify the user by email.
[0046] This method is more efficient compared with Embodiment 1.
[0047] The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, provided that these changes fall within the scope of the claims of the present invention and their equivalent technologies, they still fall within the protection scope of the present invention.
Claims
1. An automatic instrument task allocation method for an intelligent laboratory, characterized in that, Including: Receiving a detection task request, and obtaining the task type, the number of samples, and the instrument status information; Using an LSTM model to predict the completion time of the detection task, where the LSTM model is trained based on historical task data to learn the relationship between task features and the completion time; Using a CNN model to monitor the current operating status of the instrument, where the CNN model is trained based on the image data of the instrument to classify the operating status of the instrument in real time; Combining the task completion time and the instrument status information, calculating a comprehensive score through a weighted algorithm, and selecting the instrument with the highest comprehensive score as the task allocation target; Allocating the detection task to the selected instrument, and monitoring the task execution process, and dynamically adjusting the task allocation plan according to the instrument status and the task progress.
2. The method for automatically allocating instrument tasks in the intelligent laboratory according to claim 1, characterized in that, The input data of the LSTM model includes task type encoding, the number of samples, instrument status information, and historical task duration data.
3. The method for automatically allocating instrument tasks in the intelligent laboratory according to claim 1, wherein, The input data of the CNN model is the image data of the instrument, and the output is the instrument status classification result, including the normal operating status and the fault status.
4. The method for automatically allocating instrument tasks in the intelligent laboratory according to claim 1, characterized in that, In the weighted algorithm, the calculation formula for the comprehensive score is: score = α*ω_a + (1 -α) *ω_b where ω_a = 1 / n is the weight to be inspected, n is the number to be inspected; ω_b = 1 / m is the weight of the inspected, m is the number of inspected; α is the proportion coefficient of the weight to be inspected.
5. The method for automatically allocating instrument tasks in a smart laboratory according to claim 1, wherein In the weighted algorithm, the calculation formula for the comprehensive score is: score = α * ω_a + β * ω_b + γ * ω_c + δ * ω_d where ω_a is the task completion time weight, ω_b is the instrument idle weight, ω_c is the instrument fatigue weight, ω_d is the instrument status weight, and α, β, γ, δ are the weight coefficients of each item.
6. The method for automatically allocating instrument tasks in the intelligent laboratory according to claim 1, wherein The dynamic adjustment of the task allocation plan includes: During the task execution process, real-time monitoring of the instrument status and the task progress; When an instrument failure or an abnormal task duration is detected, re-evaluating the task allocation plan; According to the new evaluation result, adjusting the task allocation and reallocating the task to other suitable instruments.
7. The instrument task automatic allocation method of the intelligent laboratory according to claim 1, characterized in that Before receiving the detection task request, configuring the detection method for the detection instrument. Different detection tasks correspond to different detection methods, and the corresponding detection instrument is specified according to the detection method corresponding to the detection task.
8. An instrument task automatic allocation system for a smart laboratory, characterized in that, Including: A task receiving module, which is used to receive a detection task request and obtain the task type, the number of samples, and the instrument status information; An LSTM model module, which is used to predict the completion time of the detection task; A CNN model module, which is used to monitor the current operating status of the instrument; An allocation decision module, which is used to combine the task completion time and the instrument status information, calculate a comprehensive score through a weighted algorithm, and select the instrument with the highest comprehensive score as the task allocation target; A task allocation module, which is used to allocate the detection task to the selected instrument, monitor the task execution process, and dynamically adjust the task allocation plan according to the instrument status and the task progress.
9. The instrument task automatic allocation system for a smart laboratory according to claim 8, characterized in that The task allocation module includes a dynamic adjustment mechanism, which is used to real-time monitor the instrument status and the task progress during the task execution process, and adjust the task allocation plan according to the new evaluation result.
10. An automatic instrument task allocation method for a smart laboratory, characterized in that, Including: Receive a detection task request, obtain the detection method of the task, and match the corresponding detection device according to the detection method; Obtain the status of the detection device, determine whether there is an idle device. If so, obtain the list of idle devices, and determine whether the number of idle devices is greater than 1. If not, output the device as the task allocation target. If so, calculate the comprehensive score through a weighted algorithm, and select the instrument with the highest comprehensive score as the task allocation target. The calculation formula for the comprehensive score in the weighted algorithm is: score = α*ω_a + (1 -α) *ω_b where ω_a = 1 / n is the weight to be inspected, n is the number of items to be inspected; ω_b = 1 / m is the weight of the inspected items, m is the number of inspected items; α is the proportion coefficient of the weight to be inspected.