A method and apparatus for augmenting food supply chain hazard content data

By using a data augmentation method based on weighted average and DTW distance, the problems of temporal disruption and outlier sensitivity in hazardous substance content data augmentation in the food supply chain are solved, thereby improving the effectiveness of data augmentation and the accuracy of model prediction.

CN115392452BActive Publication Date: 2026-03-27BEIJING TECH & BUSINESS UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing methods for augmenting hazardous substance content data in the food supply chain suffer from problems such as disrupting temporal relationships, overfitting, and sensitivity to outliers, making it difficult to meet the data requirements of deep learning models.

Method used

A weighted average method is adopted, which involves randomly selecting data sequences and calculating weight values, using DTW distance to measure similarity, and performing weighted average and iterative expansion of the data sequences to avoid the influence of outliers.

Benefits of technology

It effectively expands the data on hazardous substance content in the food supply chain, improves the prediction accuracy of deep learning models, avoids overfitting, ensures data trends and similarities, and is suitable for conditions with small amounts of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115392452B_ABST
    Figure CN115392452B_ABST
Patent Text Reader

Abstract

The application provides a data expansion method and device, the method comprises the following steps: obtaining N groups of real source data, each group of real source data contains a data sequence; dividing the data sequences in the N groups of real source data into a plurality of sequence combinations, each sequence combination is a calculation group; performing weighted calculation on each calculation group according to the sequence number requirement of weighted average calculation, to obtain the weight value allocated to each calculation group; performing weighted average on the data sequences in each calculation group according to the weight value allocated to each calculation group, to obtain the data expansion sequence of each calculation group. In the data expansion method, the calculation results of all calculation groups are not all considered all data sequences, therefore, in the case that some part of data sequences are abnormal, more calculation results are not affected because they do not involve abnormal data sequences, which greatly avoids the influence of abnormal sequences in small data on the final data expansion sequence.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data training detection, and in particular to a method and device for expanding food supply chain hazard content data. BACKGROUND

[0002] Food safety is related to the national economy and people's livelihood, and the monitoring and control of hazard content (heavy metals, mycotoxins, etc.) in the food supply chain has been paid more and more attention. The measurement cost of hazard content in food is relatively high, and it takes a long time, so it is difficult to obtain enough hazard content measurement data. Previously, due to less data, the fitting of hazard change trend generally adopts linear regression fitting method, but the modeling ability of this method is limited, and it is difficult to study the fluctuation of complex supply chain hazard content data. With the development of deep learning technology, deep learning models such as gated recurrent unit (GRU) with stronger fitting ability are widely used in data modeling and prediction. However, this deep learning model needs more data for training, which puts higher requirements on the expansion method of food supply chain hazard content data.

[0003] Among the existing research results and technical methods, the expansion methods for time series data include geometric transformation, sampling, generative model and weighted average method. The geometric transformation method destroys the internal time sequence relationship of the source data due to the cutting and scaling of the data. The sampling method has the phenomenon of repeatedly repeating the source data, which is easy to cause the problem of overfitting of the prediction model. The generative model method generates new data based on the accurate fitting of the model to the source data, which requires a relatively large amount of source data, so it is not suitable for food data. The weighted average method selects the most similar sequence based on the dynamic time warping (DTW) distance and performs weighted average, and the commonly used is the DTW barycentric averaging (DBA) technology based on weighted form, which maximizes the similarity between the expanded data and the source data. But this method is easily affected by sequence outliers and the expansion process is relatively cumbersome. SUMMARY

[0004] To solve one of the above technical problems, the present application provides an expansion method and device for food supply chain hazard content data.

[0005] The first aspect of the embodiment of the present application provides an expansion method for food supply chain hazard content data, the method comprising:

[0006] Obtain N groups of hazard content real source data, each group of hazard content real source data containing a data sequence;

[0007] dividing the data sequences in the N groups of hazard content real source data into a plurality of sequence combinations, each sequence combination being a calculation group;

