Foreign trade export amount prediction method and device based on hyperbolic space tensor decomposition
By constructing the foreign trade export volume tensor and latent feature matrix based on the method of hyperbolic space tensor decomposition, the loss function is optimized to improve the accuracy of foreign trade export volume prediction, which solves the problem of low foreign trade export volume prediction accuracy in the existing technology. , achieving more accurate time correlation consideration.
Patent Information
- Application Number
- CN202410770267.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, the accuracy of foreign trade export volume prediction is low, especially when considering time correlation, it is difficult to improve the prediction accuracy, and the neural network structure is complex, the number of parameters is large, and the algorithm has poor interpretability.
Using a method based on hyperbolic space tensor decomposition, by constructing the foreign trade export volume tensor and latent feature matrix, the prediction target loss function is constructed, and the stochastic gradient descent method is used to optimize the loss function to calculate the prediction value, taking into account the time correlation and the relationship between trading countries. relationship.
It improves the accuracy and interpretability of foreign trade export forecasts, can more accurately predict foreign trade export data that conforms to statistical laws, and solves the complexity problem in time series forecasts.
Smart Images

Figure CN118761804A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method and device for predicting foreign trade export volume based on hyperbolic space tensor decomposition. Background Art
[0003] Currently, many researchers predict foreign trade export volume through long short-term memory neural networks and other methods, which use given historical foreign trade export volume to predict foreign trade export volume in subsequent periods. Although the prediction method based on neural network can effectively extract nonlinear changes in trade data, due to the complex structure of neural network, large number of parameters, poor algorithm interpretability, lack of verification of its reliability, it is difficult to describe it with an accurate neural network algorithm, thus reducing accuracy. As a time series, foreign trade export volume has complex time correlation. How to consider time correlation when predicting the export volume of various countries and improve the prediction accuracy has become a major research topic in the academic community. Summary of the invention
[0004] In view of the problem of low accuracy in foreign trade export volume prediction in the prior art, the present invention proposes a foreign trade export volume prediction method and device based on hyperbolic space tensor decomposition.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A method for predicting foreign trade export volume based on hyperbolic space tensor decomposition specifically comprises the following steps:
[0007] S1: Collect historical foreign trade export data from the server and store it in the form of quadruple;
[0008] S2: Construct the foreign trade export volume tensor V based on historical foreign trade export volume data;
[0009] S3: Initialize the process parameters involved in the foreign trade export volume forecasting process;
[0010] S4: Based on the constructed foreign trade export volume tensor V and process parameters, construct the foreign trade export volume prediction target loss function and calculate the foreign trade export volume prediction value.
[0011] Preferably, in S1, the four-tuple representation is Q=(r, p, t, v), wherein r represents the exporting country of the trade, p represents the importing country of the trade, t represents the time period when country r exports goods to country p, and v represents the export amount of country r to country p in time period t.
[0012] Preferably, the S2 includes:
[0013] S2-1: Divide the historical foreign trade export data Q = (r, p, t, v) into K time periods according to time period t; select the four-tuple Q with t = 1 from them (1) =(r,p,1,v), using Q (1) Construct the slice matrix P from the data (r, p, v) (1) , P (1) The size of the matrix is I rows and J columns, and the elements in the matrix are P (1) ij represents the export value from the i-th country to the j-th country in the first time period, where I is the number of exporting countries and J is the number of importing countries, 1≤i≤I, 1≤j≤J);
[0014] S2-2: Select the four-tuple Q from the four-tuple Q = (r, p, t, v) in sequence (2) , Q (3) ,…,Q (K) Construct the slice matrix P respectively (2) , P (3) , ..., P (K) ;
[0015] S2-3: Arrange the K slice matrices in the three-dimensional space from small to large according to the time sequence of the divided time slices, and construct a three-dimensional time series network data tensor V∈R I×J×K .
[0016] Preferably, in S3, the process parameters include the foreign trade export value tensor V, the latent feature matrices R, P, T, the latent feature dimension D, the maximum number of training iterations L, the iteration number control variable r during training, and the convergence termination threshold τ; wherein:
[0017] The latent feature dimension D determines the latent feature space dimension of the latent feature matrices R, P, and T;
[0018] The sizes of the latent feature matrices R, P, and T are determined by each dimension value of the corresponding foreign trade export data tensor V and the latent feature dimension D, that is, R is an I-row and D-column latent feature matrix, P is an J-row and D-column latent feature matrix, and T is an K-row and D-column latent feature matrix;
[0019] The maximum number of training iterations L is a variable that controls the upper limit of the iteration process;
[0020] The iteration round control variable r is initialized to 0;
[0021] The convergence termination threshold τ is a parameter used to determine whether the iterative process has converged.
[0022] Preferably, the S4 includes:
[0023] S4-1: Based on the constructed foreign trade export volume tensor V and process parameters, construct the foreign trade export volume prediction target loss function;
[0024] S4-2: Calculate the forecast value of foreign trade export volume based on the implicit characteristics of historical foreign trade export volume.
[0025] Preferably, in S4-1, the target loss function ε is expressed by the following formula:
[0026]
[0027] In formula (1), (i, j, k)∈Λ represents the subscript set of known elements contained in the tensor V; v ijk represents the known entities in the foreign trade export volume tensor V, i.e., the export volume of the i-th exporting country to the j-th importing country at the k-th time; r i represents the value of the i-th row in the latent feature matrix R of the exporting country; p j represents the value of the jth row in the latent feature matrix P of the importing country; t k Represents the value of the kth row in the temporal latent feature matrix T;
[0028] d c (r i ,t k ) represents r i With t k The geodesic distance between is defined as:
[0029]
[0030] d c (p j ,t k ) indicates p j With t k The geodesic distance between is defined as:
[0031]
[0032] d c (r i ,p j ) represents the geodesic distance, which is defined as:
[0033]
[0034] In formula (2), d c (r i ,p j ) represents the geodesic distance; c represents the curvature; express Addition is defined as:
[0035]
[0036] In formula (3), α represents the function name of the numerator of formula (3), and β represents the function name of the denominator of formula (3).
[0037] Preferably, the target loss function ε is iteratively optimized using the stochastic gradient descent method to minimize the value of the target loss function ε. The formula for training iteration is as follows:
[0038]
[0039] In formula (4), represents the value of the i-th row in the latent feature matrix R of the exporting country at the n+1th iteration; represents the value of the i-th row in the latent feature matrix R of the exporting country at the n-th iteration; l0 represents the initial learning rate; q ijk =d c (r i ,p j )+d c (r i ,t k )+d c (p j ,t k ), Indicates the exporting country i In time period t k To the importing country j The predicted value of export volume, m represents the maximum value of export volume; represents the value of the jth row in the latent feature matrix P of the importing country at the n+1th iteration; represents the value of the jth row in the latent feature matrix P of the importing country at the nth iteration; Represents the value of the kth row in the temporal latent feature matrix T at the n+1th iteration; Represents the value of the kth row in the temporal latent feature matrix T at the nth iteration;
[0040] Indicates the nth iteration r i With p j The geodesic distance between The derivative of addition is defined as:
[0041]
[0042] Indicates the nth iteration r i With t k The geodesic distance between The derivative of addition is defined as:
[0043]
[0044] Indicates the nth iteration p j With t k The geodesic distance between The derivative of addition is defined as:
[0045]
[0046] Indicates the nth iteration r i With p j of Addition with respect to the first vector The derivative of is defined as:
[0047]
[0048] 1 D represents a vector of length D whose elements are all 1, where D is the number of columns of the three factor matrices R, P, and T;
[0049] Indicates the nth iteration r i With t k of Addition with respect to the first vector The derivative of is defined as:
[0050]
[0051] Indicates the nth iteration p j With t k of Addition with respect to the first vector The derivative of is defined as:
[0052]
[0053] Indicates the nth iteration r i With p j of Addition with respect to the second vector The derivative of is defined as:
[0054]
[0055] Indicates the nth iteration r i With t k of Addition with respect to the second vector The derivative of is defined as:
[0056]
[0057] Indicates the nth iteration p j With t k of Addition with respect to the second vector The derivative of is defined as:
[0058]
[0059] c represents the curvature; α represents the function name of the numerator, and β represents the function name of the denominator.
[0060] Preferably, in S4, the calculation formula of the foreign trade export volume forecast value is as follows:
[0061]
[0062] In formula (5), Indicates the exporting country i In time period t k To the importing country j The export volume forecast value; Indicates the maximum value of export value; d c (r i ,t k ) represents r i With t k The geodesic distance of c (p j ,t k ) indicates p j With t k The geodesic distance d c (r i ,p j ) represents the geodesic distance.
[0063] The present invention also provides a device for predicting foreign trade export amount based on hyperbolic space tensor decomposition, comprising:
[0064] The foreign trade export value data receiving module 110 is used to receive historical foreign trade export value data and store it in the foreign trade export value data module;
[0065] The foreign trade export value data module 120 is used to store the received historical foreign trade export value data and store the predicted foreign trade export value data;
[0066] A foreign trade export value data tensor construction module 130 is used to construct the stored historical foreign trade export value data into a foreign trade export value tensor;
[0067] The foreign trade export amount prediction module 140 is used to predict the foreign trade export amount according to the constructed foreign trade export amount tensor, and store the foreign trade export amount data with the highest prediction accuracy into the export amount data module.
[0068] Preferably, the foreign trade export amount prediction module 140 includes an initialization unit 141, a training unit 142 and a foreign trade export amount prediction value calculation unit 143;
[0069] Initialization unit 141, used to initialize process parameters involved in the foreign trade export volume prediction process;
[0070] A training unit 142 is used to construct a target loss function by combining the constructed foreign trade export value tensor and the process parameters, and train and calculate the latent features of the historical foreign trade export value;
[0071] The foreign trade export amount prediction value calculation unit 143 is used to calculate the foreign trade export amount prediction value according to the implicit features of the historical foreign trade export amounts obtained by the training unit 142.
[0072] In summary, due to the adoption of the above technical solution, compared with the prior art, the present invention has at least the following beneficial effects:
[0073] The present invention provides a method and device for predicting foreign trade export value based on hyperbolic space tensor decomposition, which is specifically used for foreign trade export value data and can predict foreign trade export value with high accuracy in accordance with statistical laws, so as to solve the problem of dynamic foreign trade export value prediction containing time series information. It can be widely used in computer computing, foreign trade export and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a schematic diagram of a method for predicting foreign trade export amount based on hyperbolic space tensor decomposition according to an exemplary embodiment of the present invention.
[0075] Figure 2 Schematic diagram of a device for predicting foreign trade export amount based on hyperbolic space tensor decomposition according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0076] The present invention is further described in detail below in conjunction with the examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following examples, and all technologies realized based on the content of the present invention belong to the scope of the present invention.
[0077] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0078] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0079] like Figure 1 As shown, the present invention provides a method for predicting foreign trade export amount based on hyperbolic space tensor decomposition, which specifically includes the following steps:
[0080] S1: Receive the instruction of predicting the historical foreign trade export volume sent by the server, collect the historical foreign trade export volume data from the server, and store it in the form of a quadruple.
[0081] In this embodiment, the server may send instructions to the foreign trade export value data receiving module by sending instructions for forecasting foreign trade export value to the foreign trade export value data receiving module regularly, according to notification of the device, or according to notification of a server.
[0082] In this embodiment, the four-tuple representation is Q=(r, p, t, v), where r represents the exporting country of the trade, p represents the importing country of the trade, t represents the time period when country r exports goods to country p, and v represents the export amount of country r to country p in time period t.
[0083] S2: Construct the foreign trade export volume tensor V based on historical foreign trade export volume data.
[0084] S2-1: Divide the historical foreign trade export data Q = (r, p, t, v) into K time periods according to time period t. (K represents a positive integer, and its size is determined according to specific needs, and there is no specific value range limit); select the four-tuple Q with t = 1 from it (1) =(r,p,1,v), using Q (1) Construct the slice matrix P from the data (r, p, v) (1) , P (1)The size of the matrix is I rows and J columns, and the elements in the matrix are P (1) ij It represents the export amount from the i-th country to the j-th country in the first time period, where I is the number of exporting countries and J is the number of importing countries, 1≤i≤I, 1≤j≤J).
[0085] S2-2: Select the four-tuple Q from the four-tuple Q = (r, p, t, v) in sequence (2) , Q (3) , …, Q (K) Construct the slice matrix P respectively (2) , P (3) , ..., P (K) .
[0086] S2-3: Arrange the K slice matrices in the three-dimensional space from small to large according to the time sequence of the divided time slices, and construct a three-dimensional time series network data tensor V∈R I×J×K , since each country only trades with some countries in a period of time and the export volume is positive, the constructed foreign trade export volume tensor V is a non-negative sparse tensor, and the known data set Λ is used to represent the set of all data of the foreign trade export volume tensor V.
[0087] S3: Initialize the process parameters involved in the foreign trade export volume forecasting process.
[0088] In this embodiment, the process parameters include the foreign trade export volume tensor V, the latent feature matrices R, P, T, the latent feature dimension D, the maximum number of training iterations L, the iteration number control variable r during the training process, and the convergence termination threshold τ; wherein:
[0089] The latent feature dimension D determines the dimension of the latent feature space of the latent feature matrices R, P, and T, and is initialized to a positive integer, such as 10;
[0090] The sizes of the latent feature matrices R, P, and T are determined by the corresponding foreign trade export data tensor V and the latent feature dimension D, that is, R is an I-row D-column latent feature matrix, P is an J-row D-column latent feature matrix, and T is an K-row D-column latent feature matrix. The three latent feature matrices are initialized with small random positive numbers, such as 0.001.
[0091] The maximum number of training iterations L is a variable that controls the upper limit of the iteration process and is initialized to a large positive integer, such as 100;
[0092] The iteration round control variable r is initialized to 0;
[0093] The convergence termination threshold τ is a parameter used to determine whether the iterative process has converged, and is initialized with a very small positive number, such as 0.000001.
[0094] S4: According to the constructed foreign trade export value tensor V and process parameters, a foreign trade export value prediction target loss function is constructed, the foreign trade export value prediction value is calculated, and the foreign trade export value data with the highest prediction accuracy is stored in the export value prediction value storage unit of the foreign trade export value data module.
[0095] S4-1: Based on the constructed foreign trade export volume tensor V and process parameters, a foreign trade export volume prediction target loss function is constructed to train and calculate the latent features of historical foreign trade export volume.
[0096] S4-1-1: Combine the constructed foreign trade export value tensor V and the process parameters involved in the initialized foreign trade export value prediction process, and construct the target loss function ε for the known data set Γ of the foreign trade export value tensor V to train and obtain the values of the latent feature matrices R, P, and T of the historical foreign trade export value;
[0097] The objective loss function ε is expressed as follows:
[0098]
[0099] In formula (1), (i, j, k)∈Λ represents the subscript set of known elements contained in the tensor V; v ijk represents the known entities in the foreign trade export volume tensor V, i.e., the export volume of the i-th exporting country to the j-th importing country at the k-th time; r i represents the value of the i-th row in the latent feature matrix R of the exporting country; p j represents the value of the jth row in the latent feature matrix P of the importing country; t k Represents the value of the kth row in the temporal latent feature matrix T;
[0100] d c (r i ,t k ) represents r i With t k The geodesic distance between is defined as:
[0101]
[0102] d c (p j ,t k ) indicates p j With t k The geodesic distance between is defined as:
[0103]
[0104] d c (r i ,p j ) represents the geodesic distance, which is defined as:
[0105]
[0106] In formula (2), d c (r i ,p j ) represents the geodesic distance; c represents the curvature; express Addition is defined as:
[0107]
[0108] In formula (3), α represents the function name of the numerator of formula (3), and β represents the function name of the denominator of formula (3).
[0109] In this embodiment, the hyperbolic space tensor decomposition parameter refers to r i ,p j ,t k Three vectors.
[0110] In this embodiment, the target loss function uses the Euclidean distance as the optimization target.
[0111] S4-1-2: Use the stochastic gradient descent method to iteratively optimize the target loss function ε to minimize the value of the target loss function ε. The formula for training iteration is as follows:
[0112]
[0113] In formula (4), represents the value of the i-th row in the latent feature matrix R of the exporting country at the n+1th iteration; represents the value of the i-th row in the latent feature matrix R of the exporting country at the n-th iteration; l0 represents the initial learning rate; q ijk =d c (r i ,p j )+d c (r i ,t k )+d c (p j ,t k ), Indicates the exporting country i In time period t k To the importing country j The predicted value of export volume, m represents the maximum value of export volume; represents the value of the jth row in the latent feature matrix P of the importing country at the n+1th iteration; represents the value of the jth row in the latent feature matrix P of the importing country at the nth iteration; Represents the value of the kth row in the temporal latent feature matrix T at the n+1th iteration; Represents the value of the kth row in the temporal latent feature matrix T at the nth iteration;
[0114] Indicates the geodesic distance at the nth iteration about The derivative of addition is defined as:
[0115]
[0116] Indicates the nth iteration r i With t k The geodesic distance between The derivative of addition is defined as:
[0117]
[0118] Indicates the nth iteration p j With t k The geodesic distance between The derivative of addition is defined as:
[0119]
[0120] Indicates the nth iteration Addition with respect to the first vector The derivative of is defined as:
[0121]
[0122] 1 D represents a vector of length D whose elements are all 1, where D is the number of columns of the three factor matrices R, P, and T;
[0123] Indicates the nth iteration r i With t k of Addition with respect to the first vector The derivative of is defined as:
[0124]
[0125] Indicates the nth iteration p j With t k of Addition with respect to the first vector The derivative of is defined as:
[0126]
[0127] Indicates the nth iteration r i With p j of Addition with respect to the second vector The derivative of is defined as:
[0128]
[0129] Indicates the nth iteration r i With t k of Addition with respect to the second vector The derivative of is defined as:
[0130]
[0131] Indicates the nth iteration p j With t k of Addition with respect to the second vector The derivative of is defined as:
[0132]
[0133] c represents the curvature; α represents the function name of the numerator, and β represents the function name of the denominator.
[0134] S4-1-3: Determine whether the training iteration process of the target loss function ε on Λ reaches the termination condition, and terminate after the termination condition is reached.
[0135] In this step, there are two situations in which the training iteration process of ε on Λ reaches the termination condition. The first is that the value of the training iteration control variable r is increased by 1 for each iteration of ε. When the value of r reaches the maximum training iteration number L, ε stops training. The second is that during the ε training process, when the absolute value of the difference between the ε value calculated after the current iteration and the ε value of the previous round is less than the convergence termination threshold τ, ε stops training.
[0136] S4-2: Calculate the foreign trade export amount forecast value according to the implicit characteristics of the historical foreign trade export amount, and then store the calculated foreign trade export amount forecast value in the export amount forecast value storage unit.
[0137] When the target loss function ε converges on the known data set Λ, the hidden feature matrices R, P, and T obtained by training when the target loss function ε reaches the minimum value are used to calculate the export country r with the highest accuracy. i In time period t k To the importing country j Export forecast value
[0138]
[0139] In formula (5), Indicates the exporting country i In time period t k To the importing country j The export volume forecast value; Indicates the maximum value of export value; d c (r i ,t k ) represents r i With t k The geodesic distance of c (p j ,t k ) indicates p j With t k The geodesic distance d c (r i ,p j ) represents the geodesic distance.
[0140] The present invention provides a foreign trade export volume forecasting method based on hyperbolic space tensor decomposition, which is specifically used for foreign trade export volume data and can make accurate foreign trade export volume forecasts that conform to statistical laws, so as to solve the dynamic foreign trade export volume forecasting problem containing time series information.
[0141] Based on the above method, Figure 2 As shown, the present invention also provides a foreign trade export amount prediction device based on hyperbolic space tensor decomposition, comprising:
[0142] The foreign trade export value data receiving module 110 is used to receive historical foreign trade export value data and store it in the foreign trade export value data module.
[0143] The foreign trade export value data module 120 is used to store the received historical foreign trade export value data and store the predicted foreign trade export value data.
[0144] The foreign trade export value data tensor construction module 130 is used to construct the stored historical foreign trade export value data into a foreign trade export value tensor.
[0145] The foreign trade export amount prediction module 140 performs foreign trade export amount prediction based on the constructed foreign trade export amount tensor, and stores the foreign trade export amount data with the highest prediction accuracy into the export amount data module.
[0146] The foreign trade export amount prediction module 140 includes an initialization unit 141, a training unit 142 and a foreign trade export amount prediction value calculation unit 143;
[0147] The initialization unit 141 is used to initialize the relevant parameters involved in the foreign trade export volume prediction process;
[0148] The training unit 142 is used to combine the constructed foreign trade export value tensor and the relevant parameters involved in the foreign trade export value prediction process initialized by the initialization unit 141 to train and calculate the latent features of the historical foreign trade export value;
[0149] The foreign trade export amount prediction value calculation unit 143 is used to calculate the foreign trade export amount prediction value according to the implicit features of the historical foreign trade export amount obtained by the training unit 142. The calculated foreign trade export amount prediction value is then stored in the export amount prediction value storage unit.
[0150] In a specific embodiment, the foreign trade export value data module 120 includes an export value data storage unit 121 and an export value prediction value storage unit 122;
[0151] The export value data storage unit 121 is used to store the received historical foreign trade export value data in the form of four tuples.
[0152] The four-tuple representation is Q = (r, p, t, v), where r represents the exporting country of the trade, p represents the importing country of the trade, t represents the time period when country r exports goods to country p, and v represents the export amount of country r to country p in time period t.
[0153] The export amount prediction value storage unit 122 is used to store the predicted foreign trade export amount data, wherein the export amount prediction value is also stored in the form of a quadruple.
[0154] In a specific embodiment, the foreign trade export value tensor construction module 130 is used to construct the stored historical foreign trade export value data into a foreign trade export value tensor; specifically:
[0155] All the four-tuples Q = (r, p, t, v) in the export amount data storage unit 121 are divided into K time period data according to the time period t, where K represents a positive integer whose size is determined according to specific needs and has no specific value range limit. Select the four-tuple Q with t = 1 from them. (1) =(r,p,1,v), using Q (1) Construct the slice matrix P from the data (r, p, v) (1) , P (1) The size of the matrix is I rows and J columns, and the elements in the matrix are P (1) ij represents the export value of the i-th country to the j-th country in the first time period, where I is the number of exporting countries, J is the number of importing countries, 1≤i≤I, 1≤j≤J). Then select the four-tuple Q from the four-tuple Q=(r,p,t,v) in turn. (2) , Q(3) , …, Q (K) Construct the slice matrix P respectively (2) , P (3) ,…,P (K) Finally, K slice matrices are used to construct the foreign trade export value tensor V∈R in three-dimensional space according to the K time periods divided from small to large and arranged from front to back. I×J×K , R represents a real number set. Since each country only trades with some countries in a period of time and the export volume is positive, the constructed foreign trade export volume tensor V is a non-negative sparse tensor. The known data set Λ represents the set of all data of the foreign trade export volume tensor V.
[0156] In a specific embodiment, the initialization unit 141 is used to initialize the process parameters involved in the foreign trade export amount prediction process;
[0157] In a specific embodiment, the training unit 142 is used to train and calculate the latent features of the historical foreign trade export value by combining the constructed foreign trade export value tensor and the relevant parameters involved in the foreign trade export value prediction process initialized by the initialization unit 141;
[0158] The foreign trade export amount forecast value calculation unit 143 includes:
[0159] When the target loss function ε converges on the known data set Λ, the hidden feature matrices R, P, and T obtained by training when the target loss function ε reaches the minimum value are used to calculate the country r with the highest accuracy. i In time period t k To the importing country j Export forecast value The calculation formula is The calculated foreign trade export amount forecast value is output to the export amount forecast value storage unit for storage.
[0160] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A method for predicting foreign trade export volume based on hyperbolic space tensor decomposition, characterized in that: The specific steps include: S1: Collect historical foreign trade export data from the server and store it in the form of quadruple; S2: Construct the foreign trade export volume tensor V based on historical foreign trade export volume data; S3: Initialize the process parameters involved in the foreign trade export volume forecasting process; S4: Based on the constructed foreign trade export volume tensor V and process parameters, construct the foreign trade export volume prediction target loss function and calculate the foreign trade export volume prediction value.
2. The method for predicting foreign trade export volume based on hyperbolic space tensor decomposition according to claim 1, characterized in that: In S1, the four-tuple representation is Q=(r, p, t, v), where r represents the exporting country of the trade, p represents the importing country of the trade, t represents the time period when country r exports goods to country p, and v represents the export amount of country r to country p in time period t.
3. The method for predicting foreign trade export volume based on hyperbolic space tensor decomposition according to claim 1, characterized in that: The S2 includes: S2-1: Divide the historical foreign trade export data Q = (r, p, t, v) into K time periods according to time period t; select the four-tuple Q with t = 1 from them (1) =(r,p,1,v), using Q (1) Construct the slice matrix P from the data (r, p, v) (1) , P (1) The size of the matrix is I rows and J columns, and the elements in the matrix are P (1) ij represents the export value from the i-th country to the j-th country in the first time period, where I is the number of exporting countries and J is the number of importing countries, 1≤i≤I, 1≤j≤J); S2-2: Select the four-tuple Q from the four-tuple Q = (r, p, t, v) in sequence (2) , Q (3) , …, Q (K) Construct the slice matrix P respectively (2) , P (3) ,…,P (K) ; S2-3: Arrange the K slice matrices in the three-dimensional space from small to large according to the time sequence of the divided time slices, and construct a three-dimensional time series network data tensor V∈R I×J×K .
4. The method for predicting foreign trade export volume based on hyperbolic space tensor decomposition according to claim 1, characterized in that: In S3, the process parameters include the foreign trade export volume tensor V, the latent feature matrices R, P, T, the latent feature dimension D, the maximum number of training iterations L, the iteration number control variable r during the training process, and the convergence termination threshold τ; wherein: The latent feature dimension D determines the latent feature space dimension of the latent feature matrices R, P, and T; The sizes of the latent feature matrices R, P, and T are determined by each dimension value of the corresponding foreign trade export data tensor V and the latent feature dimension D, that is, R is an I-row and D-column latent feature matrix, P is an J-row and D-column latent feature matrix, and T is an K-row and D-column latent feature matrix; The maximum number of training iterations L is a variable that controls the upper limit of the iteration process; The iteration round control variable r is initialized to 0; The convergence termination threshold τ is a parameter used to determine whether the iterative process has converged.
5. The method for predicting foreign trade export volume based on hyperbolic space tensor decomposition according to claim 1, characterized in that: The S4 includes: S4-1: Based on the constructed foreign trade export volume tensor V and process parameters, construct the foreign trade export volume prediction target loss function; S4-2: Calculate the forecast value of foreign trade export volume based on the implicit characteristics of historical foreign trade export volume.
6. The method for predicting foreign trade export volume based on hyperbolic space tensor decomposition according to claim 5, characterized in that: In S4-1, the target loss function ε is expressed by the following formula: In formula (1), (i, j, k)∈Λ represents the subscript set of known elements contained in the tensor V; v ijk represents the known entities in the foreign trade export volume tensor V, i.e., the export volume of the i-th exporting country to the j-th importing country at the k-th time; r i represents the value of the i-th row in the latent feature matrix R of the exporting country; p j represents the value of the jth row in the latent feature matrix P of the importing country; t k Represents the value of the kth row in the temporal latent feature matrix T; d c (r i ,t k ) represents r i With t k The geodesic distance between is defined as: d c (p j ,t k ) indicates p j With t k The geodesic distance between is defined as: d c (r i ,p j ) represents the geodesic distance, which is defined as: In formula (2), d c (r i ,p j ) represents the geodesic distance; c represents the curvature; express Addition is defined as: In formula (3), α represents the function name of the numerator of formula (3), and β represents the function name of the denominator of formula (3).
7. The method for predicting foreign trade export volume based on hyperbolic space tensor decomposition according to claim 6, characterized in that: Use the stochastic gradient descent method to iteratively optimize the target loss function ε to minimize the value of the target loss function ε. The formula for training iteration is as follows: In formula (4), represents the value of the i-th row in the latent feature matrix R of the exporting country at the n+1th iteration; represents the value of the i-th row in the latent feature matrix R of the exporting country at the n-th iteration; l0 represents the initial learning rate; q ijk =d c (r i ,p j )+d c (r i ,t k )+d c (p j ,t k ), Indicates the exporting country i In time period t k To the importing country j The predicted value of export volume, m represents the maximum value of export volume; represents the value of the jth row in the latent feature matrix P of the importing country at the n+1th iteration; represents the value of the jth row in the latent feature matrix P of the importing country at the nth iteration; Represents the value of the kth row in the temporal latent feature matrix T at the n+1th iteration; Represents the value of the kth row in the temporal latent feature matrix T at the nth iteration; Indicates the nth iteration r i With p j The geodesic distance between The derivative of addition is defined as: Indicates the nth iteration r i With t k The geodesic distance between The derivative of addition is defined as: Indicates the nth iteration p j With t k The geodesic distance between The derivative of addition is defined as: Indicates the nth iteration r i With p j of Addition with respect to the first vector The derivative of is defined as: 1 D represents a vector of length D whose elements are all 1, where D is the number of columns of the three factor matrices R, P, and T; Indicates the nth iteration r i With t k of Addition with respect to the first vector The derivative of is defined as: Indicates the nth iteration p j With t k of Addition with respect to the first vector The derivative of is defined as: Indicates the nth iteration r i With p j of Addition with respect to the second vector The derivative of is defined as: Indicates the nth iteration r i With t k of Addition with respect to the second vector The derivative of is defined as: Indicates the nth iteration p j With t k of Addition with respect to the second vector The derivative of is defined as: c represents the curvature; α represents the function name of the numerator, and β represents the function name of the denominator.
8. The method for predicting foreign trade export volume based on hyperbolic space tensor decomposition according to claim 1, characterized in that: In S4, the calculation formula for the forecast value of foreign trade export volume is as follows: In formula (5), Indicates the exporting country i In time period t k To the importing country j The export volume forecast value; Indicates the maximum value of export value; d c (r i ,t k ) represents r i With t k The geodesic distance of c (p j ,t k ) indicates p j With t k The geodesic distance d c (r i ,p j ) represents the geodesic distance.
9. A device for predicting foreign trade export volume based on hyperbolic space tensor decomposition based on the method according to any one of claims 1 to 8, characterized in that: include: A foreign trade export value data receiving module (110), used for receiving historical foreign trade export value data and storing it in a foreign trade export value data module; A foreign trade export value data module (120), used for storing received historical foreign trade export value data and storing predicted foreign trade export value data; A foreign trade export value data tensor construction module (130), used for constructing the stored historical foreign trade export value data into a foreign trade export value tensor; The foreign trade export amount prediction module (140) is used to predict the foreign trade export amount according to the constructed foreign trade export amount tensor, and store the foreign trade export amount data with the highest prediction accuracy into the export amount data module.
10. The device for predicting foreign trade export amount based on hyperbolic space tensor decomposition according to claim 9, characterized in that: The foreign trade export amount prediction module (140) includes an initialization unit (141), a training unit (142) and a foreign trade export amount prediction value calculation unit (143); An initialization unit (141) is used to initialize the process parameters involved in the foreign trade export volume forecasting process; A training unit (142) is used to construct a target loss function by combining the constructed foreign trade export volume tensor and process parameters, and train and calculate the latent features of the historical foreign trade export volume; The foreign trade export amount prediction value calculation unit (143) is used to calculate the foreign trade export amount prediction value according to the implicit features of the historical foreign trade export amount obtained by the training unit (142).
Citation Information
Patent Citations
Device and method for predicting missing protein-protein interactions based on momentum acceleration
CN112037850B
Infectious disease transmission chain prediction device and use method thereof
CN116884639A
Transform-based space-time meteorological prediction method
CN117874448A
Joint assembly of water pumping pipe for groundwater well with both flange and socket function
KR102496394B1
