Method for determining spare loss number, method, device and equipment for training prediction model
By acquiring and analyzing material information, performing feature extraction and weight prediction, the problem of manufacturing enterprises having difficulty accurately predicting reserve loss numbers has been solved, enabling more accurate reserve loss number calculation, improving production efficiency and reducing costs.
Patent Information
- Application Number
- CN202410645660.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2025-11-25
AI Technical Summary
Manufacturing companies often struggle to accurately predict material loss reserves, leading to either too many or too few reserves, which impacts production efficiency and costs.
By acquiring the material usage information of the target material, including historical defect rate, static information and material demand, feature extraction and weight prediction are performed to determine the predicted defect rate and proportion of defective parts within the current time range, and the reserve quantity is calculated based on this information.
It improves the accuracy of loss reserve forecasting, helps manufacturing companies to prepare inventory rationally, reduce cost waste, and improve production efficiency.
Smart Images

Figure CN121009481A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method for determining the number of reserves, a method for training a prediction model, an apparatus, a device, and a storage medium. Background Technology
[0002] Materials management is crucial for manufacturing companies, directly impacting product quality and production efficiency. However, predicting material loss and defective materials remains a challenge during the manufacturing process. This difficulty prevents manufacturers from determining adequate contingency reserves; too little reserves disrupt normal production, while too much increases costs.
[0003] Therefore, how to predict the reserve loss of materials is a hot research topic. Summary of the Invention
[0004] This application provides a method for determining the reserve quantity, a method for training a prediction model, an apparatus, equipment, and a storage medium, capable of predicting the reserve quantity of materials. The technical solution is as follows:
[0005] On the one hand, a method for determining the reserve quantity is provided, the method comprising:
[0006] Obtain the material usage information of the target material. The material usage information includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range.
[0007] Feature extraction and weight prediction are performed on the material usage information to obtain multiple material usage information features and multiple fusion weights. The multiple fusion weights are used to fuse different material usage information features.
[0008] Based on multiple material information features and multiple fusion weights of the material information, the predicted defect rate and the predicted proportion of defective parts are determined within the current time range.
[0009] Based on the predicted defect rate, predicted defective parts ratio, and material demand within the current time frame, determine the required reserve quantity for the target material within the current time frame.
[0010] On the one hand, a method for training a prediction model is provided, the method comprising:
[0011] Obtain sample material usage information, which includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range of the sample.
[0012] The sample material information is input into the prediction model, and the prediction model performs feature extraction and weight prediction on the sample material information to obtain multiple sample material information features and multiple sample fusion weights. The multiple sample fusion weights are used to fuse different sample material information features.
[0013] The prediction model determines the predicted defect rate and the predicted proportion of defective parts within the current time range of the sample based on multiple sample material information features and the fusion weights of the multiple samples.
[0014] The prediction model is trained based on the first difference information between the labeled defect rate and the predicted defect rate within the current time range of the sample, and the second difference information between the labeled defective parts ratio and the predicted defective parts ratio within the current time range of the sample.
[0015] On the one hand, an apparatus for determining the number of reserves is provided, the apparatus comprising:
[0016] The information acquisition module is used to acquire the material usage information of the target material. The material usage information includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range.
[0017] The processing module is used to extract features and predict weights from the material usage information to obtain multiple material usage information features and multiple fusion weights, wherein the multiple fusion weights are used to fuse different material usage information features.
[0018] The first determining module is used to determine the predicted defect rate and the predicted proportion of defective parts within the current time range based on multiple material information features of the material information and the multiple fusion weights.
[0019] The second determining module is used to determine the required reserve quantity of the target material within the current time range based on the predicted defect rate, the predicted proportion of defective parts, and the material demand within the current time range.
[0020] In one possible implementation, the processing module is configured to: extract features from the material usage information using multiple first-type residual connect blocks to obtain multiple material usage information features, wherein the parameters of different first-type residual connect blocks are different; extract features from the material usage information using multiple second-type residual connect blocks to obtain multiple weighted prediction features of the material usage information, wherein the parameters of different second-type residual connect blocks are different; and normalize the multiple weighted prediction features to obtain the multiple fusion weights.
[0021] In one possible implementation, the processing module is configured to, for any one of the plurality of first-type residual connection blocks, perform a full connection on the material usage information using the first-type residual connection block to obtain a first residual feature of the material usage information; perform a full connection, linear rectification, and random deactivation on the material usage information using the first-type residual connection block to obtain a second residual feature of the material usage information; fuse the first residual feature and the second residual feature using the first-type residual connection block to obtain a third residual feature of the material usage information; and regularize the third residual feature using the first-type residual connection block to obtain the material usage information feature corresponding to the first-type residual connection block.
[0022] In one possible implementation, the first determining module is configured to: obtain multiple first fusion weights corresponding to the predicted defect rate from the multiple fusion weights; fuse the multiple material usage information features using the multiple first fusion weights to obtain a first fusion feature; determine the predicted defect rate based on the first fusion feature; obtain multiple second fusion weights corresponding to the predicted defective parts ratio from the multiple fusion weights; fuse the multiple material usage information features using the multiple second fusion weights to obtain a second fusion feature; and determine the predicted defective parts ratio based on the second fusion feature.
[0023] In one possible implementation, the predicted defect rate includes a predicted incoming material defect rate and a predicted in-house defect rate. The first determining module is configured to: obtain multiple third fusion weights corresponding to the predicted incoming material defect rate from the multiple first fusion weights; fuse the multiple material usage information features using the multiple third fusion weights to obtain the third fusion feature; obtain multiple fourth fusion weights corresponding to the predicted in-house defect rate from the multiple first fusion weights; fuse the multiple material usage information features using the multiple fourth fusion weights to obtain the fourth fusion feature; determine the predicted incoming material defect rate based on the third fusion feature; and determine the predicted in-house defect rate based on the fourth fusion feature.
[0024] In one possible implementation, the first determining module is configured to: extract features from the third fusion feature using the third type of residual connect block corresponding to the predicted incoming material defect rate to obtain an incoming material defect rate prediction feature; normalize the incoming material defect rate prediction feature to obtain the predicted incoming material defect rate; extract features from the fourth fusion feature using the third type of residual connect block corresponding to the predicted self-made defect rate to obtain a self-made defect rate prediction feature; and normalize the self-made defect rate prediction feature to obtain the predicted self-made defect rate.
[0025] In one possible implementation, the predicted defective parts ratio includes a predicted incoming defective parts ratio and a predicted in-house defective parts ratio. The second fusion feature includes a fifth fusion feature and a sixth fusion feature. The first determining module is configured to: obtain multiple fifth fusion weights corresponding to the predicted incoming defective parts ratio from the multiple second fusion weights; fuse the multiple material usage information features using the multiple fifth fusion weights to obtain a fifth fusion feature; obtain multiple sixth fusion weights corresponding to the predicted in-house defective parts ratio from the multiple second fusion weights; fuse the multiple material usage information features using the multiple sixth fusion weights to obtain a sixth fusion feature; determine the predicted incoming defective parts ratio based on the fifth fusion feature; and determine the predicted in-house defective parts ratio based on the sixth fusion feature.
[0026] In one possible implementation, the first determining module is configured to: extract features from the fifth fusion feature using a third type of residual connection block corresponding to the predicted incoming defective parts ratio to obtain an incoming defective parts ratio prediction feature; perform a full connection on the incoming defective parts ratio prediction feature to obtain the predicted incoming defective parts ratio; extract features from the sixth fusion feature using a third type of residual connection block corresponding to the predicted self-made defective parts ratio to obtain a self-made defective parts ratio prediction feature; and perform a full connection on the self-made defective parts ratio prediction feature to obtain the predicted self-made defective parts ratio.
[0027] In one possible implementation, the second determining module is used to perform multi-objective optimization on the predicted defect rate, the predicted defective parts ratio, and the material demand within the current time range using multiple sets of candidate constraints, to obtain the estimated reserve number corresponding to each set of candidate constraints; and to determine the smallest estimated reserve number among the estimated reserve numbers corresponding to each set of candidate constraints as the reserve number required for the target material within the current time range.
[0028] In one possible implementation, the predicted defect rate includes the predicted incoming material defect rate and the predicted in-house defect rate, and the predicted defective parts ratio includes the predicted incoming material defective parts ratio and the predicted in-house defective parts ratio. The second determining module is used to perform linear programming on the predicted incoming material defect rate, the predicted in-house defect rate, the predicted incoming material defective parts ratio, the predicted in-house defective parts ratio, and the material demand within the current time range, with the satisfaction rate and sluggishness of the target material as optimization objectives, under the constraints of the multiple sets of candidate constraints, to obtain the estimated reserve loss number corresponding to each set of candidate constraints.
[0029] On the one hand, a training apparatus for a prediction model is provided, the apparatus comprising:
[0030] The sample acquisition module is used to acquire sample material usage information, which includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range.
[0031] The input module is used to input the sample material information into the prediction model, and to perform feature extraction and weight prediction on the sample material information through the prediction model to obtain multiple sample material information features and multiple sample fusion weights. The multiple sample fusion weights are used to fuse different sample material information features.
[0032] The prediction module is used to determine the predicted defect rate and the predicted proportion of defective parts for the current time range of the sample by using the prediction model based on multiple sample material information features and the fusion weights of the multiple samples.
[0033] The training module is used to train the prediction model based on a first difference between the labeled defect rate and the predicted defect rate within the current time range of the sample, and a second difference between the labeled defective parts ratio and the predicted defective parts ratio within the current time range of the sample.
[0034] In one possible implementation, the training module is configured to input the first difference information and the second difference information into the joint loss function of the prediction model to determine the loss value for this round of training. The joint loss function includes a first loss function corresponding to the first difference information and a second loss function corresponding to the second difference information. The first loss function and the second loss function are combined with random noise to form the joint loss function. Based on the loss value, backpropagation is performed in the prediction model to adjust the model parameters of the prediction model.
[0035] On one hand, a computer device is provided, the computer device including one or more processors and one or more memories, the one or more memories storing at least one computer program, the computer program being loaded and executed by the one or more processors to implement the method for determining the backup loss number, or to implement the method for training the prediction model.
[0036] On the one hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer program, which is loaded and executed by a processor to implement the method for determining the backup loss number, or to implement the method for training the prediction model.
[0037] On one hand, a computer program product or computer program is provided, which includes program code stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium and executes the program code, causing the computer device to perform the method for determining the backup loss or the method for training the prediction model.
[0038] The technical solution provided in this application obtains the material usage information of a target material, which is a material used in the manufacturing process. The material usage information includes historical defect rates, static information, and material requirements. Feature extraction and weight prediction are performed on this material usage information to obtain multiple material usage information features and multiple fusion weights. Based on these multiple material usage information features and multiple fusion weights, the predicted defect rate and predicted defective parts ratio within the current time range are determined. Based on the predicted defect rate, predicted defective parts ratio, and material requirements within the current time range, the required reserve quantity for the target material within the current time range is determined. In other words, the technical solution provided in this application can utilize the material usage information of the target material to predict the required reserve quantity for the target material within the current time range, thereby providing a reference for manufacturing enterprises and facilitating their decision-making. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of the implementation environment of a method for determining the number of spare parts provided in an embodiment of this application;
[0041] Figure 2This is a flowchart illustrating a method for determining the number of spare parts provided in an embodiment of this application;
[0042] Figure 3 This is a flowchart of another method for determining the number of spare parts provided in an embodiment of this application;
[0043] Figure 4 This is a schematic diagram of the structure of a residual connection block provided in an embodiment of this application;
[0044] Figure 5 This is a schematic diagram of the structure of a prediction model provided in an embodiment of this application;
[0045] Figure 6 This is a flowchart of the method for determining the number of spare parts provided in the embodiments of this application;
[0046] Figure 7 This is a flowchart of a training method for a prediction model provided in an embodiment of this application;
[0047] Figure 8 This is a schematic diagram of a device for determining the number of spare parts provided in an embodiment of this application;
[0048] Figure 9 This is a schematic diagram of a training device for a prediction model provided in an embodiment of this application;
[0049] Figure 10 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application;
[0050] Figure 11 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0052] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor are there any restrictions on quantity or execution order.
[0053] To provide a clearer explanation of the technical solutions provided in the embodiments of this application, some terms involved in the embodiments of this application will be introduced below.
[0054] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge sub-models to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.
[0055] Normalization: Mapping sequences with different value ranges to the interval (0, 1) to facilitate data processing. In some cases, normalized values can be directly expressed as probabilities.
[0056] Dropout is a method for optimizing deep artificial neural networks. During the learning process, it reduces the interdependence between nodes by randomly setting some weights or outputs of the hidden layers to zero, thereby regularizing the neural network and reducing its structural risks. For example, in model training, given a vector (1, 2, 3, 4), after inputting this vector into a dropout layer, the dropout layer can randomly convert one of the numbers in the vector (1, 2, 3, 4) to 0. For example, converting 2 to 0 would change the vector to (1, 0, 3, 4).
[0057] Learning rate: Used to control the learning progress of the model. The learning rate guides the model in adjusting network weights using the gradient of the loss function during gradient descent. If the learning rate is too large, the loss function may directly skip the global optimum, resulting in excessive loss. If the learning rate is too small, the loss function changes very slowly, greatly increasing the convergence complexity of the network and making it easy to get trapped in local minima or saddle points.
[0058] Embedded coding, mathematically speaking, represents a correspondence, that is, mapping data in space X to space Y using a function F. This function F is injective, and the mapping result preserves the structure. An injective function means that the mapped data uniquely corresponds to the original data, and preserving the structure means that the size relationship between the original and mapped data is the same. For example, if there are data X1 and X2 before mapping, after mapping we get Y1 corresponding to X1 and Y2 corresponding to X2. If the original data X1 > X2, then correspondingly, the mapped data Y1 > Y2. For words, this means mapping words to another space to facilitate subsequent machine learning and processing.
[0059] Loss function: A loss function is a function that maps the values of a random event or its related random variables to non-negative real numbers to represent the "risk" or "loss" of that random event. In applications, the loss function is often used as a learning criterion in relation to optimization problems; that is, the model is solved and evaluated by minimizing the loss function.
[0060] Multi-objective optimization: In a certain scenario, multiple objectives need to be achieved. However, in reality, there are usually conflicts between objectives, and it is impossible to achieve the optimal result at the same time. The optimization of one objective comes at the cost of the deterioration of other objectives. Therefore, it is difficult to find a unique optimal solution. Instead, coordination and compromise are made among them to make the overall objective as optimal as possible.
[0061] Materials: Raw materials or components used in the production process.
[0062] Defective materials: Raw materials or components that are unusable or become defective after use.
[0063] Incoming material defect rate: The probability that defective materials exist in the materials provided by the supplier.
[0064] Self-made defect rate: The probability of defective materials appearing during the manufacturing process.
[0065] Defective parts ratio: The proportion of defective parts produced due to defective materials supplied by the supplier.
[0066] Self-made defective parts ratio: The proportion of defective parts produced due to defective materials during the manufacturing process.
[0067] Reserve quantity: The quantity of materials prepared in addition to meet production needs during the production process.
[0068] In related technologies, manufacturing companies typically estimate the required reserve quantity for a target material within the current timeframe based on the number of defective parts from multiple historical production cycles. However, this method of estimating reserve quantities is overly simplistic, often resulting in either too many or too few reserves. The technical solution provided in this application addresses this issue by utilizing machine learning techniques to process more granular information, thereby improving the accuracy of reserve quantity prediction.
[0069] After introducing the terms used in the embodiments of this application, the implementation environment of the embodiments of this application will be described below.
[0070] Figure 1 This is a schematic diagram illustrating the implementation environment of a method for determining the reserve quantity provided in this application embodiment. See also... Figure 1 The implementation environment may include terminal 110 and server 140.
[0071] Terminal 110 is connected to server 140 via a wireless or wired network. Optionally, terminal 110 may be a smartphone, tablet, laptop, desktop computer, etc., but is not limited to these. Terminal 110 has an application installed and running that supports backup data.
[0072] Server 140 is a standalone physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.
[0073] After introducing the implementation environment of the embodiments of this application, the application scenarios of the embodiments of this application are described below. The technical solution provided by the embodiments of this application can be applied to scenarios of producing various products. After adopting the technical solution provided by the embodiments of this application, the material usage information of the target material is obtained. The target material is the material used in the production and manufacturing process. The material usage information includes historical defect rate, static information, and material demand. Feature extraction and weight prediction are performed on the material usage information to obtain multiple material usage information features and multiple fusion weights. Based on the multiple material usage information features and multiple fusion weights, the predicted defect rate and predicted defective parts ratio within the current time range are determined. Based on the predicted defect rate, predicted defective parts ratio, and material demand within the current time range, the required reserve quantity of the target material within the current time range is determined. In other words, the technical solution provided by the embodiments of this application can use the material usage information of the target material to predict the required reserve quantity of the target material within the current time range, thereby providing a reference for manufacturing enterprises and facilitating their decision-making.
[0074] After introducing the application scenarios of the embodiments of this application, the technical solutions provided by the embodiments of this application will be described below. Figure 2 This is a flowchart of a method for determining the number of spare parts provided in an embodiment of this application. See also... Figure 2 Taking the server as the executing entity as an example, the method includes the following steps.
[0075] 201. The server obtains the material usage information of the target material. This material usage information includes historical defect rate, static information, and material demand. The static information includes material characteristics, factory characteristics, and historical defect statistics. The material demand includes historical material demand and material demand within the current time range.
[0076] The target material refers to the materials or components used in the manufacturing process. The historical defect rate of the target material refers to the probability that the target material has contained defective parts during historical production processes. Here, "historical" refers to a period of time ending at the current timeframe. This timeframe can be divided into different lengths, such as half a month, one month, one quarter, or half a year. When using a one-month timeframe, the current timeframe refers to the current month; when using a quarterly timeframe, the current timeframe refers to the current quarter. Static information refers to information that does not change. Material characteristics in static information describe the properties of the target material itself and typically do not change; therefore, material characteristics are considered static information. Plant characteristics describe the characteristics of the plant using the target material for manufacturing and typically do not change; therefore, plant characteristics are also considered static information. Historical defect statistics of the target material describe the statistical characteristics related to historical defects of the target material and do not change; therefore, historical defect statistics are also considered static information. Material requirements refer to the quantity of the target material consumed in production.
[0077] 202. The server performs feature extraction and weight prediction on the material usage information to obtain multiple material usage information features and multiple fusion weights. These multiple fusion weights are used to fuse different material usage information features.
[0078] Feature extraction is used to abstractly represent material usage information, thereby obtaining multiple material usage information features. Different material usage information features focus on different aspects of the material usage information. Weight prediction is used to determine fusion weights, which are used to fuse multiple material usage information features in subsequent prediction processes. In this embodiment, one material usage information feature corresponds to at least two fusion weights, which correspond to different prediction tasks. For example, the at least two fusion weights include at least one fusion weight corresponding to the predicted defect rate and at least one fusion weight corresponding to the predicted defective parts ratio.
[0079] 203. Based on multiple material information features and multiple fusion weights of the material information, the server determines the predicted defect rate and the predicted proportion of defective parts within the current time range.
[0080] Among them, the predicted defect rate within the current time range refers to the predicted probability of defective materials appearing when using the target material for production within the current time range, and the predicted defective part ratio within the current time range refers to the proportion of defective parts manufactured using the target material within the current time range. Defective parts refer to products that cannot be used normally.
[0081] 204. Based on the predicted defect rate, predicted defective parts ratio, and material demand within the current time range, the server determines the required reserve quantity for the target material within the current time range.
[0082] The required reserve quantity for the target material within the current time frame refers to the quantity of target material prepared in addition to meet production needs.
[0083] The technical solution provided in this application obtains the material usage information of a target material, which is a material used in the manufacturing process. The material usage information includes historical defect rates, static information, and material requirements. Feature extraction and weight prediction are performed on this material usage information to obtain multiple material usage information features and multiple fusion weights. Based on these multiple material usage information features and multiple fusion weights, the predicted defect rate and predicted defective parts ratio within the current time range are determined. Based on the predicted defect rate, predicted defective parts ratio, and material requirements within the current time range, the required reserve quantity for the target material within the current time range is determined. In other words, the technical solution provided in this application can utilize the material usage information of the target material to predict the required reserve quantity for the target material within the current time range, thereby providing a reference for manufacturing enterprises and facilitating their decision-making.
[0084] Steps 201-204 above are a brief introduction to the embodiments of this application. The following will provide a more detailed explanation of the method for determining the reserve quantity provided by the embodiments of this application, using some examples. See [link to relevant documentation]. Figure 3 Taking the server as the executing entity as an example, the method includes the following steps.
[0085] 301. The server obtains the material usage information of the target material. This material usage information includes historical defect rate, static information, and material demand. The static information includes material characteristics, factory characteristics, and historical defect statistics. The material demand includes historical material demand and material demand within the current time range.
[0086] The target material refers to the materials or components used in the manufacturing process. The historical defect rate of the target material refers to the probability that the target material has contained defective parts during historical production processes. "Historical" here refers to a historical period ending at the current time frame. The time frame can be divided into different lengths, such as half a month, one month, one quarter, or half a year. When using a one-month time frame, the current time frame refers to the current month; when using a quarterly time frame, the current time frame refers to the current quarter. Static information refers to information that does not change. Material characteristics in static information describe the properties of the target material itself and typically do not change; therefore, material characteristics are considered static information. Plant characteristics describe the characteristics of the plant that uses the target material for production and typically do not change; therefore, plant characteristics are also considered static information. Historical defect statistics of the target material describe the statistical characteristics related to historical defects of the target material and do not change; therefore, historical defect statistics are also considered static information. Material requirements refer to the quantity of the target material consumed in production.
[0087] In some embodiments, the historical defect rate includes the historical incoming material defect rate and the historical in-house defect rate. The historical incoming material defect rate refers to the probability that a supplier of the target material has supplied defective materials over a historical period. The historical in-house defect rate refers to the probability that defective materials will appear in the target material during the factory's manufacturing process. In some embodiments, the historical incoming material defect rate is denoted as... Historical self-made defect rate record Where T represents the current time range, h represents the historical period of h months, and (Th: T-1) refers to the historical duration from h months prior to the current time range T to the previous month of the current time range T. In some embodiments, h is 3 or 6, that is, Th is the previous three or six months of the current time range. This is because the processes of the target material supplier and the processes of the factory using the target material for production will improve over time. Therefore, configuring the history to the previous three or six months of the current time range can reflect the changes in processes and has higher reference value.
[0088] In some embodiments, the static information includes material characteristics, plant characteristics, and historical defect statistics. Material characteristics describe the properties of the target material itself, such as material category, supplier, price, and specifications. Plant characteristics describe the characteristics of the plant that manufactures the target material, such as plant identification, equipment type, and workforce. Historical defect statistics include factory historical window characteristics, material historical window characteristics, and material category historical window characteristics. Factory historical window characteristics describe the factory's historical production situation, such as the factory's defective material ratio in the previous quarter, the average number of defective materials in the previous quarter, and the factory's defective material ratio in the same period last year. Material historical window characteristics describe the historical usage of the target material, such as the target material's defective material ratio in the previous quarter, the average number of defective materials in the previous quarter, and the target material's defective material ratio in the same period last year. Material category historical window characteristics describe the historical usage of materials within the target material's category, such as the material category's defective material ratio in the previous quarter, the average number of defective materials in the previous quarter, and the material category's defective material ratio in the same period last year.
[0089] In some embodiments, material requirements are expressed as X T-h:T The expression is given, where T represents the current time range and h represents the historical time range of h months.
[0090] In one possible implementation, the server acquires historical material data, historical defective material data, material requirements, and material information for the target material. The historical material data includes the historical quantity of the target material used and factory information, while the historical defective material data includes the historical quantity of defective materials. The server performs statistical analysis on the historical material data and the historical defective material data to obtain the material usage information for the target material.
[0091] Among them, the historical material usage includes the usage of the target material in the previous months before the current time range, and the historical defective material data includes the number of defective incoming materials and the number of defective self-made materials in the previous months before the current time range.
[0092] In some embodiments, the material information includes historical incoming material defect rate, historical in-house defect rate of the target material, material characteristics of the target material, plant characteristics, historical defect statistics, historical material demand, and material demand within the current time frame. The historical incoming material defect rate and historical in-house defect rate of the target material are both statistically obtained at a monthly granularity. For example, the historical incoming material defect rate includes the incoming material defect rate for the three months prior to the current time frame. include as well as The incoming material defect rate for the past three months. Historical material requirements are also statistically analyzed on a monthly basis. For example, historical material requirements include material requirements for the three months preceding the current timeframe. Therefore, historical material requirements include X... T-3 X T-2 and X T-1 Material requirements for three months.
[0093] It should be noted that the historical incoming material defect rate, the historical self-manufactured defect rate of the target material, and the historical defect statistical characteristics are all derived from historical material data and historical defective material data; the material characteristics of the target material are derived from the material information of the target material; the factory characteristics are derived from the factory information; and the historical material demand and the material demand within the current time range are derived from the material demand.
[0094] In this implementation method, statistical analysis of historical material data, historical defective material data, and material demand of the target material can yield material usage information with high accuracy.
[0095] Optionally, after the above implementation, in order to ensure the accuracy of the material usage information, the server can also perform the following steps.
[0096] In one possible implementation, the server performs data cleaning, standardization, and normalization on the material usage information of the target material to eliminate the impact of outliers and dimensions in the material usage information on subsequent processing.
[0097] Another implementation of step 301 described above will be described below.
[0098] In one possible implementation, the server obtains the material usage information of the target material from the terminal.
[0099] Among them, the terminal is the terminal used by technicians.
[0100] In this implementation, the material usage information of the target material can be obtained directly from the terminal, resulting in high efficiency in obtaining the material usage information.
[0101] For example, the terminal displays a material usage information acquisition interface, which is used to obtain the material usage information of the target material. In response to an input operation on the material usage information acquisition interface, the terminal obtains the material usage information corresponding to the input operation. In response to a confirmation operation on the material usage information acquisition interface, the terminal uploads the material usage information of the target material to the server, and the server obtains the material usage information of the target material.
[0102] For example, in response to the selection of a target material, the terminal displays a material usage information acquisition interface for that target material, which includes a material usage information input area. In response to input in the material usage information input area, the terminal acquires the material usage information for the target material. In response to clicking the confirmation control displayed on the material usage information acquisition interface, the terminal uploads the material usage information for the target material to the server, and the server acquires the material usage information for the target material.
[0103] It should be noted that the descriptions of historical defect rate, static information and material requirements in the above embodiments are merely examples. Technical personnel can add, delete or adjust the information included in historical defect rate, static information and material requirements according to actual conditions. This application embodiment does not limit this.
[0104] Optionally, after step 301, to facilitate subsequent processing, the server can also encode the historical incoming defect rate of the target material, the historical self-manufactured defect rate of the target material, the material characteristics of the target material, the factory characteristics of the factory, the historical defect statistical characteristics, the historical material demand, and the material demand within the current time range. The above encoding process will be explained below.
[0105] In one possible implementation, the server embeds and encodes the material usage information of the target material to obtain a target embedding vector for that material usage information. In subsequent processing, the target embedding vector is then used to replace the material usage information.
[0106] For example, the server embeds and encodes the historical defect rate, static information, and material requirements in the material usage information to obtain historical defect embedding vector, static embedding vector, and material requirements embedding vector. These historical defect embedding vector, static embedding vector, and material requirements embedding vector belong to the target embedding vector.
[0107] 302. The server performs feature extraction on the material usage information to obtain multiple material usage information features.
[0108] Feature extraction is used to abstractly represent material usage information, thereby obtaining multiple material usage information features. Different material usage information features focus on different aspects of the material usage information. Weight prediction is used to determine fusion weights, which are used to fuse multiple material usage information features in subsequent prediction processes. In this embodiment, one material usage information feature corresponds to at least two fusion weights, which correspond to different prediction tasks. For example, the at least two fusion weights include at least one fusion weight corresponding to the predicted defect rate and at least one fusion weight corresponding to the predicted defective parts ratio.
[0109] In one possible implementation, the server uses multiple first-type residual connection blocks to extract features from the material usage information, thereby obtaining multiple material usage information features. The parameters of different first-type residual connection blocks are different.
[0110] The first type of residual connection block is a virtual module, which can be regarded as a collection of residual connection algorithms encapsulated. Different parameters of different first-type residual connection blocks indicate that they focus on different content when extracting features. In this embodiment, one first-type residual connection block extracts a material information feature from the material usage information. Therefore, the number of multiple material information features is the same as the number of multiple first-type residual connection blocks. The number of first-type residual connection blocks is set by the technician according to the actual situation, and this embodiment does not limit this. In some embodiments, the first-type residual connection block belongs to a prediction model. The prediction model is a model provided in this embodiment for determining the predicted defective parts ratio and the predicted failure rate. The training method of the prediction model will be described in subsequent embodiments. In other words, the feature extraction method provided in the above embodiments is implemented by inputting the material usage information into the prediction model. The prediction model includes multiple types of residual connection blocks, and the first-type residual connection block is one of these multiple types of residual connection blocks. The first-type residual connection block is also called an Expert residual connection block.
[0111] In this implementation, multiple material usage information features can be obtained by using multiple first-type residual connection blocks to extract features from the material usage information, which is highly efficient.
[0112] For example, for any one of the multiple first-type residual join blocks, the server performs a full join on the material usage information using that first-type residual join block to obtain a first residual feature of the material usage information. The server then performs a full join, linear rectification, and random deactivation on the material usage information using the first-type residual join block to obtain a second residual feature of the material usage information. The server then fuses the first residual feature with the second residual feature using the first-type residual join block to obtain a third residual feature of the material usage information. Finally, the server performs regularization on the third residual feature using the first-type residual join block to obtain the material usage information feature corresponding to the first-type residual join block.
[0113] The process of fusing the first residual feature with the second residual feature is the residual connection process. The purpose of residual connection is to retain the content of the material information to the greatest extent possible during the processing of material information.
[0114] For example, see Figure 4The first residual connection block 401 includes a first fully connected unit 4011, a second fully connected unit 4012, a linear rectification unit 4013, a random deactivation unit 4014, and a regularization unit 4015. The parameters of the first residual connection block refer to the set of parameters of each unit in the first fully connected unit 4011, the second fully connected unit 4012, the linear rectification unit 4013, the random deactivation unit 4014, and the regularization unit 4015. In the first processing, the server uses the first fully connected unit 4011 of the first type of residual connection block 401 to perform a full connection (Dense) on the material usage information 402 to obtain the first residual feature of the material usage information. In the other processing, the server uses the second fully connected unit 4012 of the first type of residual connection block 401 to perform a full connection (Dense) on the material usage information 402 to obtain the first reference feature of the material usage information 402. The server uses the linear rectification unit 4013 of the first type of residual join block 401 to perform linear rectification (ReLU) on the first reference feature to obtain the second reference feature of the material usage information 402. The server uses the random deactivation unit 4014 of the first type of residual join block 401 to perform random deactivation (Dropout) on the second reference feature to obtain the second residual feature of the material usage information 402. The server uses the first type of residual join block 401 to add the first residual feature and the second residual feature to obtain the third residual feature of the material usage information. The server uses the regularization unit 4015 of the first type of residual join block 401 to perform regularization (LayerNorm) on the third residual feature to obtain the material usage information feature 403 corresponding to the material usage information 402 and the first type of residual join block.
[0115] The above processing can be represented by the following formulas (1) and (2).
[0116]
[0117]
[0118] in, For material usage information, For material usage information characteristics, This is the second residual characteristic. This is the first residual characteristic.
[0119] Another implementation of step 302 described above will be described below.
[0120] In one possible implementation, the server uses multiple first-class coding blocks to encode the material usage information, thereby obtaining multiple material usage information features, with different parameters for different first-class coding blocks.
[0121] The first type of coding block is also a virtual module used to encode material usage information into material usage information features. In the process of extracting material usage information features, the first type of coding block does not use residual connections. Similarly to the above implementation, the first type of coding block also belongs to the prediction model. The prediction model can use either the first type of residual connection block or the first type of coding block for feature extraction; this application does not limit this approach.
[0122] In this implementation, multiple first-class coding blocks are used to encode the material usage information, which can obtain the material usage information features and is highly efficient.
[0123] For example, for any one of the multiple first-type coding blocks, the server inputs the material usage information into the first-type coding block, which then encodes the material usage information based on an attention mechanism to obtain the material usage information features. In this implementation, the first-type coding block can be regarded as an encoder of a Transform model.
[0124] For example, for any one of the multiple first-class coding blocks, the server performs embedding encoding on multiple sub-information of the material usage information to obtain the information embedding encoding and position embedding encoding of each sub-information. The server concatenates the information embedding encoding and position embedding encoding of each sub-information to obtain the input matrix of each sub-information. The server inputs the input matrix of each sub-information into the first-class coding block, and performs a linear transformation on the input matrix of each sub-information through the first-class coding block to obtain the query matrix, key matrix, and value matrix of each sub-information. Based on the query matrix and key matrix of each sub-information, the server determines the attention weights between each sub-information through the first-class coding block. Finally, the server fuses the value matrices of each sub-information using the attention weights between them through the first-class coding block to obtain the material usage information features of the material usage information.
[0125] 303. The server performs weight prediction on the material usage information to obtain multiple fusion weights for the material usage information. These multiple fusion weights are used to fuse different material usage information features.
[0126] The multiple fusion weights can fuse multiple material usage information features in different ways for use in subsequent prediction tasks. In this embodiment, the prediction tasks include two tasks: determining the predicted defect rate and determining the predicted defective parts ratio. Accordingly, the multiple fusion weights include multiple fusion weights corresponding to the first prediction task and multiple fusion weights corresponding to the second prediction task. In other words, different prediction tasks correspond to different combinations of fusion weights. Furthermore, the number of fusion weights corresponding to each prediction task is the same as the number of material usage information features; that is, when there are two material usage information features, each prediction task corresponds to two fusion weights.
[0127] In one possible implementation, the server uses multiple second-type residual connect blocks to extract features from the material usage information, obtaining multiple weighted prediction features of the material usage information. The parameters of different second-type residual connect blocks are different. The server normalizes these multiple weighted prediction features to obtain the multiple fused weights.
[0128] The second type of residual connect block is a virtual module, which can be considered as a collection encapsulating a set of residual connect algorithms. Different parameters of the second type of residual connect blocks indicate that they focus on different aspects during feature extraction. In this embodiment, the structure of the second type of residual connect block is the same as that of the first type of residual connect block, but the parameters of the second type of residual connect block are different. The number of multiple second type of residual connect blocks is the same as the number of prediction tasks, and one second type of residual connect block is used to predict the fusion weights corresponding to one prediction task. In some embodiments, the second type of residual connect block belongs to the prediction model and is also called a gated residual connect block. The weight prediction features are used to predict the fusion weights; therefore, the weight prediction features can reflect the importance of material information in different aspects.
[0129] In this implementation, multiple second-type residual connective blocks are used to extract features from the material usage information, resulting in multiple weighted prediction features. Normalizing these multiple weighted prediction features yields multiple fused weights, which is highly efficient.
[0130] For example, for any one of the multiple second-type residual join blocks, the server performs a full join on the material usage information using that second-type residual join block to obtain a first residual feature of the material usage information. The server then performs a full join, linear rectification, and random deactivation on the material usage information using the second-type residual join block to obtain a second residual feature of the material usage information. The server then fuses the first residual feature with the second residual feature using the second-type residual join block to obtain a third residual feature of the material usage information. The server then regularizes the third residual feature using the second-type residual join block to obtain the weight prediction feature corresponding to the material usage information and the second-type residual join block. Finally, the server processes the weight prediction feature using a first normalization function to obtain the fused weight corresponding to the second-type residual join block.
[0131] The first normalization function is the Softmax function.
[0132] It should be noted that since the structure of the second type of residual connecting block is the same as that of the first type of residual connecting block, the above processing procedure and the method of processing the material information using the first type of residual connecting block in step 302 belong to the same inventive concept. The implementation process is described in the relevant description in step 302 above, and will not be repeated here.
[0133] In some embodiments, the server determines the fusion weight using the following formula (3).
[0134]
[0135] Among them, g k (x) represents the fusion weights, and Softmax is the first normalization function. Here is the function corresponding to the second type of residual connective block, and k is the identifier of the prediction task.
[0136] Another implementation of step 303 described above will be described below.
[0137] In one possible implementation, the server encodes the material usage information using multiple second-type coding blocks to obtain multiple weighted prediction features of the material usage information, with different parameters for each second-type coding block. The server then normalizes these multiple weighted prediction features to obtain the multiple fused weights.
[0138] The second type of encoding block is also a virtual module used to encode material usage information into weighted prediction features. The structure of the second type of encoding block is the same as that of the first type of encoding block, but the parameters of the second type of encoding block are different from those of the first type of encoding block. The second type of encoding block does not use residual connections in the process of extracting the weighted prediction features of material usage information. Similarly to the above implementation, the second type of encoding block also belongs to the prediction model. The prediction model can use either the second type of residual connection block or the second type of encoding block for feature extraction; this application embodiment does not limit this. Furthermore, in this application embodiment, the residual connection block and the encoding block are not bound together. That is, after using the first type of residual connection block in step 302, either the second type of residual connection block or the second type of encoding block can be used for processing in step 303; this application embodiment does not limit this.
[0139] In this implementation, multiple second-type coding blocks are used to encode the material usage information, which can obtain weighted prediction features and is highly efficient.
[0140] For example, for any one of the multiple second-type coding blocks, the server inputs the material usage information into the second-type coding block, which then encodes the material usage information based on an attention mechanism to obtain the weight prediction features of the material usage information. The server processes these weight prediction features using a first normalization function to obtain the fusion weights corresponding to the second-type residual connection block.
[0141] 304. Based on multiple material information features and multiple fusion weights, the server determines the predicted defect rate within the current time range.
[0142] The predicted defect rate within the current time frame refers to the predicted probability of defective materials appearing during production using the target material within the current time frame.
[0143] In one possible implementation, the server obtains multiple first fusion weights corresponding to the predicted defect rate from the multiple fusion weights. The server uses the multiple first fusion weights to fuse the multiple material usage information features to obtain a first fusion feature. The server determines the predicted defect rate based on the first fusion feature.
[0144] Here, the predicted failure rate corresponds to a prediction task. In some embodiments, the above implementation is executed by the server through a prediction model. Since the prediction model can perform multiple prediction tasks, it is a multi-task learning model.
[0145] In this implementation, the material usage information features are fused using the fusion weights corresponding to the predicted defect rate to obtain the first fusion feature. The predicted defect rate is then determined based on the first fusion feature, resulting in high accuracy in predicting the defect rate.
[0146] To provide a clearer explanation of the above embodiments, the following description will be divided into several parts.
[0147] Part 1: The server obtains multiple first fusion weights corresponding to the predicted failure rate from these multiple fusion weights.
[0148] In one possible implementation, the server obtains multiple first fusion weights determined by the second type of residual connection block or the second type of coding block corresponding to the predicted failure rate from the multiple fusion weights.
[0149] In this implementation, the corresponding first fusion weight can be determined by using the second type of residual connection block or the second type of coding block corresponding to the predicted defect rate, which is highly efficient.
[0150] The second part involves the server using the multiple first fusion weights to fuse the multiple material information features to obtain the first fusion feature.
[0151] In one possible implementation, the predicted defect rate includes a predicted incoming material defect rate and a predicted in-house defect rate. The first fusion feature includes a third fusion feature and a fourth fusion feature. The server obtains multiple third fusion weights corresponding to the predicted incoming material defect rate from the multiple first fusion weights. The server obtains multiple fourth fusion weights corresponding to the predicted in-house defect rate from the multiple first fusion weights. The server uses the multiple third fusion weights to fuse the multiple material usage information features to obtain the third fusion feature. The server uses the multiple fourth fusion weights to fuse the multiple material usage information features to obtain the fourth fusion feature.
[0152] Among them, the predicted incoming material defect rate refers to the predicted probability that there are defective materials in the target materials provided by the supplier, while the predicted self-made defect rate refers to the probability that defective materials will appear during the production and manufacturing process.
[0153] For example, the server obtains multiple third fusion weights corresponding to the predicted incoming material defect rate from the multiple first fusion weights. The server obtains multiple fourth fusion weights corresponding to the predicted self-manufactured defect rate from the multiple first fusion weights. The server uses the multiple third fusion weights to perform a weighted summation of the multiple material usage information features to obtain the third fusion feature. The server uses the multiple fourth fusion weights to perform a weighted summation of the multiple material usage information features to obtain the fourth fusion feature.
[0154] Part Three: The server determines the predicted defect rate based on the first fusion feature.
[0155] In one possible implementation, the predicted defect rate includes a predicted incoming defect rate and a predicted in-house defect rate. The server determines the predicted incoming defect rate based on the third fusion feature. The server determines the predicted in-house defect rate based on the fourth fusion feature.
[0156] The above implementation method is illustrated below with two examples.
[0157] Example 1: The server uses the third type of residual connect block corresponding to the predicted incoming material defect rate to extract features from the third fusion feature, obtaining the incoming material defect rate prediction feature. The server normalizes this incoming material defect rate prediction feature to obtain the predicted incoming material defect rate. The server uses the third type of residual connect block corresponding to the predicted self-made defect rate to extract features from the fourth fusion feature, obtaining the self-made defect rate prediction feature. The server normalizes this self-made defect rate prediction feature to obtain the predicted self-made defect rate.
[0158] The third type of residual connect block is a virtual module, which can be considered as a collection encapsulating a set of residual connect algorithms. Different third-type residual connect blocks have different parameters, indicating that they focus on different aspects during feature extraction. In this embodiment, the structure of the third-type residual connect block is the same as that of the first and second types of residual connect blocks, but the parameters of the third-type residual connect block are different from those of the first and second types. The number of third-type residual connect blocks is the same as the number of prediction tasks, with one third-type residual connect block used to implement one prediction task. In some embodiments, the third-type residual connect block belongs to the prediction model and is also referred to as a Tower residual connect block.
[0159] For example, the server uses the third type of residual connect block corresponding to the predicted incoming material defect rate to perform a full connection on the third fused feature, obtaining the first residual feature of the third fused feature. The server uses the third type of residual connect block to perform a full connection, linear rectification, and random deactivation on the third fused feature, obtaining the second residual feature of the third fused feature. The server uses the third type of residual connect block to fuse the first residual feature and the second residual feature, obtaining the third residual feature of the third fused feature. The server uses the third type of residual connect block to perform regularization on the third residual feature, obtaining the incoming material defect rate prediction feature corresponding to the third fused feature. The server uses a second normalization function to process the incoming material defect rate prediction feature, obtaining the predicted incoming material defect rate. The server uses the third type of residual connect block corresponding to the predicted self-made defect rate to perform a full connection on the fourth fused feature, obtaining the first residual feature of the fourth fused feature. The server uses the third type of residual connect block to perform a full connection, linear rectification, and random deactivation on the fourth fused feature, obtaining the second residual feature of the fourth fused feature. The server uses a third type of residual joiner block to fuse the first residual feature and the second residual feature to obtain the third residual feature of the fourth fused feature. The server uses the third type of residual joiner block to regularize the third residual feature to obtain the self-made defect rate prediction feature corresponding to the fourth fused feature. The server uses a second normalization function to process the self-made defect rate prediction feature to obtain the predicted self-made defect rate.
[0160] The first normalization function is the Sigmoid function.
[0161] Example 2: The server encodes the third fusion feature using the third type of coding block corresponding to the predicted incoming material defect rate, obtaining the incoming material defect rate prediction feature. The server normalizes this incoming material defect rate prediction feature to obtain the predicted incoming material defect rate. The server encodes the fourth fusion feature using the third type of coding block corresponding to the predicted self-made defect rate, obtaining the self-made defect rate prediction feature. The server normalizes this self-made defect rate prediction feature to obtain the predicted self-made defect rate.
[0162] The third type of coding block is also a virtual module used to perform the prediction task. The structure of the third type of coding block is the same as that of the first and second types of coding blocks, but the parameters of the third type of coding block are different from those of the first and second types of coding blocks. The third type of coding block does not use residual connections during the prediction process. Similarly to the above implementation, the third type of coding block also belongs to the prediction model. The prediction model can use either the third type of residual connection block or the third type of coding block for feature extraction; this application embodiment does not limit this. Furthermore, in this application embodiment, the residual connection block and the coding block are not bound together. That is, after using the second type of residual connection block in step 303, either the third type of residual connection block or the third type of coding block can be used for processing in step 304; this application embodiment does not limit this.
[0163] For example, the server inputs the third fusion feature into the third type of coding block corresponding to the predicted incoming material defect rate. The third type of coding block encodes the third fusion feature based on an attention mechanism to obtain the incoming material defect rate prediction feature. The server processes the incoming material defect rate prediction feature using a second normalization function to obtain the predicted incoming material defect rate. The server inputs the fourth fusion feature into the third type of coding block corresponding to the predicted self-manufactured defect rate. The third type of coding block encodes the fourth fusion feature based on an attention mechanism to obtain the self-manufactured defect rate prediction feature. The server processes the self-manufactured defect rate prediction feature using a second normalization function to obtain the predicted self-manufactured defect rate.
[0164] 305. Based on multiple material information features and multiple fusion weights of the material information, the server determines the predicted proportion of defective parts within the current time range.
[0165] The predicted defective parts ratio within the current time frame refers to the proportion of defective parts manufactured using the target material within the current time frame. Defective parts are products that cannot be used normally.
[0166] In one possible implementation, the server obtains multiple second fusion weights corresponding to the predicted defective parts ratio from the multiple fusion weights. The server uses the multiple second fusion weights to fuse the multiple material usage information features to obtain a second fusion feature. The server determines the predicted defective parts ratio based on the second fusion feature.
[0167] The predicted defective component ratio corresponds to a prediction task. In some embodiments, the above implementation is performed by a server using a prediction model.
[0168] In this implementation, material usage information features are fused using fusion weights corresponding to the predicted defective parts ratio to obtain a second fusion feature. The predicted defective parts ratio is then determined based on this second fusion feature, resulting in high accuracy in predicting the defective parts ratio.
[0169] To provide a clearer explanation of the above embodiments, the following description will be divided into several parts.
[0170] Part 1: The server obtains multiple second fusion weights corresponding to the predicted defective component ratio from the multiple fusion weights.
[0171] In one possible implementation, the server obtains multiple second fusion weights from the multiple fusion weights, which are determined by the second type of residual connection block or the second type of coding block corresponding to the predicted bad component ratio.
[0172] In this implementation, the corresponding second fusion weight can be determined by using the second type of residual connection block or the second type of coding block corresponding to the predicted defective parts ratio, which is highly efficient.
[0173] The second part involves the server using multiple second fusion weights to fuse the multiple material information features to obtain the second fusion feature.
[0174] In one possible implementation, the predicted defective parts ratio includes a predicted incoming defective parts ratio and a predicted in-house defective parts ratio. The second fusion feature includes a fifth fusion feature and a sixth fusion feature. The server obtains multiple fifth fusion weights corresponding to the predicted incoming defective parts ratio from the multiple second fusion weights. The server uses these multiple fifth fusion weights to fuse the multiple material usage information features to obtain a fifth fusion feature. The server obtains multiple sixth fusion weights corresponding to the predicted in-house defective parts ratio from the multiple second fusion weights. The server uses these multiple sixth fusion weights to fuse the multiple material usage information features to obtain a sixth fusion feature.
[0175] Among them, the predicted defective part ratio refers to the predicted probability of defective parts being generated due to the presence of defective materials in the target material, while the predicted defective part ratio refers to the predicted probability of defective parts being generated during the production and manufacturing process.
[0176] For example, the server obtains multiple fifth fusion weights corresponding to the predicted proportion of defective incoming materials from the multiple second fusion weights. The server uses these multiple fifth fusion weights to perform a weighted sum of the multiple material usage information features to obtain a fifth fusion feature. The server obtains multiple sixth fusion weights corresponding to the predicted proportion of defective self-made parts from the multiple second fusion weights. The server uses these multiple sixth fusion weights to perform a weighted sum of the multiple material usage information features to obtain a sixth fusion feature.
[0177] Part Three: Based on this second fusion feature, the server determines the predicted proportion of defective components.
[0178] In one possible implementation, the predicted defective parts ratio includes a predicted incoming defective parts ratio and a predicted in-house defective parts ratio. The server determines the predicted incoming defective parts ratio based on the fifth fusion feature. The server determines the predicted in-house defective parts ratio based on the sixth fusion feature.
[0179] The above implementation method is illustrated below with two examples.
[0180] Example 1: The server uses the third type of residual connect block corresponding to the predicted incoming defective parts ratio to extract features from the fifth fusion feature, obtaining the incoming defective parts ratio prediction feature. A full connection is then performed on this incoming defective parts ratio prediction feature to obtain the predicted incoming defective parts ratio. The server uses the third type of residual connect block corresponding to the predicted self-made defective parts ratio to extract features from the sixth fusion feature, obtaining the self-made defective parts ratio prediction feature. A full connection is then performed on this self-made defective parts ratio prediction feature to obtain the predicted self-made defective parts ratio.
[0181] For example, the server uses the third type of residual connect block corresponding to the predicted defective component ratio to perform a full connection on the fifth fused feature, obtaining the first residual feature of the fifth fused feature. The server uses the third type of residual connect block to perform a full connection, linear rectification, and random deactivation on the fifth fused feature, obtaining the second residual feature of the fifth fused feature. The server uses the third type of residual connect block to fuse the first residual feature and the second residual feature, obtaining the third residual feature of the fifth fused feature. The server uses the third type of residual connect block to regularize the third residual feature, obtaining the predicted defective component ratio feature corresponding to the fifth fused feature. The server processes the predicted defective component ratio feature using a fully connected matrix and a bias matrix, obtaining the predicted defective component ratio. The server uses the third type of residual connect block corresponding to the predicted self-made defective component ratio to perform a full connection on the sixth fused feature, obtaining the first residual feature of the sixth fused feature. The server uses the third type of residual connect block to perform a full connection, linear rectification, and random deactivation on the sixth fused feature, obtaining the second residual feature of the sixth fused feature. The server uses a third type of residual join block to fuse the first residual feature and the second residual feature to obtain the third residual feature of the sixth fused feature. The server uses the third type of residual join block to regularize the third residual feature to obtain the self-made defective part ratio prediction feature corresponding to the sixth fused feature. The server uses a fully connected matrix and a bias matrix to process the self-made defective part ratio prediction feature to obtain the predicted self-made defective part ratio.
[0182] In some embodiments, the server determines the fusion features in steps 304 and 305 above by using the following formula (4).
[0183]
[0184] Among them, z k As a feature of fusion, For the function corresponding to the i-th type I residual connect block, g k (x i ) represents the fusion weight corresponding to the i-th material information feature, and N represents the number of the first type of residual connection blocks.
[0185] In some embodiments, the server determines the incoming material defect rate prediction feature, the self-made defect rate prediction feature, the incoming material defective parts ratio prediction feature, and the self-made defective parts ratio prediction feature in steps 304 and 305 above by the following formula (5).
[0186]
[0187] in, These are the features for predicting incoming material defect rate, in-house defect rate, incoming defective parts ratio, or in-house defective parts ratio. This is the function corresponding to the third type of residual connection block.
[0188] Example 2: The server encodes the fifth fusion feature using the third-class coding block corresponding to the predicted incoming defective parts ratio, obtaining the incoming defective parts ratio prediction feature. The server performs a full connection on this incoming defective parts ratio prediction feature to obtain the predicted incoming defective parts ratio. The server encodes the sixth fusion feature using the third-class coding block corresponding to the predicted self-made defective parts ratio, obtaining the self-made defective parts ratio prediction feature. The server performs a full connection on this self-made defective parts ratio prediction feature to obtain the predicted self-made defective parts ratio.
[0189] For example, the server inputs the fifth fusion feature into the third type of coding block corresponding to the predicted incoming defective parts ratio. The third type of coding block encodes the fifth fusion feature based on an attention mechanism to obtain the predicted incoming defective parts ratio feature. The server processes this predicted incoming defective parts ratio feature using a fully connected matrix and a bias matrix to obtain the predicted incoming defective parts ratio. The server inputs the sixth fusion feature into the third type of coding block corresponding to the predicted self-made defective parts ratio. The third type of coding block encodes the sixth fusion feature based on an attention mechanism to obtain the predicted self-made defective parts ratio feature. The server processes this self-made defective parts ratio feature using a fully connected matrix and a bias matrix to obtain the predicted self-made defective parts ratio.
[0190] To provide a clearer explanation of the technical solutions provided in the embodiments of this application, the following will be combined with... Figure 5 The above steps 301-305 will be explained. Figure 5The system includes a prediction model 500. The server acquires historical incoming material defect rates, historical in-house defect rates, static information, and material requirements. The server concatenates these data into material usage information. This usage information is then input into the prediction model 500. Multiple first-type residual connective blocks 501 in the prediction model 500 extract features from the usage information, resulting in multiple usage information features. The server further extracts features from the usage information using four second-type residual connective blocks 502 in the prediction model 500, resulting in multiple weighted prediction features. The server normalizes these multiple weighted prediction features using the prediction model 500, obtaining multiple fusion weights. Finally, the server fuses these multiple usage information features using the fusion weights in the prediction model 500, resulting in a third, fourth, fifth, and sixth fusion feature. The server inputs the third, fourth, fifth, and sixth fusion features into the four third-type residual connection blocks 503 of the prediction model 500, respectively. The four third-type residual connection blocks 503 process the third, fourth, fifth, and sixth fusion features to obtain the predicted incoming material defect rate, the predicted self-made defect rate, the predicted incoming material defective parts ratio, and the predicted self-made defective parts ratio.
[0191] 306. Based on the predicted defect rate, predicted defective parts ratio, and material demand within the current time range, the server determines the required reserve quantity for the target material within the current time range.
[0192] The required reserve quantity for the target material within the current time frame refers to the quantity of target material prepared in addition to meet production needs.
[0193] In one possible implementation, the server uses multiple sets of candidate constraints to perform multi-objective optimization on the predicted defect rate, the predicted proportion of defective parts, and the material demand within the current time range, obtaining the estimated reserve quantity corresponding to each set of candidate constraints. The server determines the minimum estimated reserve quantity among the estimated reserve quantities corresponding to each set of candidate constraints as the required reserve quantity for the target material within the current time range.
[0194] The candidate constraints include not preparing materials with a probability of producing defective parts less than the first threshold (materials with a low probability of defection are not prepared), not preparing high-value materials with a probability of producing defective parts less than the second threshold (materials with a low probability of defection and high price are not prepared), and not preparing materials with a defective part ratio less than the third threshold.
[0195] For example, the predicted defect rate includes the predicted incoming material defect rate and the predicted in-house defect rate, and the predicted defective parts ratio includes the predicted incoming material defective parts ratio and the predicted in-house defective parts ratio. The server uses the satisfaction rate and sluggishness of the target material as the optimization objective, and performs linear programming on the predicted incoming material defect rate, the predicted in-house defect rate, the predicted incoming material defective parts ratio, the predicted in-house defective parts ratio, and the material demand within the current time range under the constraints of multiple sets of candidate constraints to obtain the estimated reserve number corresponding to each set of candidate constraints.
[0196] Here, the satisfaction rate refers to the ratio of spare parts to defective materials. The optimization objective of the satisfaction rate is to ensure it is greater than 1, meaning the spare parts must be greater than the defective materials, thus maintaining uninterrupted normal production. The stagnant quantity refers to the amount of unused materials. Optimizing the stagnant quantity means minimizing the spare parts. The linear programming method can be any linear programming method provided in related technologies; this application does not limit this approach.
[0197] For example, the server uses the fulfillment rate and idling count of the target material as optimization objectives. Under the constraints of multiple sets of candidate constraints, it performs linear programming on the predicted incoming material defect rate, the predicted proportion of defective parts in the incoming material, and the material demand within the current time range, obtaining the estimated reserve loss for incoming materials corresponding to each set of candidate constraints. The server then uses the fulfillment rate and idling count of the target material as optimization objectives. Under the constraints of multiple sets of candidate constraints, it performs linear programming on the predicted in-house defect rate, the predicted proportion of defective parts in the in-house material, and the material demand within the current time range, obtaining the estimated reserve loss for in-house materials corresponding to each set of candidate constraints. The server determines the larger of the estimated reserve loss for incoming materials and the estimated reserve loss for in-house materials as the estimated reserve loss.
[0198] To provide a clearer explanation of the technical solutions provided in the embodiments of this application, the following will be combined with... Figure 6 For an explanation of steps 301-306 above, please refer to [link / reference]. Figure 6 The server obtains the material usage information for the target material. It inputs this information into a prediction model, which then uses this information to make predictions for the current time frame, including the predicted incoming material defect rate, the predicted in-house defect rate, the predicted proportion of defective incoming parts, and the predicted proportion of defective in-house parts. The server then performs post-processing (multi-objective optimization) on these figures to obtain the estimated reserve loss for incoming materials and the estimated reserve loss for in-house parts. The server determines the larger of these two estimates as the total estimated reserve loss.
[0199] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0200] The technical solution provided in this application obtains the material usage information of a target material, which is a material used in the manufacturing process. The material usage information includes historical defect rates, static information, and material requirements. Feature extraction and weight prediction are performed on this material usage information to obtain multiple material usage information features and multiple fusion weights. Based on these multiple material usage information features and multiple fusion weights, the predicted defect rate and predicted defective parts ratio within the current time range are determined. Based on the predicted defect rate, predicted defective parts ratio, and material requirements within the current time range, the required reserve quantity for the target material within the current time range is determined. In other words, the technical solution provided in this application can utilize the material usage information of the target material to predict the required reserve quantity for the target material within the current time range, thereby providing a reference for manufacturing enterprises and facilitating their decision-making.
[0201] This application also provides a method for training a prediction model, see [link to relevant documentation]. Figure 7 Taking the server as the executing entity as an example, the method includes the following steps.
[0202] 701. The server obtains the sample material usage information, which includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range of the sample.
[0203] The historical defect rate includes the historical incoming material defect rate and the historical self-made defect rate. Step 701 and the above step 301 belong to the same inventive concept, and the implementation process will not be described in detail.
[0204] 702. The server inputs the material information of the sample into the prediction model, and performs feature extraction and weight prediction on the material information of the sample through the prediction model to obtain multiple material information features of the sample and multiple sample fusion weights. These multiple sample fusion weights are used to fuse different material information features of the sample.
[0205] Step 702 and step 302 above belong to the same inventive concept, and the implementation process will not be described in detail.
[0206] 703. The server uses the prediction model to determine the predicted defect rate and the predicted proportion of defective parts within the current time range of the sample, based on the material information features of multiple samples and the fusion weight of these multiple samples.
[0207] The predicted defect rate includes the predicted incoming defect rate and the predicted self-made defect rate. The predicted defective parts ratio includes the predicted incoming defective parts ratio and the predicted self-made defective parts ratio. Step 703 belongs to the same inventive concept as steps 304 and 305 above, and the implementation process will not be described in detail.
[0208] 704. The server trains the prediction model based on the first difference information between the labeled defect rate and the predicted defect rate within the current time range of the sample, and the second difference information between the labeled defective parts ratio and the predicted defective parts ratio within the current time range of the sample.
[0209] In one possible implementation, the server inputs the first difference information and the second difference information into the joint loss function of the prediction model to determine the loss value for this round of training. The joint loss function includes a first loss function corresponding to the first difference information and a second loss function corresponding to the second difference information. The first loss function and the second loss function are combined with random noise to form the joint loss function. Based on this loss value, the server performs backpropagation in the prediction model to adjust the model parameters.
[0210] The first loss function and the second loss function are mean-square error (MSE) loss functions. The form of the first loss function is shown in Equation (6) below, and the form of the second loss function is shown in Equation (7) below.
[0211]
[0212]
[0213] Among them, Loss p For the first loss function, Loss y Let be the second loss function, and be the number of samples used to train the prediction model. This represents the labeling defect rate of sample i within the current time range T, which is also known as whether defective materials were produced. This represents the predicted failure rate of sample i within the current time range T. This represents the percentage of defective parts labeled in sample i within the current time range T. This represents the predicted proportion of defective parts for sample i within the current time range T.
[0214] Since the quantity of defective materials in a factory is much smaller than the quantity of normal materials, there will be a problem of unbalanced sample distribution when fitting and predicting the defect rate. This application embodiment improves the prediction accuracy of negative samples by designing the loss function weights for negative samples. Specifically, this is achieved through the following formulas (8)-(11).
[0215]
[0216]
[0217]
[0218] Loss = γ·Loss in +(1-γ)·Loss mfg (11)
[0219] Among them, W p P represents the fusion weights of the loss function. T =0 indicates that no defective material was produced, P T =1 indicates that defective material is produced, S(P T =1) represents the number of defective materials generated in the sample, S(P) T =0) indicates that there were no defective materials in the sample. This represents the first loss function corresponding to the predicted incoming material defect rate. The second loss function, Loss, represents the predicted proportion of defective incoming parts. in This represents the loss function corresponding to defective incoming materials. This represents the first loss function for predicting the defect rate of self-made products. The second loss function, Loss, represents the prediction of the proportion of defective self-made parts. mfg Let represent the loss function corresponding to poor self-control, Loss represent the joint loss function, and γ represent random noise.
[0220] Figure 8 This is a schematic diagram of a device for determining the number of spare parts provided in an embodiment of this application. See also... Figure 8 The device includes: an information acquisition module 801, a processing module 802, a first determination module 803, and a second determination module 804.
[0221] The information acquisition module 801 is used to acquire the material usage information of the target material. The material usage information includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range.
[0222] The processing module 802 is used to extract features and predict weights from the material information to obtain multiple material information features and multiple fusion weights. These multiple fusion weights are used to fuse different material information features.
[0223] The first determining module 803 is used to determine the predicted defect rate and the predicted proportion of defective parts within the current time range based on multiple material information features and multiple fusion weights of the material information.
[0224] The second determining module 804 is used to determine the required reserve quantity of the target material within the current time range based on the predicted defect rate, the predicted proportion of defective parts, and the material demand within the current time range.
[0225] In one possible implementation, the processing module 802 is used to extract features from the material usage information using multiple first-type residual connect blocks, obtaining multiple material usage information features, with different parameters for different first-type residual connect blocks. Then, it uses multiple second-type residual connect blocks to extract features from the material usage information, obtaining multiple weighted prediction features, with different parameters for different second-type residual connect blocks. Finally, it normalizes these multiple weighted prediction features to obtain multiple fused weights.
[0226] In one possible implementation, the processing module 802 is configured to, for any one of the plurality of first-type residual connect blocks, perform a full connection on the material usage information using the first-type residual connect block to obtain a first residual feature of the material usage information. Then, it performs a full connection, linear rectification, and random deactivation on the material usage information using the first-type residual connect block to obtain a second residual feature of the material usage information. Finally, it fuses the first residual feature with the second residual feature using the first-type residual connect block to obtain a third residual feature of the material usage information. Finally, it regularizes the third residual feature using the first-type residual connect block to obtain the material usage information feature corresponding to the first-type residual connect block.
[0227] In one possible implementation, the first determining module 803 is configured to obtain multiple first fusion weights corresponding to the predicted defect rate from the multiple fusion weights. The multiple material usage information features are fused using the multiple first fusion weights to obtain a first fusion feature. The predicted defect rate is determined based on the first fusion feature. Multiple second fusion weights corresponding to the predicted defective parts ratio are obtained from the multiple fusion weights. The multiple second fusion weights are fused using the multiple second fusion weights to obtain a second fusion feature. The predicted defective parts ratio is determined based on the second fusion feature.
[0228] In one possible implementation, the predicted defect rate includes a predicted incoming material defect rate and a predicted in-house defect rate. The first determining module 803 is used to obtain multiple third fusion weights corresponding to the predicted incoming material defect rate from the multiple first fusion weights. The multiple material usage information features are fused using the multiple third fusion weights to obtain the third fusion feature. Multiple fourth fusion weights corresponding to the predicted in-house defect rate are obtained from the multiple first fusion weights. The multiple fourth fusion weights are fused using the multiple fourth fusion weights to obtain the fourth fusion feature. The predicted incoming material defect rate is determined based on the third fusion feature. The predicted in-house defect rate is determined based on the fourth fusion feature.
[0229] In one possible implementation, the first determining module 803 is used to extract features from the third fusion feature using the third type of residual connect block corresponding to the predicted incoming material defect rate, to obtain the incoming material defect rate prediction feature. The incoming material defect rate prediction feature is then normalized to obtain the predicted incoming material defect rate. Next, the fourth fusion feature is extracted using the third type of residual connect block corresponding to the predicted self-manufactured defect rate, to obtain the self-manufactured defect rate prediction feature. This self-manufactured defect rate prediction feature is then normalized to obtain the predicted self-manufactured defect rate.
[0230] In one possible implementation, the predicted defective parts ratio includes a predicted incoming defective parts ratio and a predicted in-house defective parts ratio. The second fusion feature includes a fifth fusion feature and a sixth fusion feature. The first determining module 803 is used to obtain multiple fifth fusion weights corresponding to the predicted incoming defective parts ratio from the multiple second fusion weights. The multiple material usage information features are fused using the multiple fifth fusion weights to obtain a fifth fusion feature. Multiple sixth fusion weights corresponding to the predicted in-house defective parts ratio are obtained from the multiple second fusion weights. The multiple material usage information features are fused using the multiple sixth fusion weights to obtain a sixth fusion feature. Based on the fifth fusion feature, the predicted incoming defective parts ratio is determined. Based on the sixth fusion feature, the predicted in-house defective parts ratio is determined.
[0231] In one possible implementation, the first determining module 803 is used to extract features from the fifth fusion feature using a third type of residual connect block corresponding to the predicted incoming defective parts ratio, to obtain an incoming defective parts ratio prediction feature. A full connection is then performed on the incoming defective parts ratio prediction feature to obtain the predicted incoming defective parts ratio. Next, a third type of residual connect block corresponding to the predicted self-made defective parts ratio is used to extract features from the sixth fusion feature, to obtain a self-made defective parts ratio prediction feature. Finally, a full connection is performed on the self-made defective parts ratio prediction feature to obtain the predicted self-made defective parts ratio.
[0232] In one possible implementation, the second determining module 804 is used to perform multi-objective optimization on the predicted defect rate, the predicted defective parts ratio, and the material demand within the current time range using multiple sets of candidate constraints, to obtain the estimated reserve quantity corresponding to each set of candidate constraints. The estimated reserve quantity with the smallest value among the estimated reserve quantities corresponding to each set of candidate constraints is determined as the reserve quantity required for the target material within the current time range.
[0233] In one possible implementation, the predicted defect rate includes the predicted incoming material defect rate and the predicted in-house defect rate, and the predicted defective parts ratio includes the predicted incoming material defective parts ratio and the predicted in-house defective parts ratio. The second determining module 804 is used to perform linear programming on the predicted incoming material defect rate, the predicted in-house defect rate, the predicted incoming material defective parts ratio, the predicted in-house defective parts ratio, and the material demand within the current time range, with the satisfaction rate and sluggishness of the target material as optimization objectives, under the constraints of the multiple sets of candidate constraints, to obtain the estimated reserve loss number corresponding to each set of candidate constraints.
[0234] It should be noted that the device for determining the reserve quantity provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining the reserve quantity and the method for determining the reserve quantity provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0235] The technical solution provided in this application obtains the material usage information of a target material, which is a material used in the manufacturing process. The material usage information includes historical defect rates, static information, and material requirements. Feature extraction and weight prediction are performed on this material usage information to obtain multiple material usage information features and multiple fusion weights. Based on these multiple material usage information features and multiple fusion weights, the predicted defect rate and predicted defective parts ratio within the current time range are determined. Based on the predicted defect rate, predicted defective parts ratio, and material requirements within the current time range, the required reserve quantity for the target material within the current time range is determined. In other words, the technical solution provided in this application can utilize the material usage information of the target material to predict the required reserve quantity for the target material within the current time range, thereby providing a reference for manufacturing enterprises and facilitating their decision-making.
[0236] Figure 9 This is a schematic diagram of the structure of a training device for a prediction model provided in an embodiment of this application. See also... Figure 9The device includes: a sample acquisition module 901, an input module 902, a prediction module 903, and a training module 904.
[0237] The sample acquisition module 901 is used to acquire sample material usage information, which includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range of the sample.
[0238] The input module 902 is used to input the material information of the sample into the prediction model. The prediction model performs feature extraction and weight prediction on the material information of the sample to obtain multiple material information features of the sample and multiple sample fusion weights. The multiple sample fusion weights are used to fuse different material information features of the sample.
[0239] The prediction module 903 is used to determine the predicted defect rate and the predicted proportion of defective parts within the current time range of the sample by using the prediction model based on the material information features of multiple samples and the fusion weight of the multiple samples.
[0240] Training module 904 is used to train the prediction model based on the first difference information between the labeled defect rate and the predicted defect rate within the current time range of the sample, and the second difference information between the labeled defective parts ratio and the predicted defective parts ratio within the current time range of the sample.
[0241] In one possible implementation, the training module 904 is used to substitute the first difference information and the second difference information into the joint loss function of the prediction model to determine the loss value for this round of training. The joint loss function includes a first loss function corresponding to the first difference information and a second loss function corresponding to the second difference information. The first loss function and the second loss function are combined with random noise to form the joint loss function. Based on the loss value, backpropagation is performed in the prediction model to adjust the model parameters of the prediction model.
[0242] This application provides a computer device for performing the above-described method. This computer device can be implemented as a terminal or a server. The structure of the terminal will be described below:
[0243] Figure 10 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal 1000 includes: one or more processors 1001 and one or more memories 1002.
[0244] Processor 1001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0245] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 are used to store at least one computer program, which is executed by the processor 1001 to implement the method for determining the spare loss number or the method for training the prediction model provided in the method embodiments of this application.
[0246] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on terminal 1000 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0247] The aforementioned computer equipment can also be implemented as a server. The structure of a server is described below:
[0248] Figure 11This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1100 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1101 and one or more memories 1102. The one or more memories 1102 store at least one computer program, which is loaded and executed by the one or more processors 1101 to implement the methods provided in the above-described method embodiments. Of course, the server 1100 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 1100 may also include other components for implementing device functions, which will not be elaborated here.
[0249] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a computer program that can be executed by a processor to perform the method for determining the backup loss number or the method for training a prediction model in the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0250] In an exemplary embodiment, a computer program product or computer program is also provided, which includes program code stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium and executes the program code, causing the computer device to perform the above-described method for determining the backup loss or the method for training the prediction model.
[0251] In some embodiments, the computer program involved in the present application embodiments may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.
[0252] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0253] The above are merely optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for determining the reserve quantity, characterized in that, The method includes: Obtain the material usage information of the target material. The material usage information includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range. Feature extraction and weight prediction are performed on the material usage information to obtain multiple material usage information features and multiple fusion weights. The multiple fusion weights are used to fuse different material usage information features. Based on multiple material information features and multiple fusion weights of the material information, the predicted defect rate and the predicted proportion of defective parts are determined within the current time range. Based on the predicted defect rate, predicted defective parts ratio, and material demand within the current time frame, determine the required reserve quantity for the target material within the current time frame.
2. The method according to claim 1, characterized in that, The process of extracting features and predicting weights from the material usage information yields multiple material usage information features and multiple fusion weights, including: Multiple first-type residual connect blocks are used to extract features from the material usage information to obtain multiple material usage information features. The parameters of different first-type residual connect blocks are different. Multiple second-type residual connect blocks are used to extract features from the material usage information to obtain multiple weighted prediction features of the material usage information. The parameters of different second-type residual connect blocks are different. The multiple weighted prediction features are normalized to obtain the multiple fusion weights.
3. The method according to claim 2, characterized in that, The process involves using multiple first-type residual connect blocks to extract features from the material usage information, resulting in multiple material usage information features, including: For any one of the plurality of first-type residual connection blocks, the material usage information is fully connected using the first-type residual connection block to obtain the first residual feature of the material usage information; The material usage information is fully connected, linearly rectified, and randomly deactivated using the first type of residual connection block to obtain the second residual feature of the material usage information; The first type of residual connection block is used to fuse the first residual feature and the second residual feature to obtain the third residual feature of the material usage information; The third residual feature is regularized using the first type of residual connection block to obtain the material information feature corresponding to the material information and the first type of residual connection block.
4. The method according to claim 1, characterized in that, The method of determining the predicted defect rate and predicted defective parts ratio within the current time range based on multiple material usage information features and multiple fusion weights includes: Multiple first fusion weights corresponding to the predicted defect rate are obtained from the multiple fusion weights; the multiple material usage information features are fused using the multiple first fusion weights to obtain a first fusion feature; the predicted defect rate is determined based on the first fusion feature. Multiple second fusion weights corresponding to the predicted defective parts ratio are obtained from the multiple fusion weights; the multiple material information features are fused using the multiple second fusion weights to obtain a second fusion feature; the predicted defective parts ratio is determined based on the second fusion feature.
5. The method according to claim 4, characterized in that, The predicted defect rate includes the predicted incoming material defect rate and the predicted in-house defect rate. The first fusion feature includes a third fusion feature and a fourth fusion feature. The step of fusing the multiple material usage information features using the multiple first fusion weights to obtain the first fusion feature includes: Multiple third fusion weights corresponding to the predicted incoming material defect rate are obtained from the multiple first fusion weights; the multiple material usage information features are fused using the multiple third fusion weights to obtain the third fusion feature; Multiple fourth fusion weights corresponding to the predicted self-made defect rate are obtained from the multiple first fusion weights; the multiple material information features are fused using the multiple fourth fusion weights to obtain the fourth fusion feature; Determining the predicted defect rate based on the first fusion feature includes: Based on the third fusion feature, the predicted incoming material defect rate is determined; Based on the fourth fusion feature, the predicted self-made defect rate is determined.
6. The method according to claim 5, characterized in that, The determination of the predicted incoming material defect rate based on the third fusion feature includes: The third fusion feature is extracted using the third type of residual connection block corresponding to the predicted incoming material defect rate to obtain the incoming material defect rate prediction feature; the incoming material defect rate prediction feature is normalized to obtain the predicted incoming material defect rate. The determination of the predicted self-made defect rate based on the fourth fusion feature includes: The third type of residual connect block corresponding to the predicted self-made defect rate is used to extract features from the fourth fusion feature to obtain the self-made defect rate prediction feature; the self-made defect rate prediction feature is normalized to obtain the predicted self-made defect rate.
7. The method according to claim 4, characterized in that, The predicted defective parts ratio includes the predicted defective parts ratio of incoming materials and the predicted defective parts ratio of self-made materials. The second fusion feature includes a fifth fusion feature and a sixth fusion feature. The process of fusing the multiple material usage information features using the multiple second fusion weights to obtain the second fusion feature includes: Multiple fifth fusion weights corresponding to the predicted defective parts ratio are obtained from the multiple second fusion weights; the multiple material usage information features are fused using the multiple fifth fusion weights to obtain the fifth fusion feature; Multiple sixth fusion weights corresponding to the predicted proportion of self-made defective parts are obtained from the multiple second fusion weights; the multiple material information features are fused using the multiple sixth fusion weights to obtain a sixth fusion feature; Determining the predicted defective component ratio based on the second fusion feature includes: Based on the fifth fusion feature, the predicted proportion of defective incoming parts is determined; Based on the sixth fusion feature, the predicted proportion of self-made defective parts is determined.
8. The method according to claim 7, characterized in that, The step of determining the predicted defective parts ratio based on the fifth fusion feature includes: The third type of residual connection block corresponding to the predicted defective parts ratio is used to extract features from the fifth fusion feature to obtain the defective parts ratio prediction feature; the defective parts ratio prediction feature is fully connected to obtain the predicted defective parts ratio. The determination of the predicted proportion of self-made defective parts based on the sixth fusion feature includes: The sixth fusion feature is extracted using the third type of residual connection block corresponding to the predicted proportion of self-made defective parts to obtain the predicted proportion of self-made defective parts; the predicted proportion of self-made defective parts is then fully connected to obtain the predicted proportion of self-made defective parts.
9. The method according to claim 1, characterized in that, The determination of the required reserve quantity for the target material within the current time range, based on the predicted defect rate, predicted defective parts ratio, and material demand within the current time range, includes: Multiple sets of candidate constraints are used to perform multi-objective optimization on the predicted defect rate, the predicted proportion of defective parts, and the material demand within the current time range, so as to obtain the estimated loss reserve corresponding to each set of candidate constraints. The smallest estimated loss number among the estimated loss numbers corresponding to each group of candidate constraints is determined as the required loss number for the target material within the current time range.
10. The method according to claim 9, characterized in that, The predicted defect rate includes the predicted incoming defect rate and the predicted in-house defect rate; the predicted defective parts ratio includes the predicted incoming defective parts ratio and the predicted in-house defective parts ratio; the multi-objective optimization of the predicted defect rate, the predicted defective parts ratio, and the material demand within the current time range using multiple sets of candidate constraints to obtain the estimated loss reserve corresponding to each set of candidate constraints includes: Using the target material's satisfaction rate and sluggishness as optimization objectives, linear programming is performed on the predicted incoming material defect rate, the predicted self-manufactured defect rate, the predicted incoming material defective parts ratio, the predicted self-manufactured defective parts ratio, and the material demand within the current time range under the constraints of multiple sets of candidate constraints, to obtain the estimated reserve loss number corresponding to each set of candidate constraints.
11. A method for training a prediction model, characterized in that, The method includes: Obtain sample material usage information, which includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range of the sample. The sample material information is input into the prediction model, and the prediction model performs feature extraction and weight prediction on the sample material information to obtain multiple sample material information features and multiple sample fusion weights. The multiple sample fusion weights are used to fuse different sample material information features. The prediction model determines the predicted defect rate and the predicted proportion of defective parts within the current time range of the sample based on multiple sample material information features and the fusion weights of the multiple samples. The prediction model is trained based on the first difference information between the labeled defect rate and the predicted defect rate within the current time range of the sample, and the second difference information between the labeled defective parts ratio and the predicted defective parts ratio within the current time range of the sample.
12. The method according to claim 11, characterized in that, The training of the prediction model based on the first difference information between the labeled defect rate and the predicted defect rate within the current time range of the sample, and the second difference information between the labeled defective parts ratio and the predicted defective parts ratio within the current time range of the sample, includes: The first difference information and the second difference information are substituted into the joint loss function of the prediction model to determine the loss value of this round of training. The joint loss function includes a first loss function corresponding to the first difference information and a second loss function corresponding to the second difference information. The first loss function and the second loss function are combined with random noise to form the joint loss function. The loss value is used to backpropagate in the prediction model to adjust the model parameters.
13. A device for determining the number of spare parts, characterized in that, The device includes: The information acquisition module is used to acquire the material usage information of the target material. The material usage information includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range. The processing module is used to extract features and predict weights from the material usage information to obtain multiple material usage information features and multiple fusion weights, wherein the multiple fusion weights are used to fuse different material usage information features. The first determining module is used to determine the predicted defect rate and the predicted proportion of defective parts within the current time range based on multiple material information features of the material information and the multiple fusion weights. The second determining module is used to determine the required reserve quantity of the target material within the current time range based on the predicted defect rate, the predicted proportion of defective parts, and the material demand within the current time range.
14. A training device for a prediction model, characterized in that, The device includes: The sample acquisition module is used to acquire sample material usage information, which includes historical defect rate, static information and material demand. The static information includes material characteristics, factory characteristics and historical defect statistics. The material demand includes historical material demand and material demand within the current time range. The input module is used to input the sample material information into the prediction model, and to perform feature extraction and weight prediction on the sample material information through the prediction model to obtain multiple sample material information features and multiple sample fusion weights. The multiple sample fusion weights are used to fuse different sample material information features. The prediction module is used to determine the predicted defect rate and the predicted proportion of defective parts for the current time range of the sample by using the prediction model based on multiple sample material information features and the fusion weights of the multiple samples. The training module is used to train the prediction model based on a first difference between the labeled defect rate and the predicted defect rate within the current time range of the sample, and a second difference between the labeled defective parts ratio and the predicted defective parts ratio within the current time range of the sample.
15. A computer device, characterized in that, The computer device includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, the computer program being loaded and executed by the one or more processors to implement the method for determining the backup loss number as described in any one of claims 1 to 10, or to implement the method for training the prediction model as described in claim 11 or 12.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the method for determining the backup loss number as described in any one of claims 1 to 10, or to implement the method for training the prediction model as described in claim 11 or 12.