[0008] performing weighted calculation on each calculation group according to the weighted average calculation sequence quantity requirement, to obtain a weight value assigned to each calculation group;

[0009] performing weighted average on the data sequences in each calculation group according to the weight value assigned to each calculation group, to obtain a data expansion sequence of each calculation group.

[0010] Preferably, the process of dividing the data sequences in the N groups of hazard content real source data into a plurality of sequence combinations comprises:

[0011] randomly selecting two data sequence combinations in the N groups of hazard content real source data as one sequence combination ;

[0012] randomly selecting two data sequence combinations in the N groups of hazard content real source data as one sequence combination ;

[0013] until all data sequence combinations in the N groups of hazard content real source data are combined as one sequence combination , thereby dividing the data sequences in the N groups of hazard content real source data into N-1 sequence combinations , , .

[0014] Preferably, the process of performing weighted calculation on each calculation group according to the weighted average calculation sequence quantity requirement, to obtain a weight value assigned to each calculation group comprises:

[0015] for any calculation group containing at least M (M>3) data sequences, randomly selecting an initial data sequence in the calculation group and assigning a random weight to the initial data sequence according to the weighted average calculation sequence quantity requirement;

[0016] in the calculation group where the initial data sequence is located, obtaining two data sequences closest to the initial data sequence through DTW distance, and assigning the same weight to the two data sequences according to the random weight;

[0017] the remaining (M-3) data sequences are assigned the remaining weights equally.

[0018] Preferably, the process of performing weighted calculation on each calculation group according to the weighted average calculation sequence quantity requirement, to obtain a weight value assigned to each calculation group comprises:

[0019] According to a weighted average calculation sequence number requirement, for any one calculation group containing at least M (M<4) data sequences, the data sequences in the calculation group are subjected to mean value calculation;

[0020] The mean value of the mean value calculation is multiplied by a random scaling factor.

[0021] Preferably, the method further comprises:

[0022] The data expansion sequences of all calculation groups are summarized to obtain an expansion sequence of one iteration;

[0023] If the iteration number of the expansion sequence does not reach a preset number, the data expansion sequence of each calculation group is repeatedly obtained until the iteration number of the expansion sequence reaches the preset number.

[0024] The second aspect of the embodiment of the application provides an expansion device for food supply chain hazard content data, the device comprising a processor, the processor being configured with processor-executable operation instructions to perform the following operations:

[0025] N groups of hazard content real source data are obtained, each group of hazard content real source data containing one data sequence;

[0026] The data sequences in the N groups of hazard content real source data are divided into a plurality of sequence combinations, each sequence combination being a calculation group;

[0027] According to a weighted average calculation sequence number requirement, each calculation group is subjected to weighted calculation to obtain a weight value allocated to each calculation group;

[0028] According to the weight value allocated to each calculation group, the data sequences in each calculation group are subjected to weighted average calculation to obtain a data expansion sequence of each calculation group.

[0029] Preferably, the processor is configured with processor-executable operation instructions to perform the following operations:

[0030] Two data sequences in the N groups of hazard content real source data are randomly selected to form a sequence combination ;

[0031] Two data sequences in the N groups of hazard content real source data are randomly selected to form a sequence combination ;

[0032] Until all data sequences in the N groups of hazard content real source data are combined into a sequence combination , so that the data sequences in the N groups of hazard content real source data are divided into N-1 sequence combinations , 、 .

[0033] Preferably, the processor is configured with processor-executable operation instructions to perform the following operations:

[0034] According to the weighted average calculation sequence quantity requirement, for any one calculation group containing at least M (M>3) data sequences, an initial data sequence is randomly selected in the calculation group, and a random weight is assigned to the initial data sequence;

[0035] In the calculation group where the initial data sequence is located, two data sequences closest to the initial data sequence are obtained through DTW distance, and the two data sequences are respectively assigned with the same weight according to the random weight;

