Inference computing device, model training device, inference computing system
By deploying inference computing devices from the user side to the edge side, the problems of poor data processing timeliness and high resource usage in cloud computing are solved, edge-side decision-making and cloud-side optimization are realized, and the efficiency and accuracy of data processing are improved.
Patent Information
- Application Number
- CN201980003145.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-20
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-12-20
AI Technical Summary
In a cloud computing environment, the user-side-cloud computing architecture has problems with poor data processing timeliness and high cloud device resource usage, especially when a large amount of data to be processed is uploaded and stored.
Adopting user-side-edge-side-cloud computing architecture, the inference computing device is deployed on the edge side, receives the inference model from the model training device, performs inference calculation on the data to be processed in the production and manufacturing stage, evaluates the model performance, and updates the model in a timely manner to ensure Calculation accuracy reduces resource usage on cloud devices.
It improves the timeliness of data processing, reduces the burden on cloud devices, and ensures the accuracy of inference results and continuous optimization of models.
Smart Images

Figure CN113597618B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to an inference computing device, a model training device, and an inference computing system. Background Art
[0002] Cloud computing technology has the characteristics of strong computing power, high availability, and high scalability. At the same time, applications in cloud computing are deployed on cloud devices, and users can obtain application services from cloud devices on demand, which improves the convenience of users obtaining application services and improves the overall utilization rate of computing resources. Summary of the invention
[0003] On the one hand, an inference computing device is provided, comprising at least one processor and a memory; the memory stores program instructions. The program instructions can be executed by the at least one processor to enable the inference computing device to perform the following operations: receiving a first inference model from a model training device, wherein the first inference model is based on a first training sample library and is obtained by the model training device through model training; the first training sample library includes training samples from historical data generated in the production and manufacturing stage, and the model training device includes a cloud device; based on the first inference model, performing inference calculations on the data to be processed generated in the production and manufacturing stage, and obtaining inference results, and sending the inference results to a user-side device, wherein the inference computing device is closer to the user-side device than the model training device; evaluating the performance of the first inference model to determine whether the first inference model needs to be updated, and if so, updating the first inference model.
[0004] In some embodiments, the historical data includes product images marked with defect information content; the data to be processed includes original product images generated during the production and manufacturing stage; and the inference result includes identifying defect type information in the original product image.
[0005] In some embodiments, updating the first inference model includes: performing model training based on a second training sample library to obtain a second inference model; or sending a model update request to the model training device to obtain a second inference model, wherein the second training sample library includes training samples from historical data and / or training samples from the inference results that have been re-judged. If the second inference model meets the update condition, the first inference model is updated with the second inference model.
[0006] In some embodiments, the update condition includes: testing the second reasoning model, and the second reasoning model passes the test. The test includes evaluating the performance of the second reasoning model based on a test sample, and if the performance meets the evaluation requirements, it is determined to have passed the test.
[0007] In some embodiments, the update condition also includes: grayscale deployment of the second inference model, and evaluating its performance during the grayscale deployment process, and the performance of the second inference model meets the evaluation requirements.
[0008] In some embodiments, the update condition further includes: verifying configuration information of the second reasoning model, and the configuration information matches the reasoning calculation to be performed.
[0009] In some embodiments, before performing model training to obtain a second inference model; or before sending a model update request to a model training device to obtain a second inference model, the inference computing device also performs the following operations: determining whether the training parameters required for the model training to be performed are within a set training parameter range; if so, performing the model training; if not, sending the model update request to the model training device.
[0010] In some embodiments, the training parameters include: at least one of the data scale required for model training, training duration, and computing power.
[0011] In some embodiments, the evaluation parameters for evaluating the performance of the inference model include: at least one of the accuracy, precision, recall, and F score of the inference model during the inference calculation process. The situation where the first inference model needs to be updated according to the performance evaluation includes: the first inference model has performance fluctuations or performance degradation, wherein whether the first inference model has performance fluctuations or performance degradation is judged based on the changes of the evaluation parameters in a continuous time period.
[0012] In some embodiments, the situation where the first inference model needs to be updated according to the performance evaluation includes: receiving a third inference model, the third inference model is obtained by the model training device based on the updated first training sample library when the model update request is not received, and the updated first training sample library includes training samples from the inference result and re-judged. Comparing the performance of the first inference model with the third inference model, if the performance of the third inference model is higher than that of the first inference model, or if the first inference model is abnormal, updating the first inference model with the third inference model.
[0013] In some embodiments, when the first inference model is updated with the second inference model, the inference computing device also performs the following operations: performs a performance evaluation on the second inference model, and compares the performance of the first inference model with the second inference model; when the performance of the second inference model is worse than that of the first inference model, rolls back the second inference model to the first inference model; re-performs model training, or re-requests the model training device to perform model training.
[0014] In some embodiments, after obtaining the inference result, the inference computing device further performs the following operations: generating a decision instruction according to the inference result. The defect information includes: the original product image with defects identified, and its defect location and defect type; the decision instruction includes: performing corresponding defect processing on the product corresponding to the original product image with defects according to the defect information of the original product image.
[0015] On the other hand, a model training device is provided, comprising at least one processor and a memory; the memory stores program instructions, the program instructions can be executed by the at least one processor, so that the model training device performs the following operations: model training is performed based on a first training sample library to obtain a first inference model; the first training sample library includes training samples from historical data generated in the production and manufacturing stage. The first inference model is sent to an inference computing device; when a model update request is received from the inference computing device, model training is performed based on the updated first training sample library to obtain a second inference model; the updated first training sample library includes training samples that are the inference results from the first inference model and have been re-judged. The second inference model is sent to the inference computing device.
[0016] In some embodiments, during the process of performing model training based on the first training sample library, or the updated first training sample library, the model training device performs the following operations: generates training task information; generates training configuration data based on the training task information; obtains training samples from the corresponding training sample library, and performs model training based on the training samples and the training configuration data to obtain a corresponding inference model.
[0017] In some embodiments, in the process of acquiring training samples from the corresponding training sample library, performing model training based on the training samples and the training configuration data, and obtaining the corresponding inference model, the model training device also performs the following operations: monitoring the model training process; updating the training configuration data when an abnormality occurs in the model training process; and performing model training based on the training samples and the updated training configuration data.
[0018] In some embodiments, before sending the first inference model or the second inference model to the inference computing device, the model training device also performs the following operations: verifying the model version information of the corresponding inference model to determine whether the model version information is correct; if so, sending the corresponding inference model to the inference computing device; if not, searching for the corresponding inference model whose model version meets the requirements; if found, sending it to the inference computing device; or, if not found, sending a notification message to the inference computing device.
[0019] In some embodiments, the model training device also includes the first training sample library, and the model training device also performs the following operations: updating the first training sample library; performing model training based on the updated first training sample library to obtain a third inference model without receiving the model update request; and sending the third inference model to the inference computing device.
[0020] On the other hand, a computer-readable storage medium is provided, storing program instructions; the program instructions can be executed by a processor to enable the inference computing device to perform the following operations: receiving a first inference model, the first inference model is based on a first training sample library and is obtained through model training; the first training sample library includes training samples from historical data. Based on the first inference model, inference calculations are performed on the data to be processed in industrial production, and inference results are obtained. The performance of the first inference model is evaluated to determine whether the first inference model needs to be updated, and if so, the first inference model is updated.
[0021] On the other hand, a computer-readable storage medium is provided, which stores program instructions; the program instructions can be executed by a processor to enable the model training device to perform the following operations: perform model training based on a first training sample library to obtain a first inference model; the first training sample library includes training samples from historical data. Send the first inference model to an inference computing device. In the case of receiving a model update request from the inference computing device, perform model training based on the updated first training sample library to obtain a second inference model; the updated first training sample library is obtained by updating the first training sample library using the inference results from the first inference model and the training samples that have been re-judged. Send the second inference model to the inference computing device.
[0022] On the other hand, an inference computing system is provided, comprising: an inference computing device as described in any of the above embodiments, and a model training device as described in any of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1A schematic diagram of a user-side-cloud computing architecture according to the related art;
[0024] Figure 2 A schematic diagram of a cloud user side-edge side-cloud computing architecture according to the related art;
[0025] Figure 3 is a structural schematic diagram of an inference computing device according to some embodiments of the present disclosure;
[0026] Figure 4 is a schematic diagram of interaction between an inference computing device and a model training device according to some embodiments of the present disclosure;
[0027] Figure 5 is a structural schematic diagram of a model training device according to some embodiments of the present disclosure;
[0028] Figure 6 is a schematic diagram of interaction between another inference computing device and a model training device according to some embodiments of the present disclosure;
[0029] Figure 7 is a schematic diagram of interaction between another inference computing device and a model training device according to some embodiments of the present disclosure;
[0030] Figure 8 is a flowchart of the operation steps of a model training device according to some embodiments of the present disclosure;
[0031] Fig. 9 is a flowchart of the operation steps of another model training device according to some embodiments of the present disclosure;
[0032] Fig.10 is a structural schematic diagram of an inference computing system according to some embodiments of the present disclosure;
[0033] Fig.11 It is a structural diagram of an inference computing device and a structural diagram of a model training device according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0034] Some embodiments of the present disclosure will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present disclosure.
[0035] In industrial production, problems in equipment, parameters, operation, environmental interference and other links may cause the products produced to fail to meet process requirements or even be defective. Therefore, it is necessary to find out the defective products that do not meet the requirements in time after each process to avoid further production of defects. Furthermore, the operating status of the production system can be predicted based on the real-time monitoring data in the production equipment, such as changes in temperature, pressure, humidity, etc., to prevent problems such as product defects or equipment damage in advance.
[0036] With the continuous development of artificial intelligence, factories can use machine learning methods to train models based on the large amount of production data that has been generated, obtain inference models, and apply the models to the subsequent production process for inference and prediction, thereby replacing factory operators and data analysts, improving production efficiency and reducing labor costs. Machine learning algorithms include support vector machines (SVM), cascade algorithms (Adaboost), decision trees, random forests, and deep learning algorithms based on neural networks.
[0037] Cloud computing is a type of distributed computing. Cloud computing can decompose data computing programs into multiple small computing programs through the network "cloud". It has the characteristics of strong computing power, high availability, and high scalability. A large amount of production data will be generated in the production process of the factory. Cloud computing can train an inference model to process this large amount of production data, and perform inference calculations on the production data through the inference model. In this way, a system composed of multiple servers (that is, cloud devices) performs inference calculations on the data to be processed uploaded by the user-side device (that is, the production equipment in the factory) to obtain inference results, and then analyzes the inference results to obtain cloud decision results, and sends the cloud decision results to the user-side device, thereby realizing the Internet of Things in the production process. Here, the above-mentioned computing architecture is called the user-side-cloud computing architecture.
[0038] Refer to the following Figure 1 , an exemplary introduction to the user-side-cloud computing architecture is given. The user-side device 3' uploads the data to be processed (i.e., the production data generated by the production equipment) to the cloud device 2', and the cloud device 2' performs inference calculations on the uploaded data to be processed, obtains a decision result, and then sends the decision result back to the user-side device 3'. The user-side device 3' takes corresponding actions based on the received decision result, thereby enabling unified management of the user-side device 3'.
[0039] However, the amount of data to be processed uploaded by the user-side device 3' is relatively large. During the uploading process of the data to be processed, the network bandwidth and network management authority used for uploading will greatly limit the upload speed, resulting in poor timeliness of data processing. In addition, a large amount of data to be processed needs to be stored first after being uploaded to the cloud device 3', which will occupy more resources of the cloud device 3' and bring a greater burden to the cloud device.
[0040] In order to solve the problems existing in the above-mentioned user-side-cloud computing architecture, a user-side-edge-side-cloud computing architecture can be used to process the production data generated during the production preparation process.
[0041] See also Figure 3 to Figure 5 Some embodiments of the present disclosure provide an inference computing device 100, including at least one processor 110 and a memory 120. The memory 120 stores program instructions. The program instructions can be executed by the at least one processor 110 to enable the inference computing device 100 to perform the following operations S10 to S40:
[0042] S10, receiving a first inference model from the model training device 200. The first inference model is based on a first training sample library, obtained by the model training device 200 through model training, the first training sample library includes training samples from historical data generated in the past production and manufacturing stages, and the model training device 200 includes a cloud device. That is, the model training device 200 can be a cloud device.
[0043] In one example, the model training device 200 trains the neural network model, mainly including the following steps: selecting a network topology; using a set of training data representing the problem modeled by the network; and adjusting the weights until the network model exhibits the minimum error for all instances of the training data set. For example, during a supervised learning training process for a neural network, the output generated by the network in response to an input representing an instance in the training data set is compared with the "correct" labeled output of the instance; an error signal representing the difference between the output and the labeled output is calculated; and when the error signal is propagated backward through the layers of the network, the weights associated with the connection are adjusted to minimize the error. When the error of each output generated from an instance of the training data set is minimized, the neural network model is considered to be "trained" and can be used for artificial intelligence reasoning tasks.
[0044] The reasoning and training process of neural network models involves a large number of parameters, activation values, and gradient value buffers, each of which must be completely updated in each training iteration, which places very high demands on computing and throughput capabilities. GPUs (Graphics Processing Units) have a simple programming model, strong parallel capabilities, and high video memory bandwidth, making them extremely efficient in processing calculations associated with training deep neural networks. Therefore, using a GPU cluster that integrates multiple GPUs can effectively improve the training and reasoning speed of neural network models.
[0045] The inference model can be a neural network model, for example, a feedforward neural network model, a convolutional neural network (CNN) model, a recurrent neural network (RNN) model, a generative adversarial network (GAN) model, but is not limited to these, and other neural network models known to those skilled in the art may also be used.
[0046] S20. Based on the first inference model, perform inference calculation on the data to be processed generated in the production and manufacturing stage to obtain an inference result, and send the inference result to the user-side device. The inference calculation device 100 is closer to the user-side device than the model training device 200.
[0047] In one example, see Figure 2 , the inference computing device 100 is an edge device 1', the model training device 200 is a cloud device 2', the edge device 1' is deployed between the user device 3' and the cloud device 2', and close to one end of the user device 3', the edge device 1' uses the inference model to perform inference calculations on the data to be processed from the user device 3', thereby obtaining an edge decision result, and sending the edge decision result to the user device 3'; or, the edge device 1' uploads the calculation result after inference calculation to the cloud device 2', and the cloud device 2' processes and analyzes the uploaded calculation result to obtain a cloud decision result, and then sends the cloud decision result to the user device 3'. In another example, the edge device 1' can be integrated into the user device 3', that is, the user device 3' generates production data and performs inference calculations on the generated production data.
[0048] Compared with the cloud device 2', the edge device 1' is closer to the user device 3', so the transmission of the data to be processed takes relatively less time, which increases the timeliness of data processing. In addition, since there is no need to upload the data to be processed to the cloud device 2', the resources of the cloud device 2' are less occupied, thereby reducing the burden on the cloud device. In addition, in the above-mentioned user-side-edge-cloud computing architecture, the cloud device 2' can make full use of its powerful computing power to perform model training work that does not require real-time feedback decisions.
[0049] It should be noted that the inference model in the edge device 1' refers to an algorithm structure that uses a certain algorithm (such as a machine learning algorithm) to perform inference calculations. Here, it is necessary to obtain an inference model that meets the inference calculation requirements of the edge device 1' through model training. Model training refers to extracting specific features of a large number of training samples through multiple iterations and calculations, and finally obtaining an algorithm structure and parameter values that can converge on a data set with the specific features, that is, obtaining an inference model that can identify data with specific features.
[0050] Among them, there are a large number of training data set samples and verification data sets used for model training, as well as a test data set for testing the trained model. All three include original image samples and corresponding annotation information. The original image samples in the three can completely overlap, have intersections, or even have no intersection at all. Correspondingly, the training data set, verification data set, and test data set completely overlap, have intersections, or even have no intersection at all. No intersection at all is an ideal situation, so that the training model trained in this way is relatively reliable.
[0051] For example, in the production process of display panels, it is necessary to take pictures of the display panels after each process step is completed to obtain an image of the display panel (such as an image of the array substrate). By identifying whether there are defects in the image, as well as the type and location of the defects, the defect information of the display panel is obtained, and the display panel with defects and its defect information are marked, and then the corresponding repair process is used to repair them according to different defects. Image recognition can realize computer vision recognition through a deep learning neural network model. After sample training through the cloud device 1', the inference model is sent to the edge device 2'. The image generated by the user side 3' is directly transmitted through the edge device 2' to quickly make inference calculations, eliminating the bandwidth pressure and delay of transmitting to the cloud computing.
[0052] Exemplarily, the implementation method of identifying defective content in an image through a neural network model is as follows: first, the product image is scaled to a fixed pixel size of M×N (or not), and then the M×N image is sent to a deep convolutional neural network, such as VGGNet, ResNet, and MobileNet; through multiple layers of convolutional layers, activation layers, and pooling layers, the feature map of the entire image is obtained; the feature map is input into a screening region network (ZF / SSD / RPN, etc.), and after calculation, a proposal region is obtained; then, convolution and pooling operations are performed on the proposal region to obtain a regional feature map (proposal feature) of the proposal region, and then the regional feature map (proposal feature) is sent to the subsequent full connection and softmax network for classification (classification, that is, what kind of defect the proposal is), and the defect category with the highest probability is obtained as the final classification result, and the category and probability are recorded. In addition, the coordinates and size of the proposal region represent the location and size of the defect. The method for identifying product defect content based on the defect model may adopt similar variations of the above method or other methods known to those skilled in the art, and the present disclosure does not limit this.
[0053] S30: Evaluate the performance of the first reasoning model to determine whether the first reasoning model needs to be updated.
[0054] As the data to be processed from the user-side device 3' is continuously generated and updated, data to be processed with new features (features that have not appeared during model training) continues to appear, resulting in a gradual decrease in the reasoning computing power of the inference model, and the accuracy of the edge-side decision results obtained by the inference model decreases accordingly. Taking the production and preparation of display panels as an example, factors such as the production and preparation of new models, the updating and upgrading of production processes, and the replacement of production equipment may cause new types of defects in the prepared display panels. The new types of defects have not appeared in the training samples of the inference model during model training, which will cause the inference model to be unable to identify the new types of defects, so that the inference model no longer meets the defect identification and classification requirements in the production and preparation process.
[0055] As mentioned above, the inference model needs to be obtained through a large number of training samples and after model training. Among them, the training sample can be regarded as a data set formed by at least one piece of data, and the training sample can include data in various forms. Exemplarily, the training data may include images, videos, audio, etc., which are not specifically limited here. A large number of training samples used to train the first inference model are from the first training sample library, and the training samples in the first training sample library include training samples from historical data. Here, historical data refers to production data that has been judged and marked with correct results. Exemplarily, the production data is judged by manual judgment or other equipment that can correctly judge to obtain the historical data as described above. Since the historical data has been marked with correct results, it can be used as a training sample in model training.
[0056] Exemplarily, taking the production and preparation of display panels as an example, the data to be processed by the first reasoning model includes the original product image generated in the production stage, and the reasoning result of the first reasoning model includes the defect information in the original product image. Here, the original product image is an unprocessed image, and the first reasoning model needs to perform reasoning calculations on the original product image to obtain the defect information in the original product image, for example, to identify the defect location and defect type. The historical data as described above includes product images marked with defect types, and here, the marked defect type is the correct result. It should be noted that when the reasoning and calculation device 100 evaluates the performance of the first reasoning model, it will compare the reasoning result obtained by the first reasoning model after reasoning and calculation with the correct result, so as to achieve the performance evaluation of the first reasoning model. Here, the correct result can be input into the reasoning and calculation device 100 after manual judgment.
[0057] For example, taking the production and preparation of display panels as an example, the staff judges the original product images of the display screens on the production line within a fixed period (for example, 14:00-15:00 every day) to judge the original display screen images with defects, mark the defect types, and then input the results of the manual judgment as the correct results into the inference computing device 100. In other examples, a fixed number of original product images are randomly selected for manual judgment to obtain the results of the manual judgment. In other examples, the original product images of a specified batch of display screens are manually judged to obtain the results of the manual judgment.
[0058] Exemplarily, during the process of performing inference calculations on the data to be processed generated in the production and manufacturing stage based on the first inference model in S20, S30 is performed to evaluate the performance of the first inference model.
[0059] S40: If yes, update the first reasoning model.
[0060] In the reasoning computing device 100 as described above, by performing a performance evaluation on the first reasoning model, it is possible to know whether the performance of the first reasoning model meets the current reasoning requirements, or to predict the change trend of the performance of the first reasoning model based on the performance evaluation result, so as to determine whether the first reasoning model needs to be updated. When it is known that the performance of the first reasoning model does not meet the current reasoning requirements, or when it is known through prediction that the performance of the first reasoning model will not meet the reasoning requirements, that is, when it is determined that the first reasoning model needs to be updated, the first reasoning model is updated. In this way, the performance of the first reasoning model can be monitored, and when its performance does not meet the reasoning requirements, it can be known in time and updated, thereby ensuring that the performance of the first reasoning model used by the reasoning computing device 100 meets the requirements and improving the accuracy of the reasoning results of the reasoning computing device 100. Furthermore, the correctness of the decision instructions made based on the reasoning results can be improved.
[0061] It should be noted that there is no specific limitation on the application scenario of the inference computing device 100. For example, the inference computing device 100 can be used as an edge device. For another example, the inference computing device 100 can be integrated into a user-side device (ie, a production device).
[0062] Exemplarily, taking the production and preparation of a display panel as an example, the reasoning computing device 100 obtains the original product image of the display panel in the manufacturing stage from the user-side device, and the original product image is used as the unprocessed data that the reasoning computing device 100 needs to process. The user-side device may include: an automated optical inspection (AOI) device, a distributed file system (DFS) or an image server. The user-side device may adopt, for example, a method based on the file transfer protocol (FTP) to capture the image of the display panel in the production process in real time as the original product image, that is, as the data to be processed. It should be noted that here, only the image form of the data to be processed is used as an example. In fact, the data to be processed may include data in various forms, for example, it may include at least one of the unstructured data such as document files, photos, drawings, microfilms, videos and audios, and may also include at least one of the structured information such as the information managed by the database, which is not specifically limited here.
[0063] Then, the inference calculation device 100 performs inference calculation according to the first inference model. Here, taking the first inference model as a neural network model as an example, the neural network model identifies defects from the original product image and then marks the defect information, and the marked defect information includes at least one of the following:
[0064] Defect type. Exemplary defect types include: particle, remain, line, hole, splash, electrostatic breakdown, wrinkle, film color, bubble, etc. In addition, these categories can be further divided into several levels. For example, if the defect type is particle, P represents particle, then this type of defect can be further divided into multiple levels according to the different forms of the particles formed, such as P0 represents normal particle, P1 represents wall particle, P2 represents sand particle, etc.
[0065] Defect location. Exemplarily, the defect location includes at least one of the information that can show the defect location, such as the circuit board where the identified defect is located, the layer where the defect is located, or the mask layer where the defect is located. Taking the identified defect located on a certain circuit board as an example, the defect location can show the specific coordinates of the defect on the circuit board, and the defect can also be framed by a display frame such as a rectangular frame or a circular frame, and the coordinates of a point related to the display frame, such as using the coordinates of a vertex of a rectangular frame to represent the coordinates of the defect, or using the coordinates of the center of a circular frame to represent the coordinates of the defect.
[0066] The relationship between the defect and the circuit elements of the array substrate. For example, the number of gates covered by the defect area, whether the defect is completely inside the gate, intersecting it, or outside it, etc.
[0067] Defect size: It can be measured by the length of the defect or the area of the defect (for example, the area of the effective display area occupied by the defect).
[0068] In addition, illustratively, the defect information described above can be represented in various forms such as codes (eg, codes P0 to P2 corresponding to the classification of the defect type of particles), coordinate values, numbers, text descriptions, etc.
[0069] In one example, after identifying defects in the original product image, the first inference model will mark the defect type and defect location of the identified defects. Here, the defect type is marked according to the type code of the identified defect; the defect location is marked in the original image using a rectangular wireframe, and the coordinate information of the rectangular wireframe in the corresponding image is recorded.
[0070] Based on this, in some embodiments, during the process of the first inference model performing inference calculation on the processed data, the performance of the first inference model is evaluated (S30). In this case, exemplary, the evaluation parameters for evaluating the performance of the first inference model include: at least one of the accuracy (Accuracy), precision (Precision), recall (Recall), and F score (FScore) of the first inference model in the inference calculation.
[0071] Here, the accuracy can be calculated by the following formula (1), the precision can be calculated by the following formula (2), the recall can be calculated by the following formula (3), and then the F score can be calculated by the following formula (4):
[0072] Accuracy=(TP+TN) / (TP+FP+TN+FN) (1);
[0073] Precision = TP / (TP+FP) (2);
[0074] Recall = TP / (TP+FN) (3);
[0075] F Sc o re =[(1+β 2 )·Precision·Recall] / (β 2 ·Precision+Recall) (4).
[0076] Among them, TP (Ture Positive) means that the calculation result is positive and the actual result is also positive. That is to say, after the inference model is inferred and calculated, the calculation result obtained is A (here, A represents a result), and the actual result is also A. At this time, the calculation result is consistent with the actual result.
[0077] FP (False Positive) means that the calculated result is positive, but the actual result is negative. That is to say, after the inference model is inferred and calculated, the calculated result is A, but the actual result is not A. At this time, the calculated result and the actual result are inconsistent.
[0078] FN (False Negative) means that the calculated result is negative, but the actual result is positive. That is to say, after the inference model is calculated, the calculated result is not A, but the actual result is A. At this time, the calculated result and the actual result are inconsistent.
[0079] TN (Ture Negative) means that the inference calculation result is negative and the actual result is also negative. That is to say, after the inference calculation of the inference model, the calculation result obtained is not A, and the actual result is also not A. At this time, the calculation result is consistent with the actual result.
[0080] It should be noted that precision, accuracy, recall and F score are evaluation parameters that characterize the performance of the first reasoning model. When evaluating the performance of the first reasoning model, the selected evaluation parameters can be determined according to the actual reasoning computing requirements of the reasoning computing device 100.
[0081] For example, if the inference computing requirement of the inference computing device 100 focuses more on accuracy, the accuracy is used as an evaluation parameter for evaluating the performance of the inference model.
[0082] As another example, the F score is used to evaluate the performance of the first inference model. The F score is an evaluation parameter obtained by weighting the precision and recall. Here, β used to calculate the F score is a weight coefficient. By adjusting the size of β, the emphasis ratio of precision and recall during performance evaluation can be adjusted. The size of β can be adjusted accordingly according to different application scenarios. For example, β is set to 1, so that when the performance of the first inference model is evaluated, the precision and recall have the same impact on the evaluation results, that is, the emphasis ratio of precision and recall is the same.
[0083] In one example, the inference computing device 100 needs to judge whether 1,000 pictures are cats or dogs through the inference calculation of the first inference model. Here, the judgment result of the inference computing device 100 is the decision made by it. After manual judgment, the 1,000 pictures are all pictures of dogs, that is, the actual result is: all of these 1,000 pictures are dogs. After the inference calculation of the first inference model, the calculation result obtained is: 720 pictures are judged to be dogs, 80 pictures are judged to be cats, and the remaining 200 pictures cannot be judged.
[0084] In this case, there are 720 pictures whose calculated results are dogs and whose actual results are also dogs, and there are 0 pictures whose calculated results are cats and whose actual results are not cats, that is, TP is 720; there are 0 pictures whose calculated results are dogs and whose actual results are not dogs, and there are 80 pictures whose calculated results are cats and whose actual results are not cats, that is, FP is 80; there are 280 pictures whose calculated results are not dogs (including the sum of the number of pictures whose calculated results are cats and the number of pictures that cannot be determined) and whose actual results are dogs, and there are 0 pictures whose calculated results are not cats and whose actual results are cats, that is, FN is 280; there are 0 pictures whose calculated results are not dogs and whose actual results are not dogs, and there are 920 pictures whose calculated results are not cats (including the sum of the number of pictures whose calculated results are dogs and the number of pictures that cannot be determined) and whose actual results are not cats, that is, TN is 920.
[0085] Substituting the values of TP, FP, FN and TN into formulas (1), (2), (3) and (4), where β is 1, we can obtain the following: accuracy is 0.82, precision is 0.9, recall is 0.72 and F score is 0.8.
[0086] In some embodiments, a lower limit value is set for the evaluation parameter according to the actual inference computing requirements of the inference computing device 100 .
[0087] For example, in at least one performance evaluation of the first reasoning model, if the obtained evaluation parameter values are all lower than the lower limit value, the evaluation result determines that the performance of the first reasoning model has declined; if the obtained evaluation parameters are all higher than or equal to the lower limit value, the evaluation result determines that the performance of the first reasoning model meets the requirements.
[0088] For another example, in several consecutive performance evaluations, if the obtained evaluation parameters are sometimes higher than or equal to the lower limit value and sometimes lower than the lower limit value, the evaluation results determine that the performance of the inference model fluctuates; if the obtained parameters are all higher than or equal to the lower limit value, the evaluation results determine that the performance of the first inference model meets the requirements.
[0089] Exemplarily, taking the evaluation parameter as precision, the lower limit of precision is set to 0.95. In one performance evaluation, the precision of the first inference model is 0.92, and the evaluation result is performance degradation. In another example, if in five consecutive performance evaluations, the precision of the first inference model is 0.96, 0.93, 0.97, 0.92, and 0.95, respectively, the evaluation result is performance fluctuation.
[0090] In some embodiments, according to the evaluation of the performance of the first reasoning model in S30, the situation where the first reasoning model needs to be updated includes: the first reasoning model has performance fluctuations or performance degradation. Wherein, whether the first reasoning model has performance fluctuations or performance degradation is determined based on the changes in the evaluation parameters in a continuous time period.
[0091] In some embodiments, see Figure 3 and Figure 6 , the updating of the first reasoning model in S40 includes:
[0092] S401a, based on the second training sample library, perform model training to obtain a second reasoning model; or, S401b, send a model update request to the model training device 200 to obtain a second reasoning model. The second training sample library includes: training samples from historical data, and / or training samples from reasoning results that have been re-judged.
[0093] S402: When the second reasoning model meets the update condition, update the first reasoning model with the second reasoning model.
[0094] It should be noted that the above-mentioned "inference result" refers to the inference result obtained after the first inference model performs inference calculation in S20. The "from the inference result and after re-judgment" mentioned here and in the following text refers to re-judgment of the inference result of the first inference model, such as manual judgment and processing of the inference result of the first inference model to obtain production data marked with correct results. Exemplarily, taking the production preparation of display panels as an example, the data to be processed are the original product images of the display panels, and the original product images of these display panels are sent to the inference calculation device 100, and the first inference model is used to perform inference calculation on them to obtain the inference result, and then the inference result is re-judged to obtain the product image of the display panel marked with the correct result, which is used as the source of training samples for the second sample training library 150.
[0095] The second training sample library includes training samples from the inference results and after re-judgment. Since the inference results will be continuously generated by the inference computing device 100 during the production and preparation process, using this as the source of training samples for the second training sample library will make the training samples of the second training sample library relatively new, including training samples with new features of production data during the production and preparation process. In this way, it can be ensured that the inference computing device 100 uses relatively new training samples in model training. Therefore, compared with the first inference model, the obtained second inference model has a stronger inference computing ability for newly emerged data to be processed with new features. When the first inference model is updated with the second inference model, the accuracy of the inference results of the inference computing device 100 can be increased.
[0096] Here, for the second training sample library in S401a, in one example, Figure 3 As shown, the inference computing device 100 includes the second training sample library, and the second training sample library is stored in the memory 120. In another example, the second training sample library is stored in other memories, and the inference computing device 100 can obtain the second training sample library from the other storage device.
[0097] For example, see Figure 3 The inference computing device 100 can be used as an edge-side device, and the model training device can be used as a cloud-side device, that is, the inference computing device 100 (edge-side device) is located closer to the user-side device than the model training device 200 (cloud-side device).
[0098] Furthermore, the inference computing device 100 also includes a coupling interface 150, which can enable the inference computing device 100 to communicate with the user-side device in a wired or wireless manner to achieve information interaction. Here, the coupling interface 150 can be any hardware or software interface that can achieve wired or wireless connection.
[0099] The inference computing device 100 also includes a network interface 140, which is connected to the model training device 200 for communication to achieve information exchange. Here, the inference computing device 100 can use at least one of the protocols such as Transmission Control Protocol / Internet Protocol (TCP / IP) or Hyper Text Transfer Protocol (HTTP) to exchange information with the outside world (such as the model training device 200) through the network interface 140.
[0100] For example, the inference computing device 100 is connected to the model training device 200 through the network interface 140, so as to receive the first inference model, or to send a model update request to the model training device 200 in S401b and obtain the second inference model. That is, information interaction with the model training device 200 is realized.
[0101] In some embodiments, Figure 6 The update conditions that the second reasoning model needs to meet include: testing the second reasoning model, and the second reasoning model passes the test.
[0102] The test includes: based on the test sample, evaluating the performance of the second inference model. If the performance meets the evaluation requirements, it is determined to have passed the test. Here, there is no specific limitation on the source of the test sample. For example, the test sample comes from the historical data, that is, the production data that has been marked with the correct identification information; for another example, the test sample comes from the data to be processed after manual judgment; for another example, the test sample comes partly from the historical data and partly from the data to be processed after manual judgment. Of course, the sources of the test samples as described above are not limited to these.
[0103] In addition, specific test cases can be selected from multiple test samples based on a certain test frequency and a certain test degree, and at least one test plan can be generated accordingly. Then, the inference computing device 100 tests the second inference model as described above according to the at least one test plan.
[0104] Based on this, in some embodiments, the update conditions described above also include: grayscale deployment of the second inference model, and evaluating the performance of the second inference model during the grayscale deployment process, and the performance of the second inference model meets the evaluation requirements.
[0105] "Grayscale deployment" means that within a preset time, the inference computing device 100 uses the second inference model to simulate the processing of the data to be processed. Exemplarily, during the grayscale deployment process, the inference computing device 100 uses the first inference model and the second inference model at the same time to process the data to be processed sent by the user-side device. In this process, the inference computing device 100 will output the inference result of the first inference model, and the inference result of the second inference model will only be used to evaluate its performance, and will not be output as a real inference result, that is, the inference computing device 100 will not generate a decision instruction based on the inference result obtained by the second inference model during the grayscale deployment process. Therefore, the grayscale deployment of the second inference model will not affect the processing of the data to be processed by the inference computing device 100, and it will have no effect on the normal production of the production line.
[0106] By evaluating the performance of the second inference model in the simulation process, it is estimated whether the performance of the second inference model can meet the requirements. During the grayscale deployment process, the data to be processed by the second inference model for inference calculation still needs to be manually judged. Here, the result of the manual judgment is taken as the correct result, so that the inference calculation device 100 can compare the result of the manual judgment with the inference result of the second inference model, thereby evaluating the performance of the second inference model during the grayscale deployment process.
[0107] Exemplarily, the original product image of the display panel sent by the user-side device is sent to the inference computing device 100, one copy is used for simulation processing of the second inference model in the grayscale deployment process, and the other copy is used for manual judgment to obtain the correct result. The inference computing device 100 compares the inference result and the correct result, thereby realizing the performance evaluation of the second inference model.
[0108] In addition, those skilled in the art should understand that when evaluating the performance of the second inference model in grayscale deployment, at least one of accuracy, precision, recall, and F-score (FScore) can also be used as an evaluation parameter to evaluate the performance of the second inference model, without specific limitation here.
[0109] It should be noted that, in the above-mentioned test and grayscale deployment, the data to be processed that has been manually judged has been marked with the correct result. Therefore, the data to be processed marked with the correct result can be sent to the first training sample library (the first training sample library is the training sample library based on which the model training device 200 performs model training) and / or the second training sample library to be used as training samples in model training, so that the first training sample library and / or the second training sample library can be updated.
[0110] In some embodiments, the update condition as described above further includes: verifying the configuration information of the second reasoning model, and the configuration information of the second reasoning model matches the reasoning calculation to be performed.
[0111] Here, "the inference calculation to be performed" refers to the inference calculation performed by the inference calculation device 100 on the data to be processed. Taking the production and preparation process of the display panel, it is necessary to identify defects and defect types as an example, then "the inference calculation to be performed" means that the inference calculation device 100 needs to identify the defects in the original product image and further identify the defect type. In this way, by verifying the configuration information of the second inference model, it is possible to detect whether the data of the second inference model is destroyed or tampered with during the transmission process, thereby ensuring that the second inference model obtained by the inference calculation device 100 matches the inference calculation requirements of the inference calculation device 100.
[0112] In some embodiments, see Figure 6 Before performing model training (S401a) based on the second training sample library; or before sending a model update request (S401b) to the model training device 200, the inference computing device 100 further performs the following operations:
[0113] S35. Determine whether the training parameters required for the model training are within the set training parameter range. If yes, perform the model training (S401a), that is, in this case, the inference computing device 100 performs model training to obtain a second inference model; if no, send a model update request to the model training device 200, that is, in this case, the model training device 200 performs model training to obtain a second inference model.
[0114] Here, the "set training parameter range" refers to the training parameter range corresponding to the training capability of the inference computing device 100 when it meets the requirements of the model training being performed. That is to say, if the training parameters of the model training being performed are within the set training parameter range, then the training capability of the inference computing device 100 meets the requirements of the model training being performed. In this case, the model training capability of the inference computing device 100 itself can complete this model training. Therefore, the inference computing device 100 can obtain the second inference model by performing this model training. Conversely, if the training parameters of the model training being performed are not within the set training parameter range, then the model training capability of the inference computing device 100 does not meet the requirements of the model training being performed. In this case, the training capability of the inference computing device 100 itself is insufficient to complete this model training. Therefore, it is necessary to send a model update request to the model training device 200 so that the model training device 200 can complete this model training and obtain the second inference model. Exemplarily, the model training device 200 is a cloud device.
[0115] In some embodiments, the training parameters described above include at least one of the data scale, training duration, and computing power required for model training.
[0116] Exemplarily, taking the training parameters as the data scale required for model training and the estimated training time as an example, the data scale required for a certain model training is 2000 images and corresponding 2000 labels, and the required training time is 15 minutes; the set data scale is 3000 images and 3000 corresponding labels, and the set training time is 20 minutes. In this case, the data scale required for model training is within the range of the set data scale, and the required training time is within the range of the set training time, that is, the model training capability of the inference computing device 100 meets the model training requirements, and the inference computing device 100 performs this model training (that is, performs S401a).
[0117] On the contrary, if the data scale required in another model training is not within the set data scale range, and the required training time is not within the set training time range, it means that the model training capability of the edge side device does not meet the requirements of this model training. Then, the inference computing device 100 sends a model update request to the model training device 200 so that the model training device 200 performs this model training.
[0118] In this way, when the model training capability of the inference computing device 100 meets the requirements of a model training, the inference computing device 100 is allowed to perform model training, which saves the time of sending a request to the model training device 200 and the time of receiving the second inference model from the model training device 200. The inference computing device 100 can obtain the inference model that meets the inference computing needs more timely and update the inference model, thereby further improving the accuracy of the inference results.
[0119] In addition, when the model training device 200 as described above is a cloud device, compared with the solution that requires requesting the cloud device to perform model training, when the inference computing device 100 meets the model training requirements, allowing the inference computing device 100 to perform model training independently can reduce the burden on the cloud device and reduce unnecessary occupation of cloud device resources, thereby improving the resource utilization of the cloud device.
[0120] In some embodiments, see Figure 6 When the first inference model is updated with the second inference model, that is, after performing S402, the inference computing device 100 further performs the following operations:
[0121] The performance of the second inference model is evaluated, and the performance of the first inference model is compared with that of the second inference model.
[0122] If the performance of the second inference model is worse than that of the first inference model, the second inference model is rolled back to the first inference model, and the model training is performed again, or the model training device 200 is requested to perform model training again.
[0123] In this way, in the process of actually processing the data to be processed, if the performance of the second reasoning model is not as good as that of the first reasoning model, the reasoning computing device 100 can roll back the updated second reasoning model to the first reasoning model before the update. Then the reasoning computing device 100 re-trains the model, or re-requests the model training device 200 to perform model training.
[0124] In some embodiments, see Figure 7 According to the performance evaluation of the first reasoning model in S30, the situations where the first reasoning model needs to be updated include:
[0125] S80: Receive a third reasoning model.
[0126] The third inference model is obtained by the model training device 200 performing model training based on the updated first training sample library when the model training device 200 does not receive a model update request from the inference computing device 100. The updated first training sample library includes training samples from the inference result and after re-judgment, that is, the updated first training sample library is obtained by updating the first training sample library using training samples from the inference result and after re-judgment.
[0127] S81. Compare the performance of the first reasoning model and the third reasoning model.
[0128] S82. If the performance of the third reasoning model is higher than that of the first reasoning model, or if an abnormality occurs in the first reasoning model, update the first reasoning model with the third reasoning model.
[0129] In this way, the training samples of the updated first training sample library are relatively new, including training samples with new features of production data in the production preparation process, which can ensure that the model training device 200 uses relatively new training samples in model training. Therefore, compared with the first inference model, the obtained third inference model has a stronger inference calculation ability for newly appeared data to be processed with new features. When the first inference model is updated with the third inference model, the accuracy of the inference result of the inference calculation device 100 can be increased.
[0130] In addition, the abnormality of the first reasoning model means that the first reasoning model cannot output the correct reasoning result, for example, the performance of the first reasoning model suddenly decreases; or, the first reasoning model does not output the reasoning result as required; or, the reasoning calculation time of the first reasoning model is too long and the timeout is serious. In other words, the third reasoning model can be used as a backup reasoning model and replaced when the first reasoning model has an abnormal condition. Moreover, after evaluating the performance of the first reasoning model, the first reasoning model needs to be updated, that is, the performance of the first reasoning model no longer meets the requirements. In this case, during the period when the reasoning computing device 100 or the model training device 200 performs model training, the third reasoning model can be used to replace the first reasoning model whose performance does not meet the requirements to process the data to be processed, so as to ensure the normal operation of the reasoning computing device 100.
[0131] In some embodiments, see Figure 6 After obtaining the inference result (S20), the inference computing device 100 also performs the following operations: S70, generating a decision instruction based on the inference result.
[0132] Among them, the defect information includes: the original product image with defects identified, and its defect location and defect type. The decision-making instructions include: according to the defect information of the original product image, the product corresponding to the original product image with defects is processed accordingly. For example, according to the identified defect type, a repair strategy corresponding to this type of defect is given; for another example, based on historical data analysis, the possible reasons for this type of defect are given (such as failure of one or several process equipment, or unreasonable setting of certain process parameters, etc.); for another example, when unknown defects or large-area defects occur, an alarm is issued.
[0133] It should be noted that the decision instruction may not be generated by the inference computing device 100. For example, after obtaining the inference result, the inference computing device 100 uploads the inference result to the cloud device, and the cloud device performs calculation and analysis on the inference result, generates a decision result instruction, and then sends it back to the inference computing device 100. In this case, the inference computing device 100 serves as the edge device in the user-side-edge-cloud computing architecture mentioned above, and the edge device sends the inference result to the cloud device after performing preliminary processing (inference calculation) on the data to be processed. The cloud device can make a decision instruction and send it back to the edge device through its powerful computing power. In this way, unified planning, management and configuration of factory production equipment can be achieved.
[0134] See also Figure 5 and Figure 6 Some embodiments of the present disclosure further provide a model training device 200, including at least one processor 210 and a memory 220. The memory 220 stores program instructions, which can be executed by the at least one processor 210. The model training device 200 performs the following operations A10 to A40:
[0135] A10: Perform model training based on the first training sample library to obtain a first inference model, wherein the first training sample library includes training samples from historical data generated in the production and manufacturing stage.
[0136] Here, historical data also refers to production data that has been manually judged and is marked with correct results.
[0137] Exemplarily, the model training device 200 includes the first training sample library, and the first training sample library is stored in the memory 220. As another example, the first training sample library is stored in other memory other than the memory 220.
[0138] A20. Send the first reasoning model to the reasoning computing device 100.
[0139] When receiving a model update request from the inference computing device 100,
[0140] A30: Perform model training based on the updated first training sample library to obtain a second inference model, wherein the updated first training sample library includes inference results from the first inference model and re-judged training samples.
[0141] A40. Send the second reasoning model to the reasoning computing device 100.
[0142] Since the training samples of the updated first training sample library are relatively new, including training samples of new features of production data in the production preparation process, it can be ensured that the model training device 200 uses relatively new training samples in model training. The second inference model obtained after model training based on the updated first training sample library has a strong inference calculation capability for newly appeared data to be processed with new features. When the first inference model is updated with the second inference model, the accuracy of the inference result of the inference calculation device 100 can be increased.
[0143] For example, see Figure 5 The model training device 200 also includes a network interface 240. The model training device 200 can communicate with other devices (for example, user-side devices and / or the model training device 200) through the network interface 240 to achieve information interaction.
[0144] Here, the model training device 200 can use at least one of the protocols such as Transmission Control Protocol / Internet Protocol (TCP / IP) or Hyper Text Transfer Protocol (HTTP) through the network interface 240 to exchange information with the outside world (such as the inference computing device 100).
[0145] For example, the model training device 200 communicates with the inference computing model 100 through the network interface 240, so that it can send the first inference model to the inference computing device 100, or receive a model update request from the inference computing device 100, or send the second inference model to the inference computing device 100.
[0146] In some embodiments, during the process of model training based on the first training sample library (ie, in A10), or during the process of model training based on the updated first training sample library (ie, in A30), see Figure 8 , the model training device 200 performs the following operations:
[0147] B1. Generate training task information.
[0148] B2. Generate training configuration data based on the training task information.
[0149] B3. Obtain training samples from the corresponding training sample library, perform model training based on the training samples and training configuration data, and obtain the corresponding inference model.
[0150] Here, and in the following text, the "corresponding training sample library" and "corresponding inference model" are relative to the model training performed, that is, if A10 is performed, training samples will be obtained from the first training sample library, and after model training, the first inference model will be obtained. If A30 is performed, training samples will be obtained from the updated first training sample library, and after model training, the second inference model will be obtained.
[0151] In addition, the training task information is generated based on the model update request sent by the received inference computing device 100, which includes the training requirements for model training. For example, the second inference model obtained through this model training needs to have specific inference computing functions and be able to obtain calculation results.
[0152] The training configuration data includes training scheduling information generated according to the training requirements. The training samples required for the model training can be known based on the training scheduling information. Exemplarily, the training scheduling information includes a data identifier, through which the training samples required for the model training can be found.
[0153] For example, see Fig. 9 In the process of model training in B3, the model training device 200 also performs the following operations:
[0154] B31. Monitor the model training process.
[0155] B32. If an abnormality occurs during model training, update the training configuration data.
[0156] B33. Perform model training based on the training samples and the updated training configuration data.
[0157] In some embodiments, before sending the first inference model to the inference computing device 100 (i.e. Figure 6 before A20 in the inference model, or before the second inference model is sent to the inference computing device 100 (i.e. Figure 6 Before A40), the model training device 100 also performs the following operations:
[0158] Verify the model version information of the corresponding inference model to determine whether the model version information is correct.
[0159] If the model version information is correct, the corresponding inference model is sent to the inference computing device 100 .
[0160] Here, when the first inference model is sent, if the model version information is judged to be correct, proceed to A20; when the second inference model is sent, if the model version information is judged to be correct, proceed to A40.
[0161] If the model version information is not correct, then the corresponding inference model with the model version that meets the requirement is searched, and if found, it is sent to the inference computing device 100; or, if not found, a notification message is sent to the inference computing device 100.
[0162] The inference computing device 100 can request the model training device to re-perform model training based on the received notification information, or it can stop the operation.
[0163] In this way, before sending the first reasoning model and / or the second reasoning model, checking whether the model version information is correct can ensure that the correct version of the first reasoning model or the second reasoning model is sent to the reasoning computing device 100.
[0164] In some embodiments, Figure 5 and Figure 7 As shown, the model training device 200 includes a first training sample library, and the model training device 200 also performs the following operations:
[0165] A50. Update the first training sample library.
[0166] A60. When no model update request is received from the inference computing device 100, model training is performed based on the updated first training sample library to obtain a third inference model.
[0167] A70. Send the third reasoning model to the reasoning computing device 100.
[0168] It should be noted that the third inference model is obtained by the model training device 200 through model training without receiving a model update request, that is, the third inference model is obtained by the model training device 200 after performing model training based on the updated first training sample library.
[0169] Since the third reasoning model has been introduced in detail above, it will not be described again here.
[0170] Some embodiments of the present disclosure further provide a computer-readable storage medium, which is disposed in the inference computing device 100 in any of the above embodiments. The computer-readable storage medium stores program instructions, and the program instructions can be executed by at least one processor 110 in the inference computing device 100 to enable the inference computing device 100 to perform the following operations S10 to S40:
[0171] S10, receiving a first inference model, wherein the first inference model is based on a first training sample library and is obtained through model training, and the first training sample library includes training samples from historical data.
[0172] S20. Based on the first reasoning model, perform reasoning calculation on the data to be processed in industrial production and obtain reasoning results.
[0173] S30: Evaluate the performance of the first reasoning model to determine whether the first reasoning model needs to be updated.
[0174] S40: If yes, update the first reasoning model.
[0175] The computer-readable storage medium also has the effect of improving the accuracy of the reasoning results, which will not be described in detail here.
[0176] Some embodiments of the present disclosure further provide a computer-readable storage medium, which is disposed in the model training device 200 described in any of the above embodiments. The program instructions can be executed by at least one processor 210 in the model training device 200 to enable the model training device 200 to perform the following operations A10 to A40:
[0177] A10: Perform model training based on the first training sample library to obtain a first inference model. The first training sample library includes training samples from historical data.
[0178] A20 sends the first inference model to the inference computing device 100 .
[0179] When receiving a model update request from the inference computing device 100,
[0180] A30: Perform model training based on the updated first training sample library to obtain a second inference model. The updated first training sample library is obtained by updating the first training sample library using the inference results from the first inference model and the re-judged training samples.
[0181] A40. Send the second reasoning model to the reasoning computing device 100.
[0182] The computer-readable storage medium also has the effect of improving the accuracy of the reasoning results, which will not be described in detail here.
[0183] Some embodiments of the present disclosure also provide an inference computing system 1000, see Fig.10 , including: an inference computing device 100 as described in any of the above embodiments, and a model training device 200 as described in any of the above embodiments.
[0184] The inference computing device 100 and the model training device 200 included in the inference computing system 1000 have the effect of improving the accuracy of the inference results. Therefore, the model deployment system 1000 also has the effect of improving the accuracy of the inference results, which will not be repeated here.
[0185] It should be noted that the processors mentioned in the embodiments of the present disclosure (e.g., processor 110 and processor 210) may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks and modules described in conjunction with the present disclosure, and the processor 210 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0186] In addition, the memory mentioned in the embodiments of the present disclosure (for example, memory 120 and memory 220) may be a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art.
[0187] Some embodiments of the present disclosure provide an inference computing device 300. In the case of dividing each functional module into corresponding functional modules, see Fig.11 The reasoning computing device 300 includes: a performance evaluation module 11, a reasoning model module 13 and a model task management module 14.
[0188] Among them, the model task management module 14 is configured to receive a first inference model from the model training device 400; the inference model module 13 is configured to perform inference calculations on the data to be processed (from the user-side device 3) generated in the production stage based on the received first inference model, obtain the inference results, and send the inference results to the user-side device 3; the performance evaluation module 11 is configured to evaluate the performance of the first inference model to determine whether the first inference model needs to be updated. If so, the model task management module 14 updates the first inference model.
[0189] In some embodiments, the inference computing device 300 further includes a second model training module 12 and a second training sample library 19. In the case where the first inference model needs to be updated, the second model training module 12 is configured to perform model training based on the second training sample library 19 to obtain a second inference model; or, the performance evaluation module 11 is further configured to send a model update request to the model training device 400 to obtain a second inference model. The second training sample library 19 stores training samples required for model training, which may come from the inference model module 13 and / or the model task management module 14.
[0190] Based on this, in some embodiments, the model task management module 14 is also configured to receive a second inference model from the model training device 400, and perform at least one of testing, grayscale deployment, or configuration information verification on the received second inference model.
[0191] For example, see Fig.11 The model task management module 14 includes: a verification unit 141, a testing unit 142 and a grayscale deployment unit 143.
[0192] Among them, the verification unit 141 is configured to test the received second inference model; the testing unit 142 is configured to test the received second inference model; and the grayscale deployment unit 143 is configured to perform grayscale deployment on the received second inference model.
[0193] In some embodiments, the inference computing device 300 further includes a model training decision module 18, which is configured to determine whether the training parameters required for the model training to be performed are within the set training parameter range. If so, the performance evaluation module 11 sends a model update request to the second model training module 12, that is, the second model training module 12 performs model training to obtain a second inference model; if not, the performance evaluation module 11 sends a model update request to the model training device 400, that is, the model training device 400 performs model training to obtain a second inference model.
[0194] In some embodiments, the inference computing device 300 further includes a backup module 15, which is configured to receive a third inference model. When the performance of the third inference model is higher than that of the first inference model in the inference model module 11, or when an abnormality occurs in the first inference model in the inference model module 11, the backup module 15 sends the third inference model to the model task management module 14, and the model task management module 14 updates the first inference model with the third inference model.
[0195] In some embodiments, the performance evaluation module 11 is further configured to perform a performance evaluation on the second reasoning model and compare the performance of the first reasoning model with the second reasoning model. In the case where the performance of the second reasoning model is worse than that of the first reasoning model, the model task management module 14 is further configured to roll back the second reasoning model to the first reasoning model. The performance evaluation module 11 is further configured to resend a model training request to the second model training module 12 or the model training device 400.
[0196] In some embodiments, see Fig.11 The reasoning computing device 300 further includes a function extension management module 16 , which is configured to extend or modify the functions of the reasoning model module 13 and the task management module 14 .
[0197] For example, the function extension module 16 receives the imported reasoning model, and controls the reasoning model in the reasoning model module 13 to switch to the imported reasoning model.
[0198] In addition, see Fig.11 In the case where the model training device 400 includes the first training sample library 23, the function extension module 16 can also extend the function of the first training sample library.
[0199] Exemplarily, the function expansion module 16 includes a function expansion interface.
[0200] In some embodiments, see Fig.11 The reasoning computing device 300 also includes: an original data aggregation module 17 and a reasoning model module 13.
[0201] The raw data aggregation module 17 is configured to aggregate the raw data from the user-side device 3 to obtain the data to be processed, and send the data to be processed to the inference model module 13 .
[0202] Some embodiments of the present disclosure provide a model training device 400. In the case of dividing each functional module into corresponding functional modules, see Fig.11 The model training device 400 includes: a training management module 21, a first model training module 22 and a first training sample library 23.
[0203] The first model training module 22 is configured to perform model training based on the first training sample library 23 to obtain a first inference model, and / or perform model training based on the updated first training sample library 23 to obtain a second inference model.
[0204] The training management module 21 is configured to send the first training model and / or the second training model to the inference computing device 300 .
[0205] For example, see Fig.11 The training management module 21 includes: a task management unit 211, a training scheduling unit 212 and a branch management unit 213.
[0206] Among them, the task management unit 211 is configured to generate training task information according to the model update request sent by the inference computing device 300; the training scheduling unit 212 is configured to generate training configuration data according to the training task information, and obtain training samples from the corresponding training sample library; the branch management unit 213 is configured to verify the model version information of the corresponding inference model to determine whether the model version information is correct. If the model version information is correct, the branch management unit 213 is also configured to send the corresponding inference model with correct version information to the inference computing device 300.
[0207] Exemplarily, the training scheduling unit 212 is further configured to monitor the model training process of the first model training module 22, and when an abnormality occurs in the model training process, update the training configuration data, and send the updated training configuration data to the first model training module 22. In this case, the first model training module 22 is further configured to perform model training according to the updated training configuration data and training samples.
[0208] In some embodiments, see Fig.11 , the model training device 400 also includes a first training sample library 23, which is configured to receive training samples with correct results sent by the reasoning computing device 300, for example, after the reasoning result of the reasoning model module 13 of the reasoning computing device 300 is re-judged and marked with a correct result, it is sent to the first training sample library 23, thereby updating the first training sample library 23. In this case, the first model training module 22 is also configured to perform model training based on the updated first training sample library 23 to obtain a third reasoning model when no model update request is received.
[0209] Exemplarily, when the training management module 21 includes the branch management unit 213 , the first model training module 22 is configured to send the third reasoning model to the branch management unit 213 , and the branch management unit 213 sends the third reasoning model to the reasoning computing device 300 .
[0210] The above is only a specific embodiment of the present invention, and the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An inference computing device, comprising at least one processor and a memory; the memory stores program instructions, the program instructions can be executed by the at least one processor, so that the inference computing device performs the following operations: A first inference model is received from a model training device, wherein: The first inference model is based on a first training sample library and is obtained by the model training device through model training; the first training sample library includes training samples of historical data generated in the production and manufacturing stage, and the model training device includes a cloud device; Based on the first inference model, perform inference calculation on the data to be processed generated in the production and manufacturing stage to obtain an inference result, and send the inference result to the user-side device, wherein the inference calculation device is closer to the user-side device than the model training device; evaluating the performance of the first reasoning model to determine whether the first reasoning model needs to be updated, and if so, updating the first reasoning model; The updating of the first inference model includes: determining whether the training parameters required for the model training are within the set training parameter range; if so, performing model training based on the second training sample library to obtain the second inference model; if not, sending a model update request to the model training device to obtain the second inference model; if the second inference model meets the update conditions, updating the first inference model with the second inference model; the training samples of the second inference model come from the inference results and the re-judged training samples; the update conditions include: grayscale deployment of the second inference model, and evaluating its performance during the grayscale deployment process, and the performance of the second inference model meets the evaluation requirements; wherein the grayscale deployment refers to the inference calculation device using the second inference model to simulate the data to be processed within a preset time; verifying the configuration information of the second inference model, and the configuration information matches the inference calculation to be performed.
2. The inference computing device according to claim 1, wherein: The historical data includes product images marked with defect information; The data to be processed includes original product images generated during the production and manufacturing stage; The inference result includes defect information in the original product image.
3. The inference computing device according to claim 1 or 2, wherein: The update conditions also include: Testing the second reasoning model, whereby the second reasoning model passes the test; The test includes evaluating the performance of the second inference model based on a test sample; if the performance meets the evaluation requirements, the test is determined to have passed.
4. The inference computing device according to claim 1 or 2, wherein: The training parameters include: at least one of the data scale, training duration, and computing power required for model training.
5. The inference computing device according to claim 1, wherein: The evaluation parameters for evaluating the performance of the inference model include: at least one of the accuracy, precision, recall, and F score of the first inference model during the inference calculation process; The situations where the first reasoning model needs to be updated according to performance evaluation include: the first reasoning model has performance fluctuations or performance degradation; wherein, based on the changes of the evaluation parameters in a continuous time period, it is judged whether the first reasoning model has performance fluctuations or performance degradation.
6. The inference computing device according to claim 1 or 2, wherein: The situations where the first reasoning model needs to be updated according to the performance evaluation include: receiving a third inference model, wherein the third inference model is obtained by the model training device performing model training based on the updated first training sample library when the model training device does not receive the model update request; the updated first training sample library includes training samples from the inference result and after re-judgment; Compare the performance of the first reasoning model with the third reasoning model. If the performance of the third reasoning model is higher than that of the first reasoning model, or if an abnormality occurs in the first reasoning model, update the first reasoning model with the third reasoning model.
7. The inference computing device according to claim 1 or 2, wherein: When the first inference model is updated with the second inference model, the inference calculation device further performs the following operations: Performing a performance evaluation on the second reasoning model, and comparing the performance of the first reasoning model with the performance of the second reasoning model; When the performance of the second inference model is worse than that of the first inference model, the second inference model is rolled back to the first inference model; the model training is performed again, or the model training device is requested to perform model training again.
8. The inference computing device according to claim 2, wherein: After obtaining the inference result, the inference calculation device further performs the following operations: generating a decision instruction according to the reasoning result; Among them, the defect information includes: the identified original product image with defects, and its defect location and defect type; the decision instruction includes: according to the defect information of the original product image, performing corresponding defect processing on the product corresponding to the original product image with defects.
9. A model training device, comprising at least one processor and a memory; the memory stores program instructions, the program instructions can be executed by the at least one processor, so that the model training device performs the following operations: Performing model training based on a first training sample library to obtain a first inference model; the first training sample library includes training samples from historical data generated in a production and manufacturing stage; Sending the first reasoning model to an inference computing device; In the case of receiving a model update request from the inference computing device, model training is performed based on the updated first training sample library to obtain a second inference model; the updated first training sample library includes the inference results from the first inference model and the training samples that have been re-judged; wherein the model update request is sent by the inference computing device to the model training device when it is determined that the training parameters required for the model training are not within the set training parameter range; the inference computing device is also used to perform model training based on the second training sample library to obtain a second inference model when it is determined that the training parameters required for the model training are within the set training parameter range; The second inference model is sent to the inference computing device, so that the second inference model updates the first inference model with the second inference model when an update condition is met; the update condition includes: grayscale deployment of the second inference model, and evaluation of its performance during the grayscale deployment process, and the performance of the second inference model meets the evaluation requirements; wherein, the grayscale deployment means that within a preset time, the inference computing device uses the second inference model to simulate processing of the data to be processed; and the configuration information of the second inference model is verified, and the configuration information matches the inference calculation to be performed.
10. The model training device according to claim 9, wherein: In the process of performing model training based on the first training sample library or based on the updated first training sample library, the model training device performs the following operations: Generate training task information; Generate training configuration data according to the training task information; A training sample is obtained from a corresponding training sample library, and model training is performed based on the training sample and the training configuration data to obtain a corresponding inference model.
11. The model training device according to claim 10, wherein: In the process of acquiring training samples from the corresponding training sample library, performing model training based on the training samples and the training configuration data, and obtaining the corresponding inference model, the model training device further performs the following operations: Monitor the progress of model training; In case an abnormality occurs during the model training process, updating the training configuration data; Model training is performed based on the training samples and the updated training configuration data.
12. The model training device according to any one of claims 9 to 11, wherein: Before sending the first inference model or the second inference model to the inference computing device, the model training device further performs the following operations: Verifying the model version information of the corresponding inference model to determine whether the model version information is correct; If yes, sending the corresponding reasoning model to the reasoning computing device; If not, then search for a corresponding inference model whose model version meets the requirements; if found, send it to the inference computing device; or, if not found, send a notification message to the inference computing device.
13. The model training device according to claim 9, further comprising the first training sample library; the model training device further performs the following operations: Updating the first training sample library; In the case where the model update request is not received, performing model training based on the updated first training sample library to obtain a third inference model; The third inference model is sent to the inference computing device.
14. A computer-readable storage medium storing program instructions; the program instructions can be executed by a processor to cause an inference computing device to perform the following operations: Receive a first reasoning model, where the first reasoning model is based on a first training sample library and is obtained through model training; the first training sample library includes training samples from historical data; Based on the first reasoning model, perform reasoning calculation on the data to be processed in industrial production and obtain reasoning results; evaluating the performance of the first reasoning model to determine whether the first reasoning model needs to be updated, and if so, updating the first reasoning model; The updating of the first inference model includes: determining whether the training parameters required for the model training are within the set training parameter range; if so, performing model training based on the second training sample library to obtain the second inference model; if not, sending a model update request to the model training device to obtain the second inference model: the second training sample library includes training samples from historical data, and / or training samples from the inference results and re-judged; if the second inference model meets the update conditions, the first inference model is updated with the second inference model; the training samples of the second inference model come from the training samples from the inference results and re-judged; the update conditions include: grayscale deployment of the second inference model, and evaluating its performance during the grayscale deployment process, and the performance of the second inference model meets the evaluation requirements; wherein the grayscale deployment refers to the inference calculation device using the second inference model to simulate the data to be processed within a preset time; the configuration information of the second inference model is verified, and the configuration information matches the inference calculation to be performed.
15. A computer-readable storage medium storing program instructions; the program instructions can be executed by a processor to enable a model training device to perform the following operations: Performing model training based on a first training sample library to obtain a first inference model; the first training sample library includes training samples from historical data; Sending the first reasoning model to an inference computing device; In the case of receiving a model update request from the inference computing device, model training is performed based on the updated first training sample library to obtain a second inference model; the updated first training sample library is obtained by updating the first training sample library using the inference result from the first inference model and the training samples that have been re-judged; wherein the model update request is sent by the inference computing device to the model training device when it is determined that the training parameters required for the model training are not within the set training parameter range; the inference computing device is also used to perform model training based on the second training sample library to obtain a second inference model when it is determined that the training parameters required for the model training are within the set training parameter range; The second inference model is sent to the inference computing device, so that the second inference model updates the first inference model with the second inference model when an update condition is met; the update condition includes: grayscale deployment of the second inference model, and evaluation of its performance during the grayscale deployment process, and the performance of the second inference model meets the evaluation requirements; wherein, the grayscale deployment means that within a preset time, the inference computing device uses the second inference model to simulate processing of the data to be processed; and the configuration information of the second inference model is verified, and the configuration information matches the inference calculation to be performed.
16. An inference computing system, comprising: An inference computing device as claimed in any one of claims 1 to 8, and a model training device as claimed in any one of claims 9 to 13.
