Equipment spare part demand prediction method and device, equipment and medium
By segmenting, combining, and standardizing historical data of equipment spare parts, and using Triformer and Scaleformer algorithms to predict future demand, the problem of inaccurate prediction in existing technologies is solved, and accurate spare parts demand prediction is achieved, ensuring timely equipment maintenance and production efficiency.
Patent Information
- Application Number
- CN202411450306.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-24
AI Technical Summary
Existing methods for predicting equipment spare parts demand suffer from high subjectivity, high computational complexity, high requirements for data quality, and sensitivity to noise. These issues lead to inaccurate prediction results, affecting equipment maintenance and support costs and combat readiness.
By acquiring historical time-series data of equipment spare parts, the Triformer and Scaleformer algorithms are used for segmentation, combination, and standardization to predict the demand for future timestamps. The Tri-Scaleformer algorithm is then used to determine the target predicted time-series data.
It improves the accuracy of equipment spare parts demand forecasting, ensuring that the required spare parts are obtained in a timely manner during equipment maintenance or repair, avoiding equipment downtime and production interruption, and improving industrial production efficiency.
Smart Images

Figure CN119358744A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology and related technical fields. Specifically, it relates to a method, device, equipment, and medium applicable to predicting the demand for equipment spare parts. Background Art
[0002] Since the 21st century, the electronics industry has developed rapidly, and the proportion of China's electronic manufacturing industry in the market has also increased significantly. As a result, it involves the issue of inventory control of electronic-related equipment spare parts. A basic element of spare parts inventory control is the accurate prediction of spare parts demand. The quality of electronic spare parts demand prediction will have a significant impact on the maintenance support cost and combat readiness integrity of equipment spare parts.
[0003] In the prior art, the prediction of equipment spare parts demand mainly includes the analytic hierarchy process, regression algorithms, etc. Among them, the analytic hierarchy process is relatively subjective and has consistency problems. When making pairwise comparisons, inconsistent situations may occur, that is, the judgments of experts are logically inconsistent, which will affect the final result. At the same time, there is also the problem of dimensionality limitation. When the number of criteria or alternative solutions is large, the computational complexity of the analytic hierarchy process will increase significantly, and the pairwise comparison matrix becomes difficult to handle; regression algorithms usually require assuming a linear relationship between variables, have high requirements for data quality, are sensitive to outliers, and noise and missing values in the data may affect the accurate prediction value; regression algorithms have strict assumptions about the model and limited interpretability of the model, and there may be overfitting or underfitting phenomena. Summary of the Invention
[0004] The embodiments described herein provide a method, device, equipment, and medium for predicting the demand for equipment spare parts, which solve the problems existing in the prior art.
[0005] In a first aspect, according to the content of the present disclosure, a method for predicting the demand for equipment spare parts is provided, including:
[0006] Obtaining first initial time series data of each equipment spare part in a first time series, where the first time series includes N first timestamps, one first initial time series data corresponds to one first timestamp, N is an integer greater than 1, and the first timestamp is a historical timestamp;
[0007] Determining initial predicted time series data of the equipment spare part in a second time series according to the first initial time series data of each equipment spare part in the first time series, where the second time series includes M second timestamps, one initial predicted time series data corresponds to one second timestamp, M is an integer greater than 1, M < N, and the second timestamp is a future timestamp;
[0008] According to the initial prediction time series data of the equipment spare parts in the second time series, the target prediction time series data of the equipment spare parts in the second time series is determined.
[0009] In some embodiments of the present disclosure, determining the initial predicted time series data of the equipment spare parts in the second time series according to the first initial time series data of each equipment spare part in the first time series includes:
[0010] According to the number of first timestamps included in the first time series and the set patch size, the first initial time series data is segmented to obtain second initial time series data of the first layer, wherein the first time series of the first layer includes N / n pseudo timestamps, one second initial time series data corresponds to one pseudo timestamp, and n is the patch size;
[0011] According to the second initial time series data of the first layer, the second initial time series data of the first layer are combined in pairs to obtain the second initial time series data of the second layer, wherein the first time series of the second layer includes N / (2*n) pseudo timestamps;
[0012] When the number of pseudo timestamps included in the first time series of the i-1th layer meets a preset threshold, combining the second initial time series data of the i-1th layer to obtain the second initial time series data of the i-th layer;
[0013] According to the second initial time series data of the i-th layer, the initial predicted time series data of the equipment spare parts in the second time series is determined.
[0014] In some embodiments of the present disclosure, when the number of pseudo timestamps included in the first time series of the i-1th layer meets a preset threshold, the method further includes:
[0015] Acquire the second initial time series data of the first layer, ... and the second initial time series data of the i-1th layer;
[0016] The determining, according to the second initial time series data of the i-th layer, the initial predicted time series data of the equipment spare parts in the second time series comprises:
[0017] The initial predicted time series data of the equipment spare parts in the second time series is determined based on the second initial time series data of the first layer, ..., the second initial time series data of the i-1th layer and the second initial time series data of the i-th layer.
[0018] In some embodiments of the present disclosure, determining the initial predicted time series data of the equipment spare parts in the second time series according to the second initial time series data of the first layer, ..., the second initial time series data of the i-1th layer, and the second initial time series data of the i-th layer includes:
[0019] Obtaining weight coefficients of the second initial time series data of the first layer, ..., the second initial time series data of the i-1th layer, and the second initial time series data of the i-th layer;
[0020] Determine, according to the second initial time series data of each layer, the sub-initial prediction time series data corresponding to different layers of the second time series of the equipment spare parts;
[0021] The initial prediction time series data of the equipment spare parts in the second time series are determined according to the weight coefficients of the second initial time series data of different layers and the sub-initial prediction time series data corresponding to different layers.
[0022] In some embodiments of the present disclosure, determining the target predicted time series data of the equipment spare parts in the second time series according to the initial predicted time series data of the equipment spare parts in the second time series includes:
[0023] Determining an average value of the initial predicted time series data according to the initial predicted time series data of the equipment spare parts in the second time series;
[0024] Based on the average value of the initial predicted time series data, the initial predicted time series data included in the second time series is standardized to obtain standardized predicted time series data;
[0025] According to the standardized prediction time series data, target prediction time series data of the equipment spare parts in the second time series is determined.
[0026] In some embodiments of the present disclosure, determining the target prediction time series data of the equipment spare parts in the second time series according to the standardized prediction time series data includes:
[0027] Determining a loss function value of an equipment spare parts demand forecasting model based on the standardized forecasting time series data;
[0028] When the loss function value of the equipment spare parts demand forecasting model satisfies a preset loss function value, target forecasting time series data of the equipment spare parts in the second time series is determined.
[0029] In some embodiments of the present disclosure, determining the loss function value of the equipment spare parts demand forecasting model according to the standardized forecast time series data includes:
[0030] Input the standardized predicted time series data into the equipment spare part demand prediction model to obtain the standardized initial predicted time series data of the equipment spare part demand prediction model;
[0031] Determine the loss function value of the equipment spare part demand prediction model according to the standardized predicted time series data and the standardized initial predicted time series data.
[0032] In a second aspect, according to the content of the present disclosure, an equipment spare part demand prediction device is provided, including:
[0033] A first initial time series data acquisition module, configured to acquire the first initial time series data of each equipment spare part in the first time series, where the first time series includes N first timestamps, one piece of the first initial time series data corresponds to one first timestamp, N is an integer greater than 1, and the first timestamp is a historical timestamp;
[0034] An initial predicted time series data determination module, configured to determine the initial predicted time series data of the equipment spare part in the second time series according to the first initial time series data of each equipment spare part in the first time series, where the second time series includes M second timestamps, one piece of the initial predicted time series data corresponds to one second timestamp, M is an integer greater than 1, M < N, and the second timestamp is a future timestamp;
[0035] A target predicted time series data determination module, configured to determine the target predicted time series data of the equipment spare part in the second time series according to the initial predicted time series data of the equipment spare part in the second time series.
[0036] In a third aspect, according to the content of the present disclosure, a computer device is provided, including:
[0037] One or more processors;
[0038] A storage device for storing one or more programs,
[0039] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the first aspects.
[0040] In a fourth aspect, according to the content of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the first aspects is implemented.
[0041] The equipment spare parts demand prediction method, device, equipment and medium provided by the embodiments of the present disclosure first obtain the first initial time series data of each equipment spare part in the first time series, then determine the initial predicted time series data of the equipment spare part in the second time series based on the first initial time series data of each equipment spare part in the first time series, and finally determine the target predicted time series data of the equipment spare part in the second time series based on the initial predicted time series data of the equipment spare part in the second time series. Since the first initial time series data is the time series data corresponding to the historical timestamp, the initial predicted time series data of the future timestamp can be predicted based on the first initial time series data corresponding to the historical timestamp, and finally the target predicted time series data is determined by standardizing the initial predicted time series data, so as to ensure the accuracy of the determined target predicted time series data results, and ensure that when the equipment needs maintenance or repair, the required equipment spare parts can be obtained in time, so as to avoid equipment downtime and production interruption caused by shortage of equipment spare parts, and improve industrial production efficiency.
[0042] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein:
[0044] Figure 1 It is a flow chart of a method for predicting equipment spare parts demand provided by an embodiment of the present disclosure;
[0045] Figure 2 It is a structural schematic diagram of an equipment spare parts demand prediction device provided by an embodiment of the present disclosure;
[0046] Figure 3 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.
[0047] In the drawings, reference numerals with the same last two digits correspond to the same elements. It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.
[0049] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by a person skilled in the art to which the subject matter of the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the specification and the relevant art, and will not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, a statement that two or more parts are "connected" or "coupled" together shall mean that the parts are joined together directly or through one or more intermediate components.
[0050] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiments" in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0051] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists, A and B exist at the same time, and B exists. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0052] Furthermore, in all embodiments of the present disclosure, terms such as “first” and “second” are used only to distinguish one component (or a part of a component) from another component (or another part of a component).
[0053] In the description of the present application, unless otherwise specified, "plurality" means more than two (including two), and similarly, "multiple groups" means more than two groups (including two).
[0054] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0055] Based on the problems existing in the prior art, the present disclosure provides a method for predicting equipment spare parts demand. Figure 1 is a flow chart of the equipment spare parts demand forecasting method provided by the embodiment of the present disclosure, such as Figure 1 As shown in the figure, the equipment spare parts demand forecasting method includes:
[0056] S110, obtaining first initial time series data of each equipment spare part in a first time series.
[0057] The first time series includes N first timestamps, one first initial time series data corresponds to one first timestamp, N is an integer greater than 1, and the first timestamp is a historical timestamp.
[0058] Equipment spare parts demand forecasting refers to forecasting the demand for a certain equipment spare parts in the future by analyzing and modeling relevant information such as historical data, equipment usage, failure rate, maintenance records, etc. The purpose of this forecast is to ensure that the required spare parts can be obtained in time when the equipment needs maintenance or repair, avoiding equipment downtime and production interruption due to spare parts shortage.
[0059] Specifically, the first time series consists of multiple consecutive historical timestamps. When the length of the first time series is H and the time interval between two adjacent first timestamps is m, the length of the first time series, the time interval between two adjacent first timestamps and the number of first timestamps satisfy: H = m*(N-1).
[0060] Specifically, in the equipment spare parts demand forecasting method provided by the embodiment of the present disclosure, the first initial time series data included in any first time series is represented by x, and x ti Represents the first initial time series data corresponding to the first timestamp ti, where if there is 1 equipment spare part, it includes 1 first initial time series data x; if there are n equipment spare parts, it includes n first initial time series data x, and any initial time series data x is a 1*N matrix.
[0061] The equipment spare parts demand prediction method provided by the embodiment of the present disclosure first obtains first initial time series data corresponding to multiple historical timestamps, and predicts time series data corresponding to multiple future timestamps based on the first initial time series data corresponding to the multiple historical timestamps.
[0062] In addition, in the embodiment of the present disclosure, the acquired first initial time series data of equipment spare parts in the first time series is the first initial time series data of different parts of the same equipment in the same time series.
[0063] S120: Determine initial predicted time series data of the equipment spare parts in the second time series based on the first initial time series data of each equipment spare part in the first time series.
[0064] Among them, the second time series includes M second timestamps, and an initial predicted time series data corresponds to one second timestamp. M is an integer greater than 1, M < N, and the second timestamp is a future timestamp.
[0065] Specifically, the second time series is composed of multiple consecutive future timestamps. When the length of the second time series is L and the time interval between two adjacent second timestamps is m, the length of the second time series, the time interval between two adjacent second timestamps, and the number of second timestamps satisfy: L = m * (M - 1). When the number of second timestamps included in the second time series is less than the number of first timestamps included in the first time series, the length L of the second time series is less than the length H of the first time series.
[0066] By setting the number of second timestamps included in the second time series to be less than the number of first timestamps included in the first time series, that is, determining the time series data corresponding to a relatively narrow time period from the time series data corresponding to a relatively wide time period, it can better ensure the accuracy of the target predicted time series data results of the equipment spare parts corresponding to each second timestamp in the determined future time period.
[0067] Specifically, in the equipment spare parts demand prediction method provided by the embodiments of the present disclosure, the initial predicted time series data included in any second time series is represented by y, and y tj represents the second initial time series data corresponding to the second timestamp tj. Among them, if there is 1 piece of equipment spare part, it includes 1 initial predicted time series data y. If there are n pieces of equipment spare parts, it includes n initial predicted time series data y. Any initial predicted time series data y is a 1 * M matrix.
[0068] After obtaining the first initial time series data of each equipment spare part in the first time series, first determine the initial predicted time series data in the second time series based on the first initial time series in the first time series.
[0069] In a specific implementation, based on the first initial time series data of each equipment spare part in the first time series, the initial predicted time series data of the equipment spare part in the second time series is determined, including: according to the number of first timestamps included in the first time series and the set patch size, the first initial time series data is segmented to obtain the second initial time series data of the first layer, wherein the first time series of the first layer includes N / n pseudo timestamps, one second initial time series data corresponds to one pseudo timestamp, and n is the patch size; according to the second initial time series data of the first layer, the second initial time series data of the first layer are combined in pairs to obtain the second initial time series data of the second layer, wherein the first time series of the second layer includes N / (2*n) pseudo timestamps; when the number of pseudo timestamps included in the first time series of the i-1th layer meets the preset threshold, the second initial time series data of the i-1th layer are combined to obtain the second initial time series data of the i-th layer; according to the second initial time series data of the i-th layer, the initial predicted time series data of the equipment spare part in the second time series is determined.
[0070] In a specific example, when there is one equipment spare part, the initial predicted time series data of the equipment spare part is determined based on the first initial time series data of the equipment spare part. Specifically, if the first time series includes 12 first timestamps, that is, the first time series includes 12 first initial time series data, which are x1, x2, ..., x 11 、x 12 , the patch size is 3, then the 12 first initial time series data are divided according to the patch size to form 4 first-layer second initial time series data, wherein the first second initial time series data includes x1, x2, x3 of the first initial time series data, the second second initial time series data includes x4, x5, x6 of the first initial time series data, the third second initial time series data includes x7, x8, x9 of the first initial time series data, and the fourth second initial time series data includes x1, x2, x3 of the first initial time series data. 10 、x 11 、x 12 , each second initial time series data of the first layer corresponds to a pseudo timestamp. Then, the second initial time series data of the second layer are obtained by combining the second initial time series data of the first layer in pairs, that is, x1, x2, x3, x4, x5, and x6 constitute the first second initial time series data of the second layer, and correspond to a pseudo timestamp, x7, x8, x9, and x10. 10 、x 11 、x 12The second initial time series data of the second layer is composed of a pseudo timestamp. Then, the second initial time series data of the third layer are obtained by combining the second initial time series data of the second layer in pairs, that is, x1, x2, x3, x4, x5, x6, x7, x8, x9, x 10 、x 11 、x 12 A second initial time series data of the third layer is formed and corresponds to a pseudo timestamp. Finally, the second initial time series of the third layer is used as a prediction set to determine the initial prediction time series data of the equipment spare parts in the second time series.
[0071] By introducing the concept of learnable pseudo-timestamps, the pseudo-timestamps act as data placers where all timestamps in a patch can write useful information and then pass it to the next layer. This study chooses to use an attention mechanism to update pseudo-timestamps, where pseudo-timestamps act as queries in self-attention. Pseudo-timestamps query all "real" timestamps in a patch, so only one attention score needs to be calculated for each real timestamp, thereby improving linear complexity and ensuring the accuracy of the initial prediction time series data results of the determined equipment spare parts in the second time series.
[0072] As a preferred implementation, when the number of pseudo timestamps included in the first time series of the i-1 layer meets a preset threshold, it also includes: obtaining the second initial time series data of the first layer,... and the second initial time series data of the i-1 layer; determining the initial predicted time series data of the equipment spare parts in the second time series based on the second initial time series data of the first layer,..., the second initial time series data of the i-1 layer and the second initial time series data of the i layer.
[0073] In a specific implementation, the initial predicted time series data of equipment spare parts in the second time series is determined based on the second initial time series data of the 1st layer, ..., the second initial time series data of the i-1th layer, and the second initial time series data of the i-th layer, including: obtaining weight coefficients of the second initial time series data of the 1st layer, ..., the second initial time series data of the i-1th layer, and the second initial time series data of the i-th layer; determining sub-initial predicted time series data corresponding to different layers of the equipment spare parts in the second time series based on the second initial time series data of each layer; determining the initial predicted time series data of equipment spare parts in the second time series based on the weight coefficients of the second initial time series data of different layers and the sub-initial predicted time series data corresponding to different layers.
[0074] Specifically, if the weight coefficient of the second initial time series data of the first layer is a1, the weight coefficient of the second initial time series data of the i-1th layer is ai-1 , the weight coefficient of the second initial time series data of the i-th layer is a i , the sub-initial prediction time series data determined according to the second initial time series data corresponding to the first layer is Y1, the sub-initial prediction time series data determined according to the second initial time series data corresponding to the second layer is Y2, ..., the sub-initial prediction time series data determined according to the second initial time series data corresponding to the i-th layer is Yi, then the initial prediction time series data of the equipment spare parts in the second time series finally determined satisfies: y=(a1*Y1+...+a i *Yi) / i.
[0075] y, Y1, Y2, ..Yi are all 1*M matrices.
[0076] By introducing the second initial time series data corresponding to each layer of pseudo timestamp as the input of the prediction model, the complexity of the data input to the prediction model is increased, thereby ensuring the accuracy of the initial prediction time series data of the equipment spare parts in the second time series based on the first initial time series data of each equipment spare part in the first time series.
[0077] S130. Determine target prediction time series data of equipment spare parts in the second time series according to initial prediction time series data of equipment spare parts in the second time series.
[0078] As a specific implementable method, target prediction time series data of equipment spare parts in the second time series is determined based on initial prediction time series data of equipment spare parts in the second time series, including: determining the average value of the initial prediction time series data based on the initial prediction time series data of the equipment spare parts in the second time series; standardizing the initial prediction time series data included in the second time series based on the average value of the initial prediction time series data to obtain standardized prediction time series data; determining the target prediction time series data of the equipment spare parts in the second time series based on the standardized prediction time series data and the initial prediction time series data.
[0079] Specifically, if the initial prediction time series data of a type of equipment spare parts is y, and the initial prediction time series data includes y1, y2, ..., ym, then firstly calculate the average value of the initial prediction time series data in the second time series Then, the initial forecast time series data is standardized by the average value of the initial forecast time series data to obtain the standardized forecast time series data, that is, the standardized forecast time series data satisfies:
[0080] In a specific implementation, after obtaining the standardized prediction time series data, the standardized prediction time series data is input into the equipment spare parts demand prediction model, and the standardized initial prediction time series data of the equipment spare parts demand prediction model is obtained; according to the standardized prediction time series data and the standardized initial prediction time series data, the loss function value of the equipment spare parts demand prediction model is determined. When the loss function value of the equipment spare parts demand prediction model meets the preset loss function value, the obtained standardized initial prediction time series data is the target prediction time series data of the equipment spare parts in the second time series.
[0081] Exemplarily, after the standardized forecast time series data y' is input into the equipment spare parts demand forecasting model, the standardized initial forecast time series data output by the equipment spare parts demand forecasting model satisfies y out At this time, the loss function value of the equipment spare parts demand forecasting model is obtained based on the standardized forecast time series data and the standardized initial forecast time series data:
[0082]
[0083] Where ξ=y out -y', α, c are the parameters of the equipment spare parts demand forecasting model.
[0084] It should be noted that, in the above embodiment, the equipment spare parts demand prediction model adopts the Scaleformer algorithm.
[0085] It should be noted that, in the above embodiment, the initial prediction time series data of the equipment spare parts in the second time series is determined based on the Triformer algorithm according to the first initial time series data of each equipment spare part in the first time series, and the target prediction time series data of the equipment spare parts in the second time series is determined based on the Scaleformer algorithm according to the initial prediction time series data of the equipment spare parts in the second time series, that is, the target prediction time series data of the equipment spare parts is determined by the Tri-Scaleformer algorithm which combines the Triformer algorithm and the Scaleformer algorithm.
[0086] The equipment spare part demand prediction method provided by the embodiments of the present disclosure first obtains the first initial time series data of each equipment spare part in the first time series, then determines the initial predicted time series data of the equipment spare part in the second time series according to the first initial time series data of each equipment spare part in the first time series, and finally determines the target predicted time series data of the equipment spare part in the second time series according to the initial predicted time series data of the equipment spare part in the second time series. Since the first initial time series data is the time series data corresponding to the historical time stamps, it is possible to predict the initial predicted time series data of the future time stamps based on the first initial time series data corresponding to the historical time stamps. Finally, by performing a normalization process on the initial predicted time series data, the target predicted time series data is determined, ensuring the accuracy of the determined target predicted time series data result, ensuring that when the equipment needs maintenance or repair, the required equipment spare parts can be obtained in a timely manner, avoiding equipment downtime and production interruption caused by shortages of equipment spare parts, and improving industrial production efficiency.
[0087] Based on the above embodiments, the embodiments of the present disclosure further provide an equipment spare part demand prediction device. Figure 2 It is a schematic structural diagram of the equipment spare part demand prediction device provided by the embodiments of the present disclosure. As Figure 2 shown, the equipment spare part demand prediction device includes:
[0088] A first initial time series data acquisition module 210, configured to acquire the first initial time series data of each equipment spare part in the first time series, where the first time series includes N first time stamps, one first initial time series data corresponds to one first time stamp, N is an integer greater than 1, and the first time stamp is a historical time stamp;
[0089] An initial predicted time series data determination module 220, configured to determine the initial predicted time series data of the equipment spare part in the second time series according to the first initial time series data of each equipment spare part in the first time series, where the second time series includes M second time stamps, one initial predicted time series data corresponds to one second time stamp, M is an integer greater than 1, M < N, and the second time stamp is a future time stamp;
[0090] A target predicted time series data determination module 230, configured to determine the target predicted time series data of the equipment spare part in the second time series according to the initial predicted time series data of the equipment spare part in the second time series.
[0091] The equipment spare parts demand prediction device provided by the embodiment of the present disclosure first obtains the first initial time series data of each equipment spare part in the first time series, then determines the initial prediction time series data of the equipment spare part in the second time series based on the first initial time series data of each equipment spare part in the first time series, and finally determines the target prediction time series data of the equipment spare part in the second time series based on the initial prediction time series data of the equipment spare part in the second time series. Since the first initial time series data is the time series data corresponding to the historical timestamp, the initial prediction time series data of the future timestamp can be predicted based on the first initial time series data corresponding to the historical timestamp, and finally the target prediction time series data is determined by standardizing the initial prediction time series data, so as to ensure the accuracy of the determined target prediction time series data results, ensure that when the equipment needs maintenance or repair, the required equipment spare parts can be obtained in time, avoid equipment downtime and production interruption caused by shortage of equipment spare parts, and improve industrial production efficiency.
[0092] In a specific implementation, determining the initial predicted time series data of the equipment spare parts in the second time series according to the first initial time series data of each equipment spare part in the first time series includes:
[0093] According to the number of first timestamps included in the first time series and the set patch size, the first initial time series data is segmented to obtain the second initial time series data of the first layer, wherein the first time series of the first layer includes N / n pseudo timestamps, one second initial time series data corresponds to one pseudo timestamp, and n is the patch size;
[0094] According to the second initial time series data of the first layer, the second initial time series data of the first layer are combined in pairs to obtain the second initial time series data of the second layer, wherein the first time series of the second layer includes N / (2*n) pseudo timestamps;
[0095] When the number of pseudo time stamps included in the first time series of the i-1th layer meets a preset threshold, the second initial time series data of the i-1th layer is combined to obtain the second initial time series data of the i-th layer;
[0096] According to the second initial time series data of the i-th layer, initial predicted time series data of equipment spare parts in the second time series is determined.
[0097] In a specific implementation, when the number of pseudo timestamps included in the first time series of the i-1th layer meets a preset threshold, the method further includes:
[0098] Obtain the second initial time series data of the 1st layer, ... and the second initial time series data of the i-1th layer;
[0099] Determining the initial predicted time series data of equipment spare parts in the second time series according to the second initial time series data of the i-th layer includes:
[0100] According to the second initial time series data of the 1st layer, ..., the second initial time series data of the i-1th layer and the second initial time series data of the i-th layer, initial predicted time series data of equipment spare parts in the second time series are determined.
[0101] In a specific implementation, determining the initial predicted time series data of equipment spare parts in the second time series according to the second initial time series data of the first layer, ..., the second initial time series data of the i-1th layer, and the second initial time series data of the i-th layer includes:
[0102] Obtaining weight coefficients of the second initial time series data of the 1st layer, ..., the second initial time series data of the i-1th layer, and the second initial time series data of the i-th layer;
[0103] Determine the sub-initial prediction time series data corresponding to different layers of the second time series for equipment spare parts according to the second initial time series data of each layer;
[0104] The initial prediction time series data of the equipment spare parts in the second time series is determined according to the weight coefficients of the second initial time series data of different layers and the sub-initial prediction time series data corresponding to different layers.
[0105] In a specific implementation, determining target predicted time series data of equipment spare parts in the second time series according to initial predicted time series data of equipment spare parts in the second time series includes:
[0106] Determining an average value of the initial prediction time series data according to the initial prediction time series data of the equipment spare parts in the second time series;
[0107] Based on the average value of the initial predicted time series data, the initial predicted time series data included in the second time series is standardized to obtain standardized predicted time series data;
[0108] According to the standardized forecast time series data, target forecast time series data of equipment spare parts in the second time series is determined.
[0109] In a specific implementation, determining target forecast time series data of equipment spare parts in the second time series according to the standardized forecast time series data includes:
[0110] Determine the loss function value of the equipment spare parts demand forecasting model based on the standardized forecasting time series data;
[0111] When the loss function value of the equipment spare parts demand forecasting model satisfies a preset loss function value, target forecasting time series data of the equipment spare parts in the second time series is determined.
[0112] In a specific implementation, determining the loss function value of the equipment spare parts demand forecasting model according to the standardized forecast time series data includes:
[0113] Inputting the standardized forecast time series data into the equipment spare parts demand forecasting model to obtain the standardized initial forecast time series data of the equipment spare parts demand forecasting model;
[0114] The loss function value of the equipment spare parts demand forecasting model is determined based on the standardized forecast time series data and the standardized initial forecast time series data.
[0115] The present application also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.
[0116] The computer device includes a memory 510 and a processor 520 that are connected to each other through a system bus. It should be noted that the figure only shows a computer device with components 510-520, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0117] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.
[0118] The memory 510 includes at least one type of readable storage medium, and the readable storage medium includes a non-volatile memory or a volatile memory, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc., and the RAM may include a static RAM or a dynamic RAM. In some embodiments, the memory 510 may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 510 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash card (Flash Card), etc., equipped on the computer device. Of course, the memory 510 may also include both an internal storage unit of the computer device and an external storage device thereof. In this embodiment, the memory 510 is generally used to store an operating system and various application software installed on the computer device, such as the program code of the above method, etc. In addition, the memory 510 may also be used to temporarily store various data that have been output or are to be output.
[0119] The processor 520 is generally used to perform the overall operation of the computer device. In this embodiment, the memory 510 is used to store program codes or instructions, the program code includes computer operation instructions, and the processor 520 is used to execute the program codes or instructions stored in the memory 510 or process data, such as running the program code of the above method.
[0120] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0121] Another embodiment of the present application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads a computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or a combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or a combination of blocks in the block diagram.
[0122] Computer-readable media include but are not limited to electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing, the memory is used to store program codes or instructions, the program codes include computer operating instructions, and the processor is used to execute the program codes or instructions of the above methods stored in the memory.
[0123] For the definitions of memory and processor, please refer to the description of the aforementioned computer device embodiment and will not be repeated here.
[0124] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0125] Each functional unit or module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0127] Unless the context clearly indicates otherwise, the singular form of the words used herein and in the appended claims includes the plural and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the words "comprise" and "include" are to be interpreted as inclusive rather than exclusive. Likewise, the terms "include" and "or" should be interpreted as inclusive unless such interpretation is expressly prohibited herein. Where the term "example" is used herein, particularly when it is located after a group of terms, the "example" is merely exemplary and illustrative and should not be considered exclusive or comprehensive.
[0128] Further aspects and scopes of adaptability become apparent from the description provided herein. It should be understood that various aspects of the present application can be implemented individually or in combination with one or more other aspects. It should also be understood that the description and specific embodiments herein are intended for purposes of illustration only and are not intended to limit the scope of the present application.
[0129] Several embodiments of the present disclosure are described in detail above, but it is obvious that those skilled in the art can make various modifications and variations to the embodiments of the present disclosure without departing from the spirit and scope of the present disclosure. The protection scope of the present disclosure is defined by the attached claims.
Claims
1. A method for predicting equipment spare parts demand, characterized in that: Including: Obtain first initial time series data of each equipment spare part in a first time series, where the first time series includes N first timestamps, one piece of the first initial time series data corresponds to one first timestamp, N is an integer greater than 1, and the first timestamp is a historical timestamp; Determine initial predicted time series data of the equipment spare part in a second time series according to the first initial time series data of each equipment spare part in the first time series, where the second time series includes M second timestamps, one piece of the initial predicted time series data corresponds to one second timestamp, M is an integer greater than 1, M < N, and the second timestamp is a future timestamp; Determine target predicted time series data of the equipment spare part in the second time series according to the initial predicted time series data of the equipment spare part in the second time series.
2. The method according to claim 1, characterized in that The determining the initial predicted time series data of the equipment spare part in the second time series according to the first initial time series data of each equipment spare part in the first time series includes: Segment the first initial time series data according to the number of first timestamps included in the first time series and a set patch size to obtain second initial time series data of a first layer, where the first time series of the first layer includes N / n pseudo-timestamps, and one piece of the second initial time series data corresponds to one pseudo-timestamp, and n is the patch size; Combine the second initial time series data of the first layer in pairs according to the second initial time series data of the first layer to obtain second initial time series data of a second layer, where the first time series of the second layer includes N / (2*n) pseudo-timestamps; When the number of pseudo-timestamps included in the first time series of the (i - 1)-th layer meets a preset threshold, combine the second initial time series data of the (i - 1)-th layer to obtain second initial time series data of the i-th layer; Determine the initial predicted time series data of the equipment spare part in the second time series according to the second initial time series data of the i-th layer.
3. The method according to claim 2, characterized in that When the number of pseudo-timestamps included in the first time series of the (i - 1)-th layer meets a preset threshold, it further includes: Obtain the second initial time series data of the first layer, …, and the second initial time series data of the (i - 1)-th layer; The determining the initial predicted time series data of the equipment spare part in the second time series according to the second initial time series data of the i-th layer includes: Determine the initial predicted time series data of the equipment spare part in the second time series according to the second initial time series data of the first layer, …, the second initial time series data of the (i - 1)-th layer, and the second initial time series data of the i-th layer.
4. The method according to claim 3, characterized in that The determining the initial predicted time series data of the equipment spare part in the second time series according to the second initial time series data of the first layer, …, the second initial time series data of the (i - 1)-th layer, and the second initial time series data of the i-th layer includes: Obtain the weight coefficients of the second initial time series data of the first layer, …, the second initial time series data of the (i - 1)-th layer, and the second initial time series data of the i-th layer; Determine the sub-initial prediction time series data corresponding to different layers of the equipment spare parts in the second time series according to the second initial time series data of each layer; Determine the initial prediction time series data of the equipment spare parts in the second time series according to the weight coefficients of the second initial time series data of different layers and the sub-initial prediction time series data corresponding to different layers.
5. The method according to claim 1, characterized in that The determining the target prediction time series data of the equipment spare parts in the second time series according to the initial prediction time series data of the equipment spare parts in the second time series includes: Determine the average value of the initial prediction time series data according to the initial prediction time series data of the equipment spare parts in the second time series; Based on the average value of the initial prediction time series data, standardize the initial prediction time series data included in the second time series to obtain the standardized prediction time series data; Determine the target prediction time series data of the equipment spare parts in the second time series according to the standardized prediction time series data.
6. The method according to claim 5, characterized in that The determining the target prediction time series data of the equipment spare parts in the second time series according to the standardized prediction time series data includes: Determine the loss function value of the equipment spare parts demand prediction model according to the standardized prediction time series data; When the loss function value of the equipment spare parts demand prediction model meets the preset loss function value, determine the target prediction time series data of the equipment spare parts in the second time series.
7. The method according to claim 6, characterized in that The determining the loss function value of the equipment spare parts demand prediction model according to the standardized prediction time series data includes: Input the standardized prediction time series data into the equipment spare parts demand prediction model to obtain the standardized initial prediction time series data of the equipment spare parts demand prediction model; Determine the loss function value of the equipment spare parts demand prediction model according to the standardized prediction time series data and the standardized initial prediction time series data.
8. A device for predicting equipment spare parts demand, characterized in that: including: The first initial time series data acquisition module is used to acquire the first initial time series data of each equipment spare part in the first time series, where the first time series includes N first timestamps, one first initial time series data corresponds to one first timestamp, N is an integer greater than 1, and the first timestamp is a historical timestamp; The initial prediction time series data determination module is used to determine the initial prediction time series data of the equipment spare parts in the second time series according to the first initial time series data of each equipment spare part in the first time series, where the second time series includes M second timestamps, one initial prediction time series data corresponds to one second timestamp, M is an integer greater than 1, M < N, and the second timestamp is a future timestamp; The target prediction time series data determination module is used to determine the target prediction time series data of the equipment spare parts in the second time series according to the initial prediction time series data of the equipment spare parts in the second time series.
9. A computer device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data prediction method and device and storage medium
CN113656691A
Time sequence prediction method, electronic equipment and computer storage medium
CN113850427A
Electric power data flow prediction method and device based on neural network, equipment and medium
CN116011651A
Time sequence prediction method and device and storage medium
CN117010541A