[0036] The remaining (M-3) data sequences are evenly distributed with the remaining weights.

[0037] Preferably, the processor is configured with processor-executable operation instructions to perform the following operations:

[0038] According to the weighted average calculation sequence quantity requirement, for any one calculation group containing at least M (M<4) data sequences, the data sequences in the calculation group are subjected to mean value calculation;

[0039] The mean value of the mean value calculation is multiplied by a random scaling coefficient.

[0040] Preferably, the processor is configured with processor-executable operation instructions to perform the following operations:

[0041] The data expansion sequences of all calculation groups are summarized to obtain an iteration of expansion sequences;

[0042] If the iteration number of the expansion sequences does not reach a preset number, the data expansion sequences of each calculation group are repeatedly obtained until the iteration number of the expansion sequences reaches the preset number.

[0043] The beneficial effects of the present application are as follows: in the expansion method for food supply chain hazard content data proposed in the present application, the calculation results of all calculation groups are not all considered all data sequences, so in the case that there is an abnormal sequence in a part of data sequences, more calculation results are not affected because they do not involve abnormal data sequences, thereby greatly avoiding the influence of abnormal sequences in small data on the final data expansion sequence. BRIEF DESCRIPTION OF DRAWINGS

[0044] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0045] Figure 1 Flow chart of the method for expanding food supply chain hazard content data according to Embodiment 1 of the application;

[0046] Figure 2 GRU network structure diagram in Example 1;

[0047] Figure 3 Simplified schematic diagram of a wheat flour supply chain in Example 1;

[0048] Figure 4 Schematic diagram of cadmium content in a wheat flour supply chain in Example 1;

[0049] Figure 5 Comparison schematic diagram of prediction results based on different data augmentation multiples in Example 1;

[0050] Figure 6 Simplified schematic diagram of a rice supply chain in Example 2. DETAILED DESCRIPTION

[0051] In order to make the technical solutions and advantages of the embodiments of the application clearer, the following further describes exemplary embodiments of the application with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the application, not all of the embodiments. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other without conflict. EMBODIMENT

[0052] As shown in the accompanying drawings, Figure 1 the present embodiment proposes a method for expanding food supply chain hazard content data, which comprises:

[0053] S101, obtaining N groups of hazard content real source data, and dividing data sequences in the N groups of hazard content real source data into a plurality of sequence combinations, each sequence combination being a calculation group.

[0054] Specifically, in the present embodiment, each group of hazard content real source data contains a data sequence. In the present embodiment, the data sequences in the N groups of hazard content real source data are divided into any two sequence combinations, any three sequence combinations, …, sequence combinations of all N groups of hazard content real source data. Specifically,

[0055] two data sequences in the N groups of hazard content real source data are randomly selected as a sequence combination ;

[0056] Two data sequences are randomly selected from the N sets of real source data on hazardous substance content and combined into one sequence combination. ;

[0057] Until all the data sequences of the N sets of real source data on the content of hazardous substances are combined into a single sequence combination. This divides the data sequences in the N sets of real source data on hazardous substance content into N-1 sequence combinations. , , .

[0058] In this embodiment, the grouping principle is as follows: randomly select groups that meet the required quantity from N groups of real source data on hazardous substance content. k The data is divided into groups, ensuring that these calculated groups are non-repeating. Therefore, in this embodiment, the N groups of real source data on hazardous substance content can be divided into... , , Each calculation group is unique.

[0059] S102. Based on the required number of sequences for weighted average calculation, perform weighted calculation on each calculation group to obtain the weight value assigned to each calculation group.

[0060] Specifically, based on the requirement for the number of sequences in a weighted average calculation, weighted average calculation cannot be performed on calculation groups containing two or three data sequences because the number of sequences does not meet the minimum requirement. This embodiment can calculate the mean for calculation groups containing two or three data sequences, and then multiply the mean by a random scaling factor.

[0061] For computational groups containing four or more data sequences, an initial data sequence is first randomly selected from the computational group, and this initial data sequence is assigned a random weight. x The initial data sequences in different computational groups all have different random weights, and all fall within a preset range. Then, using the DTW distance, the two data sequences closest to the initial data sequence within the same computational group are obtained, and these two sequences are assigned the same weight. This weight is a random weight. x Part of it. Finally, the remaining data sequences in the computational group containing the initial data sequence are evenly distributed among the remaining weights in the random weights.

[0062] In this embodiment, the DTW distance, as a metric for similarity between sequences, can be combined with the idea of ​​dynamic programming to achieve similarity between two data sequences. Q and P Calculation of the minimum distance between them.

[0063] Suppose two sequences Q , P are and , the distance between elements and in the sequence is calculated as:

[0064] The distance between all corresponding elements of the two sequences forms a distance matrix m * n , M , M which can be represented as:

[0065] Starting from the element d (1,1), select one of the three elements above, to the right, and above-right of the starting element, and take this element as the basis to select one of the three elements above, to the right, and above-right of it, and so on, until the element d ( m, n ) is reached. These selected elements form a path Q , P between the two sequences R , which can be represented as , N where r is the total number of elements in the path, and is the coordinates of the points on the path. There are many such paths R , but there must be an optimal path in the path space R that minimizes , so the DTW distance between the two sequences Q and P is: where is the path distance between each corresponding value, and represents the number of sequence data. To find the minimum value, a dynamic programming method is used to calculate the cumulative distance matrix d , D which is:

[0066] where , . The last element D ( m , n ) of the matrix D is the final DTW distance, i.e.:

[0067] The steps of generating random weight and random scaling factor are: first, a random number is generated by using linear congruential method, then the number is scaled to 0-1, and finally it is judged whether the number is repeated with the previous value, if not repeated, it can be used as the weight or coefficient at this time.

[0068]

[0069] wherein, and represent the generated first and second random numbers, b , c , m are three set constants, which are set as 3, 103246584931, 1032465874932, respectively, and mod is the remainder. In order to generate random numbers iteratively, the value at the current time is generally taken as a (0), for example, "February 14, 2022, 12:38:42", then a (0) is taken as 20220214123842, and then the calculation result is combined into a random number sequence: 880868210401 …… by iterative calculation. Then, the first to the bit of the random number sequence: 8808, 8086, 0868, 8682 …… is taken in turn. Secondly, the value is scaled to 0-1: 0.8808, 0.8086, 0.0868, 0.8682 …… Finally, it is judged whether the value is repeated with the previous value by a judgment mechanism, and finally the non-repeated value is taken as the random weight and coefficient.

[0070] S103, according to the weight value allocated to each calculation group, the data sequence in each calculation group is weighted and averaged to obtain the data expansion sequence of each calculation group.

[0071] Specifically, after obtaining the weight value allocated to each calculation group, all data sequences in each calculation group are weighted and averaged according to the allocated weight value to obtain the data expansion sequence of each calculation group. These data expansion sequences maximize the trend and similarity of all data sequences in the real source data group of the hazardous substance content, and fill the value domain blank of the data sequence in the real source data group of the hazardous substance content.

[0072] The augmented sequence of one iteration is obtained by aggregating all the data augmentation sequences of the calculation groups. If the iteration number of the augmented sequence does not reach the preset number, the data augmentation sequence of each calculation group is repeatedly obtained until the iteration number of the augmented sequence reaches the preset number. Through multiple iterations, a sufficient number of augmented sequences can be obtained for modeling and training of the deep learning model. Embodiments

[0073] Corresponding to Embodiment 1, this embodiment proposes an augmentation device for food supply chain hazard content data, which comprises a processor configured with processor-executable operation instructions to perform the following operations:

[0074] N groups of hazard content real source data are obtained, each group of hazard content real source data containing a data sequence;

[0075] The data sequences in the N groups of hazard content real source data are divided into a plurality of sequence combinations, each sequence combination being a calculation group;

[0076] According to the weighted average calculation sequence number requirement, the weight value allocated to each calculation group is obtained by weighted calculation of each calculation group;

[0077] According to the weight value allocated to each calculation group, the data sequence in each calculation group is weighted and averaged to obtain the data augmentation sequence of each calculation group.

[0078] Since the embodiments of the data augmentation device correspond to the embodiments of the method for augmenting food supply chain hazard content data, the embodiments of the data augmentation device are described in the description of the embodiments of the method for augmenting food supply chain hazard content data, which will not be repeated here.

[0079] The practical application process of the method for augmenting food supply chain hazard content data proposed by the present application is further described below through two specific examples.

[0080] Example 1

[0081] The augmented data component prediction model obtained by the method for augmenting food supply chain hazard content data proposed by the present application is composed of a GRU. GRU has good effect in time series prediction task, and a large number of studies have used GRU as prediction model and proved its performance. There are only two gates in the GRU model, namely update gate and reset gate. The update gate controls the degree of state information at the previous moment brought into the current state. The greater the value of this gate, the more information at the previous moment is brought in. The reset gate is used to control the degree of forgetting of the previous state, and the greater the data, the less it is ignored. The Figure 2The GRU network structure diagram.

[0082] The first six links of the wheat flour supply chain The last five links of the hazard content prediction Hazard content data, such as Figure 3 The prediction effect of the source data is compared with the data expanded by 10 times, 20 times, 50 times, 100 times, 200 times, 500 times and 1000 times, respectively. The control network layer and other variables are consistent, and the data is divided into 70% training data and 30% validation data. Three evaluation indexes are used to evaluate the prediction accuracy of the model. They are: correlation coefficient (R 2 ), root mean square error (RMSE) and average absolute error (MAE). Among them, R 2 represents the similarity between the predicted value and the actual value given by the model, and the closer the value is to 1, the closer the predicted value is to the actual value; RMSE and MAE are two calculation methods to measure the average error amplitude between the fatigue life prediction value and the actual value given by the model, and the smaller the value, the smaller the error amplitude between the predicted value and the actual value. Therefore, the closer the values of RMSE and MAE are to 0, and the closer the value of R 2 is to 1, the higher the prediction accuracy of the model. The three evaluation indexes are defined by the following formulas: ,

[0083] ,

[0084] ,

[0085] wherein is the total amount of values, represents the actual value, is the prediction result calculated by the model, is the average value of the actual value, represents the average value of the prediction result.

[0086] First, the data used in the example is described. The data used in this example comes from the wheat flour supply chain, and the content of the heavy metal cadmium hazard in the wheat flour supply chain is collected. The simplified process of the supply chain is shown in the attached Figure 3 The supply chain has 11 links, including raw grain, wheat conditioning, skin grinding, etc. To represent multiple links, set the raw grain as , cleaning as , wheat conditioning as , skin grinding one (1M core) as , skin grinding two (2M core) as , and skin grinding three (3M core) as Leather polishing four (4M core) is Leather Grinding 5 (5M Core) is Leather polishing six (6M core) is Packaging as Stored as Ultimately, 27 sets of cadmium hazard content data were obtained from the wheat flour supply chain, in the format (27, 11). A schematic diagram of cadmium hazard content is attached. Figure 4 .

[0087] Table 1. Results of the comparative experiment on data augmentation effects.

[0088]

[0089] Table 1 shows the comparison of prediction performance with the source data at different augmentation factors. Figure 5 The performance of the model was demonstrated with different amounts of augmented data. The evaluation metrics from the comparative experiments show that when using source data or a small amount of augmented data for training and testing, the model's prediction accuracy is not high due to the limited amount of data. This proves that the model is prone to overfitting when the amount of data is small. Specifically, the model's prediction performance on the validation set is lower than its prediction performance on the training set. The model excessively learns the features of the training set input data, resulting in poor prediction performance on new input data, which will affect the reliability of cadmium hazard prediction in the wheat flour supply chain. As the augmentation factor increases, the model is able to fully explore the hidden features of the input data while avoiding overfitting, and the overall prediction accuracy shows an upward trend.

[0090] The results of the examples show that, in the task of predicting the content of hazardous substances in the first 6 stages and the last 5 stages, the use of the randomized weighted DBA enhancement method combined with the GRU model can improve the prediction accuracy of the food supply chain hazardous substance prediction model.

[0091] Example 2

[0092] This example demonstrates data augmentation and modeling prediction of the levels of three hazardous substances in the rice supply chain: cadmium, lead, and mycotoxins. It utilizes data from the top ten stages of the wheat flour supply chain. The last two stages of predicting hazardous substance content Hazardous substance content data. Examples compare the prediction performance using 500x augmented data and the original data. Variables such as the number of network layers are kept consistent, and the data is divided into 70% training data and 30% validation data. RMSE, MAE, and R... 2 Three evaluation metrics are used to assess the system's performance.

[0093] Firstly, the data used in the example is described. The data used in the example is from the rice powder supply chain, and the contents of heavy metal cadmium, heavy metal lead and mycotoxin hazards in the rice supply chain are collected. The simplified process of the supply chain is shown in the accompanying Figure 6 , and the supply chain has 12 links such as acquisition, drying, impurity removal, etc. In order to represent multiple links, acquisition is set to , drying is , impurity removal is , storage is , hulling is , milling is , color selection is , polishing is , packaging is , warehousing is , transportation is , and sales is . Finally, the heavy metal cadmium, heavy metal lead and mycotoxin content data of the rice supply chain are obtained as 24 groups, 31 groups and 28 groups, respectively, and the data formats are (22, 12), (31, 12), (28, 12).

[0094] Table 2 Comparison of prediction accuracy based on cadmium data data augmentation

[0095]

[0096] Tables 2, 3 and 4 are the experimental results of cadmium data, lead data and mycotoxin data respectively. The GRU model trained with data augmentation data performs well in the prediction task of the three groups of data. After data augmentation, the prediction accuracy of the GRU prediction model is significantly improved, avoiding overfitting and other problems, and demonstrating the reliability of the method in the food supply chain.

[0097] Table 3 Comparison of prediction accuracy based on lead data data augmentation

[0098]

[0099] Table 4 Comparison of prediction accuracy based on mycotoxin data data augmentation

[0100]

[0101] Therefore, through experimental verification, the random weighted DBA data augmentation method can effectively expand the original data set in the prediction task of hazards in the food supply chain, improve the prediction accuracy of deep learning models such as GRU, and has good application prospects for the prediction of hazards in the food supply chain.

[0102] Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A method for expanding data on the content of hazardous substances in the food supply chain, characterized in that, The method includes: Obtain N sets of real source data on the content of hazardous substances, each set of real source data on the content of hazardous substances contains a data sequence; The data sequences in the N sets of real source data on the content of hazardous substances are divided into multiple sequence combinations, and each sequence combination is a calculation group. Based on the required number of sequences for weighted average calculation, a weighted calculation is performed on each calculation group to obtain the weight value assigned to each calculation group; Based on the weight values ​​assigned to each computation group, a weighted average is performed on the data sequences in each computation group to obtain the data augmentation sequence for each computation group; The process of performing weighted calculations on each calculation group according to the required number of sequences for weighted average calculation, and obtaining the weight value assigned to each calculation group, includes: According to the requirement of the number of sequences for weighted average calculation, for any calculation group containing at least M data sequences, where M>3, an initial data sequence is randomly selected from the calculation group and assigned a random weight. In the computational group containing the initial data sequence, the two data sequences closest to the initial data sequence are obtained by DTW distance, and the two data sequences are assigned the same weight according to the random weight. The remaining M-3 data sequences are evenly distributed with the remaining weights; The process of performing weighted calculations on each calculation group according to the required number of sequences for weighted average calculation, and obtaining the weight value assigned to each calculation group, includes: According to the requirement of the number of sequences for weighted average calculation, for any calculation group that contains at least M data sequences, where M < 4, the average of the data sequences in the calculation group is calculated. The mean calculated by the mean calculation is multiplied by a random scaling factor.

2. The method according to claim 1, characterized in that, The process of dividing the data sequences in the N sets of real source data on hazardous substance content into multiple sequence combinations includes: Two data sequences are randomly selected from the N sets of real source data on hazardous substance content and combined into one sequence combination. ; Two data sequences are randomly selected from the N sets of real source data on hazardous substance content and combined into one sequence combination. ; Until all the data sequences of the N sets of real source data on the content of hazardous substances are combined into a single sequence combination. This divides the data sequences in the N sets of real source data on hazardous substance content into N-1 sequence combinations. , , .

3. The method according to claim 1, characterized in that, The method further includes: The augmented sequences of all computationally grouped data are summarized to obtain the augmented sequence of one iteration; If the number of iterations of the expanded sequence does not reach the preset number, the data expanded sequence for each calculation group is obtained repeatedly until the number of iterations of the expanded sequence reaches the preset number.

4. A device for expanding data on the content of hazardous substances in the food supply chain, characterized in that, The device includes a processor configured with processor-executable instructions to perform the following operations: Obtain N sets of real source data on the content of hazardous substances, each set of real source data on the content of hazardous substances contains a data sequence; The data sequences in the N sets of real source data on the content of hazardous substances are divided into multiple sequence combinations, and each sequence combination is a calculation group. Based on the required number of sequences for weighted average calculation, a weighted calculation is performed on each calculation group to obtain the weight value assigned to each calculation group; Based on the weight values ​​assigned to each computation group, a weighted average is performed on the data sequences in each computation group to obtain the data augmentation sequence for each computation group; The processor is configured with processor-executable instructions to perform the following operations: According to the requirement of the number of sequences for weighted average calculation, for any calculation group containing at least M data sequences, where M>3, an initial data sequence is randomly selected from the calculation group and assigned a random weight. In the computational group containing the initial data sequence, the two data sequences closest to the initial data sequence are obtained by DTW distance, and the two data sequences are assigned the same weight according to the random weight. The remaining M-3 data sequences are evenly distributed with the remaining weights; The processor is configured with processor-executable instructions to perform the following operations: According to the requirement of the number of sequences for weighted average calculation, for any calculation group that contains at least M data sequences, where M < 4, the average of the data sequences in the calculation group is calculated. The mean calculated by the mean calculation is multiplied by a random scaling factor.

5. The apparatus according to claim 4, characterized in that, The processor is configured with processor-executable instructions to perform the following operations: Two data sequences are randomly selected from the N sets of real source data on hazardous substance content and combined into one sequence combination. ; Two data sequences are randomly selected from the N sets of real source data on hazardous substance content and combined into one sequence combination. ; Until all the data sequences of the N sets of real source data on the content of hazardous substances are combined into a single sequence combination. This divides the data sequences in the N sets of real source data on hazardous substance content into N-1 sequence combinations. , , .

6. The apparatus according to claim 4, characterized in that, The processor is configured with processor-executable instructions to perform the following operations: The augmented sequences of all computationally grouped data are summarized to obtain the augmented sequence of one iteration; If the number of iterations of the expanded sequence does not reach the preset number, the data expanded sequence for each calculation group is obtained repeatedly until the number of iterations of the expanded sequence reaches the preset number.

Citation Information

Patent Citations

  • Fast moving consumer goods demand prediction method and device, computer equipment and storage medium

    CN112669065A

  • Chip power supply network Bump current estimation method and system based on deep learning

    CN113408226A